summaryrefslogtreecommitdiffstats
path: root/utils/statd
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-03-23 12:36:36 +1100
committerNeil Brown <neilb@suse.de>2007-03-23 12:36:36 +1100
commit03534540a25fe4c0679928a2f3f023e596c78dc4 (patch)
treeba5e349447180816f1abb81291090eb37da4b35b /utils/statd
parent4e5f91d9b9607f2c29ef42a131460f0b29f96974 (diff)
downloadnfs-utils-03534540a25fe4c0679928a2f3f023e596c78dc4.tar.gz
nfs-utils-03534540a25fe4c0679928a2f3f023e596c78dc4.tar.xz
nfs-utils-03534540a25fe4c0679928a2f3f023e596c78dc4.zip
statd - fix bug so statd can talk to kernel again.
We need to call statd_get_socket before dropping privileges so that we have a privileged port. We use to do that when initialising notification as the same socket was used for reboot notication as for callbacks to the kernel. Now it is a different socket..
Diffstat (limited to 'utils/statd')
-rw-r--r--utils/statd/statd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/statd/statd.c b/utils/statd/statd.c
index 22d5deb..6c5dbde 100644
--- a/utils/statd/statd.c
+++ b/utils/statd/statd.c
@@ -476,6 +476,8 @@ int main (int argc, char **argv)
waitpid(pid, NULL, 0);
}
+ /* Make sure we have a privilege port for calling into the kernel */
+ statd_get_socket();
for (;;) {
pmap_unset (SM_PROG, SM_VERS);