From 250dbae681c3bd589f2fe52871b0c3611f72b87f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 20 Nov 2013 13:55:50 -0500 Subject: gssd: don't let parent exit until child has a chance to scan directory once With some proposed kernel changes, it won't even attempt to upcall sometimes if it doesn't appear that gssd is running. This means that we have a theoretical race between gssd starting up at boot time and the init process attempting to mount kerberized filesystems. Fix this by switching gssd to use mydaemon() and having the child only release the parent after it has processed the directory once. Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson --- utils/gssd/gssd_main_loop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils/gssd/gssd_main_loop.c') diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c index ccf7fe5..9970028 100644 --- a/utils/gssd/gssd_main_loop.c +++ b/utils/gssd/gssd_main_loop.c @@ -53,6 +53,7 @@ #include "gssd.h" #include "err_util.h" +#include "nfslib.h" extern struct pollfd *pollarray; extern unsigned long pollsize; @@ -245,6 +246,9 @@ gssd_run() /* Error msg is already printed */ exit(1); } + + /* release the parent after the initial dir scan */ + release_parent(pipefds); } gssd_poll(pollarray, pollsize); } -- cgit