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)
Jan 18 2024, 1:12 PM
Unknown Object (File)
Jan 5 2024, 5:37 PM
Unknown Object (File)
Dec 21 2023, 10:52 PM
Unknown Object (File)
Nov 10 2023, 8:15 AM
Unknown Object (File)
Oct 1 2023, 6:29 AM
Unknown Object (File)
Jun 14 2023, 8:47 PM
Unknown Object (File)
Jan 12 2023, 1:18 PM
Unknown Object (File)
Dec 28 2022, 2:46 AM

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.)