[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: small correctness fixes for nscd
From: |
Christopher Allen Wing |
Subject: |
Re: small correctness fixes for nscd |
Date: |
Tue, 29 Jan 2002 10:27:09 -0500 (EST) |
Ulrich:
Thank for for accepting the patches!
Did you mean to finish converting the use of perror() to error() in nscd?
--- glibc-2.2.5.orig/nscd/connections.c Sun Jan 20 22:21:53 2002
+++ glibc-2.2.5/nscd/connections.c Tue Jan 29 10:21:39 2002
@@ -588,8 +588,7 @@
if (pwd == NULL)
{
dbg_log (_("Failed to run nscd as user '%s'"), server_user);
- error (EXIT_FAILURE, 0, _("Failed to run nscd as user '%s'"),
- server_user);
+ error (EXIT_FAILURE, 0, _("getpwnam failed"));
}
server_uid = pwd->pw_uid;
@@ -627,14 +626,12 @@
if (setgid (server_gid) == -1)
{
dbg_log (_("Failed to run nscd as user '%s'"), server_user);
- perror ("setgid");
- exit (1);
+ error (EXIT_FAILURE, errno, _("setgid failed"));
}
if (setuid (server_uid) == -1)
{
dbg_log (_("Failed to run nscd as user '%s'"), server_user);
- perror ("setuid");
- exit (1);
+ error (EXIT_FAILURE, errno, _("setuid failed"));
}
}
(I originally used perror just to cut down on the need to maintain the
message catalogs)
Thanks again,
Chris Wing
address@hidden
On 17 Jan 2002, Ulrich Drepper wrote:
> Christopher Allen Wing <address@hidden> writes:
>
> > there are a few bugs in the nscd code for running nscd as a user other
> > than root:
>
> Thanks, the patch looks good. I've made a few cosmetic changes but
> nothing severe.
>
> --
> ---------------. ,-. 1325 Chesapeake Terrace
> Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
> Red Hat `--' drepper at redhat.com `------------------------