aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nscd/nscd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 7dd9cb7..a7aa964 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -240,7 +240,9 @@ main (int argc, char **argv)
setsid ();
- chdir ("/");
+ if (chdir ("/") != 0)
+ error (EXIT_FAILURE, errno,
+ _("cannot change current working cirectory to \"/\""));
openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);