* src/su.c: (!USE_PAM) Provide visible information indicating that

su was denied.
This commit is contained in:
nekral-guest 2008-11-23 12:10:21 +00:00
parent 0667aee3cc
commit 93358ac3de
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-11-23 Nicolas François <nicolas.francois@centraliens.net>
* src/su.c: (!USE_PAM) Provide visible information indicating that
su was denied.
2008-11-23 Nicolas François <nicolas.francois@centraliens.net>
* man/su.1.xml: Fix the su synopsis. username is referenced in the

View File

@ -722,6 +722,7 @@ int main (int argc, char **argv)
if (!amroot && pw_auth (pwent.pw_passwd, name, PW_SU, (char *) 0)) {
SYSLOG ((pwent.pw_uid ? LOG_NOTICE : LOG_WARN,
"Authentication failed for %s", name));
fprintf(stderr, _("%s: Authentication failure\n"), Prog);
su_failure (tty);
}
(void) signal (SIGQUIT, oldsig);
@ -759,6 +760,8 @@ int main (int argc, char **argv)
SYSLOG (((0 != pwent.pw_uid) ? LOG_WARN : LOG_CRIT,
"SU by %s to restricted account %s",
oldname, name));
fprintf(stderr,
_("%s: You are not authorized to su at that time\n"), Prog);
su_failure (tty);
}
}