aboutsummaryrefslogtreecommitdiff
path: root/nscd/connections.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-06-20 15:49:08 +0000
committerUlrich Drepper <drepper@redhat.com>2005-06-20 15:49:08 +0000
commit64d64de628376b21e8eb29bdc9ef6a3651793aef (patch)
treee91fa4027fe4402d6359129f26f43081d579267a /nscd/connections.c
parent24c709d1af1d603e310645b1305bb77448d69e20 (diff)
downloadglibc-64d64de628376b21e8eb29bdc9ef6a3651793aef.tar
glibc-64d64de628376b21e8eb29bdc9ef6a3651793aef.tar.gz
glibc-64d64de628376b21e8eb29bdc9ef6a3651793aef.tar.bz2
glibc-64d64de628376b21e8eb29bdc9ef6a3651793aef.zip
* nscd/nscd.init: Get more in line with lsb3.cvs/fedora-glibc-20050620T1530cvs/fedora-glibc-20050620T1522
* nscd/nscd.c: Adjust some error codes to fit in better with lsb3. * nscd/connections.c: Likewise.
Diffstat (limited to 'nscd/connections.c')
-rw-r--r--nscd/connections.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index 706d657d49..8179cb237d 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -207,7 +207,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
@@ -512,7 +512,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;
@@ -521,7 +521,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. */
@@ -1607,13 +1607,13 @@ 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);
}
}