idmapd client-side static mapping
Subsystems (2)
Hi,
man pages for idmapd.conf states possibility to use Static mapping. Looking at the source code of libnfsidmap v0.24, it is clear that static mappings are only valid for server side (svcgssd) which the man page forgets to mention. Is there any specific reason why not to implement the static resolution functions on the client side as well?
I would send a patch if there is a change it will be accepted.
Regards
Jiri Horky
Quoted 3 lines · Jiri Horky
Hi,
man pages for idmapd.conf states possibility to use Static mapping. Looking at the source code of libnfsidmap v0.24, it is clear that static mappings are only valid for server side (svcgssd) which the man page forgets to mention. Is there any specific reason why not to implement the static resolution functions on the client side as well?
That is a good question... I always wonders this myself....
Quoted 2 lines
I would send a patch if there is a change it will be accepted.
There is only one way to find out! ;-)
steved.
Hi,
I sent the patch in the separated email and now I hope for the best :)
Some more notes: if one configures only the "Static" translation method nowadays, any translation of id to name does not occur (since it is not implemented), return code of the nfs4_uid_to_name() function will be 0 which is set by init function in libnfsidmap.c:357 and you get empty string as the result which puzzles the client and completely freezes the system. It can be triggered by e.g. issuing "chown 1000 /nfs4mnt/testfile". I think that more correct behavior would be to return -ENOENT if there are no plugins with a given translation function. This is not included in the patch sent.
By the way, is there a reason why the function like nfs4_name_to_uid or its "gid" partner does not return "nobody/nogroup" when it fails to do the translation? On my system, it is set to a random value (uninitialized int) in this case.
Jiri Horky
Quoted 10 lines · Steve Dickson
Quoted 3 lines · Jiri Horky
Hi,
man pages for idmapd.conf states possibility to use Static mapping. Looking at the source code of libnfsidmap v0.24, it is clear that static mappings are only valid for server side (svcgssd) which the man page forgets to mention. Is there any specific reason why not to implement the static resolution functions on the client side as well?
That is a good question... I always wonders this myself....
Quoted 1 line
I would send a patch if there is a change it will be accepted.
There is only one way to find out! ;-)
steved.