]> granicus.if.org Git - shadow/commitdiff
* src/su.c: (!USE_PAM) Provide visible information indicating that
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 23 Nov 2008 12:10:21 +0000 (12:10 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 23 Nov 2008 12:10:21 +0000 (12:10 +0000)
su was denied.

ChangeLog
src/su.c

index 3457e0a3a807687302627f74b5f6a634718ed1cf..4669e98556144e9a37d7987a8bb686bab419a4f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 084e33b15219d3b830d234befdd575c33b74922f..0a4aac3e8120a15af4f2af35c9d6b37200a46738 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -721,7 +721,8 @@ 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));
+                        "Authentication failed for %s", name));
+               fprintf(stderr, _("%s: Authentication failure\n"), Prog);
                su_failure (tty);
        }
        (void) signal (SIGQUIT, oldsig);
@@ -757,8 +758,10 @@ int main (int argc, char **argv)
        if (!amroot) {
                if (!isttytime (pwent.pw_name, "SU", time ((time_t *) 0))) {
                        SYSLOG (((0 != pwent.pw_uid) ? LOG_WARN : LOG_CRIT,
-                                "SU by %s to restricted account %s",
-                                oldname, name));
+                                "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);
                }
        }