Date: Mon, 14 Dec 2015 23:09:03 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r292233 - in stable/10/etc: defaults rc.d Message-ID: <201512142309.tBEN93cv075445@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Mon Dec 14 23:09:02 2015 New Revision: 292233 URL: https://svnweb.freebsd.org/changeset/base/292233 Log: MFC: r291536 Add support for the new "-manage-gids" option for the nfsuserd daemon to the rc scripts. With these changes, setting nfs_server_managegids="YES" in /etc/rc.conf will enable this capability. Relnotes: yes Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/nfsd stable/10/etc/rc.d/nfsuserd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Mon Dec 14 22:54:02 2015 (r292232) +++ stable/10/etc/defaults/rc.conf Mon Dec 14 23:09:02 2015 (r292233) @@ -330,6 +330,7 @@ nfs_access_cache="60" # Client cache ti nfs_server_enable="NO" # This host is an NFS server (or NO). oldnfs_server_enable="NO" # Run the old NFS server (YES/NO). nfs_server_flags="-u -t" # Flags to nfsd (if enabled). +nfs_server_managegids="NO" # The NFS server maps gids for AUTH_SYS (or NO). mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r" # Flags to mountd (if NFS server enabled). weak_mountd_authentication="NO" # Allow non-root mount requests to be served. Modified: stable/10/etc/rc.d/nfsd ============================================================================== --- stable/10/etc/rc.d/nfsd Mon Dec 14 22:54:02 2015 (r292232) +++ stable/10/etc/rc.d/nfsd Mon Dec 14 23:09:02 2015 (r292233) @@ -46,9 +46,13 @@ nfsd_precmd() sysctl vfs.nfsd.nfs_privport=0 > /dev/null fi + if checkyesno nfsv4_server_enable || \ + checkyesno nfs_server_managegids; then + force_depend nfsuserd || err 1 "Cannot run nfsuserd" + fi + if checkyesno nfsv4_server_enable; then sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null - force_depend nfsuserd || err 1 "Cannot run nfsuserd" else echo 'NFSv4 is disabled' sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null Modified: stable/10/etc/rc.d/nfsuserd ============================================================================== --- stable/10/etc/rc.d/nfsuserd Mon Dec 14 22:54:02 2015 (r292232) +++ stable/10/etc/rc.d/nfsuserd Mon Dec 14 23:09:02 2015 (r292233) @@ -15,5 +15,14 @@ command="/usr/sbin/${name}" sig_stop="USR1" load_rc_config $name +start_precmd="nfsuserd_precmd" + +nfsuserd_precmd() +{ + if checkyesno nfs_server_managegids; then + rc_flags="-manage-gids ${nfsuserd_flags}" + fi + return 0 +} run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512142309.tBEN93cv075445>