* src/chfn.c, src/chsh.c, src/expiry.c, src/gpasswd.c,

src/newgrp.c, src/passwd.c, src/su.c: Use the same stderr and
	syslog warnings when the username cannot be determined.
	* src/newgrp.c: Reuse the same stderr message for groups which do
	not exist in the system.
This commit is contained in:
nekral-guest
2008-08-30 18:27:07 +00:00
parent 307f703b99
commit 38a50366bc
8 changed files with 31 additions and 8 deletions

View File

@ -468,7 +468,10 @@ int main (int argc, char **argv)
*/
pw = get_my_pwent ();
if (NULL == pw) {
SYSLOG ((LOG_CRIT, "Unknown UID: %u", my_uid));
fprintf (stderr, _("%s: Cannot determine your user name.\n"),
Prog);
SYSLOG ((LOG_WARN, "Cannot determine the user name of the caller (UID %lu)",
(unsigned long) my_uid));
su_failure (tty);
}
STRFCPY (oldname, pw->pw_name);