diff options
Diffstat (limited to 'nscd/connections.c')
-rw-r--r-- | nscd/connections.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 818de977d5..a9cdbd4cd8 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -209,7 +209,7 @@ nscd_init (void) if (server_user != NULL && secure_in_use) { dbg_log (_("Cannot run nscd in secure mode as unprivileged user")); - exit (1); + exit (4); } /* Look up unprivileged uid/gid/groups before we start listening on the @@ -514,7 +514,7 @@ cannot set socket to close on exec: %s; disabling paranoia mode"), if (sock < 0) { dbg_log (_("cannot open socket: %s"), strerror (errno)); - exit (1); + exit (errno == EACCES ? 4 : 1); } /* Bind a name to the socket. */ struct sockaddr_un sock_addr; @@ -523,7 +523,7 @@ cannot set socket to close on exec: %s; disabling paranoia mode"), if (bind (sock, (struct sockaddr *) &sock_addr, sizeof (sock_addr)) < 0) { dbg_log ("%s: %s", _PATH_NSCDSOCKET, strerror (errno)); - exit (1); + exit (errno == EACCES ? 4 : 1); } /* We don't want to get stuck on accept. */ @@ -1628,14 +1628,14 @@ finish_drop_privileges (void) { dbg_log (_("Failed to run nscd as user '%s'"), server_user); perror ("setgid"); - exit (1); + exit (4); } if (setuid (server_uid) == -1) { dbg_log (_("Failed to run nscd as user '%s'"), server_user); perror ("setuid"); - exit (1); + exit (4); } } |