X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fidmapd%2Fidmapd.c;h=65a6a2a2ef413e116357d209f8bbdd2e3cdf7f2d;hb=1a9010602442f466d700fbc4d64fe82ac69b1dd3;hp=b690e21fae9697a4e9ec6d0dc5221759576cacb3;hpb=3724317e223d46908aac2405bbd73ea2de4f36e5;p=nfs-utils.git diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c index b690e21..65a6a2a 100644 --- a/utils/idmapd/idmapd.c +++ b/utils/idmapd/idmapd.c @@ -66,7 +66,7 @@ #endif /* HAVE_CONFIG_H */ #include "xlog.h" -#include "cfg.h" +#include "conffile.h" #include "queue.h" #include "nfslib.h" @@ -156,7 +156,7 @@ static char *nobodyuser, *nobodygroup; static uid_t nobodyuid; static gid_t nobodygid; -/* Used by cfg.c */ +/* Used by conffile.c in libnfs.a */ char *conf_path; static int @@ -978,9 +978,12 @@ mydaemon(int nochdir, int noclose) dup2(tempfd, 0); dup2(tempfd, 1); dup2(tempfd, 2); - closeall(3); - } else - closeall(0); + close(tempfd); + } else { + err(1, "mydaemon: can't open /dev/null: errno %d", + errno); + exit(1); + } } return;