Page MenuHomeFreeBSD

Add vfs.nfsd.nfsd_disable_uidtostring
ClosedPublic

Authored by trasz on Jun 23 2017, 3:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 6:11 AM
Unknown Object (File)
Tue, Nov 5, 3:45 AM
Unknown Object (File)
Oct 21 2024, 2:14 PM
Unknown Object (File)
Oct 11 2024, 4:58 AM
Unknown Object (File)
Oct 8 2024, 5:50 PM
Unknown Object (File)
Oct 5 2024, 6:00 AM
Unknown Object (File)
Oct 3 2024, 9:56 PM
Unknown Object (File)
Oct 1 2024, 1:05 PM

Details

Summary

Add vfs.nfsd.nfsd_disable_uidtostring, which works just like
vfs.nfsd.nfsd_disable_stringtouid, but in reverse - when set to 1,
it forces the NFSv4 server to return numeric UIDs and GIDs instead
of "user@domain" strings. This helps with clients that can't
translate returned identifiers, eg when rerooting.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Patch looks fine. I will note that not running the nfsuserd daemon achieves the same
result (that is what the nfsrv_dnsnamelen > 0 is for), but if there is a case where
someone wants to run nfsuserd but doesn't want it to do "outbound" mapping,
I can see this as useful.

This revision is now accepted and ready to land.Jun 23 2017, 9:02 PM
This revision was automatically updated to reflect the committed changes.

Btw, another reason to do this is that, if someone wishes to stop using the
nfsuserd and just put uid/gid numbers in the strings, this would allow
them to kill the nfsuserd daemon off and set this sysctl.

Without this sysctl, the sysadmin must reboot the machine to disable use
of the nfsuserd daemon. (The kernel code still tries to use cached mappings
when the daemon has gone away, under the assumption that it has crashed and
will be restarted.)