]> git.decadent.org.uk Git - nfs-utils.git/commit
mydaemon: remove closeall() calls from mydaemon()
authorSteve Dickson <steved@redhat.com>
Mon, 29 Jun 2009 14:44:20 +0000 (10:44 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 29 Jun 2009 14:44:20 +0000 (10:44 -0400)
commit1aa4121ba599de836702d7b2d38cad63e6a09044
treea75fb1475e690378125748180da37d37b4d02a3e
parent097128d72d1ab4be299bf5fdc0b8e83667fc159b
mydaemon: remove closeall() calls from mydaemon()

idmapd and svcgssd have a mydaemon() routine that uses closeall() to
close file descriptors. Unfortunately, they aren't using it correctly
and it ends up closing the pipe that the child process uses to talk to
its parent.

Fix this by not using closeall() in this routine and instead, just close
the file descriptors that we know need to be closed. If /dev/null can't
be opened for some reason, then just have the child exit with a non-zero
error.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/svcgssd.c
utils/idmapd/idmapd.c