summaryrefslogtreecommitdiffstats
path: root/utils/idmapd/idmapd.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/idmapd/idmapd.c')
-rw-r--r--utils/idmapd/idmapd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index b690e21..9cbe96c 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -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;