summaryrefslogtreecommitdiffstats
path: root/utils/gssd/gssd.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-04-27 13:06:55 -0400
committerSteve Dickson <steved@redhat.com>2016-04-27 13:24:40 -0400
commit31ca7d4f6aaa799fce013ea1d6ab3a44bf4baa9e (patch)
treed6f2e9c1671113d01e7334df9099eec192a20155 /utils/gssd/gssd.c
parent4ac4b4f74dcec30dcb23aab827eed152db08daea (diff)
downloadnfs-utils-31ca7d4f6aaa799fce013ea1d6ab3a44bf4baa9e.tar.gz
nfs-utils-31ca7d4f6aaa799fce013ea1d6ab3a44bf4baa9e.tar.xz
nfs-utils-31ca7d4f6aaa799fce013ea1d6ab3a44bf4baa9e.zip
mount: run START_STATD fully as root
If a "user" mount is the first NFSv3 mount, mount.nfs will be running setuid to root (with non-root as the real-uid) when it executes START_STATD. start-statd is a shell script and many shells refuse to run setuid, dropping privileges immediately. This results in start-statd running as an unprivileged user and so statd fails to start. To fix this, call "setuid(0)" to set real uid to zero. Also call "setgid(0)" for consistency. The behaviour of a shell can often be affected by the environment, such as the "shell functions" that bash includes from the environment. To avoid the user being able to pass such environment to the shell, explicitly pass an empty environment. The start-statd script explicitly sets the PATH which is all it really needs. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/gssd.c')
0 files changed, 0 insertions, 0 deletions