* 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:
@@ -851,12 +851,15 @@ int main (int argc, char **argv)
|
||||
|
||||
pw = get_my_pwent ();
|
||||
if (NULL == pw) {
|
||||
fputs (_("Who are you?\n"), stderr);
|
||||
fprintf (stderr, _("%s: Cannot determine your user name.\n"),
|
||||
Prog);
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||
"user lookup",
|
||||
NULL, (unsigned int) bywho, 0);
|
||||
#endif
|
||||
SYSLOG ((LOG_WARN, "Cannot determine the user name of the caller (UID %lu)",
|
||||
(unsigned long) getuid ()));
|
||||
failure ();
|
||||
}
|
||||
myname = xstrdup (pw->pw_name);
|
||||
|
||||
Reference in New Issue
Block a user