]> granicus.if.org Git - shadow/commitdiff
* src/su.c: Too much const were added on 2011-08-15. pw in
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 Sep 2011 17:47:03 +0000 (17:47 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 Sep 2011 17:47:03 +0000 (17:47 +0000)
save_caller_context() is allocated and freed.
* src/su.c: Added missing #endif indication
* src/su.c save_caller_context(): password only needed if
SU_ACCESS and !USE_PAM.

ChangeLog
src/su.c

index 5f3d453204ec4935197d9b6194caabb53a007eac..83d779839e7113abd8c7faea7a3f3c7653fe00bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-09-18  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/su.c: Too much const were added on 2011-08-15. pw in
+       save_caller_context() is allocated and freed.
+       * src/su.c: Added missing #endif indication
+       * src/su.c save_caller_context(): password only needed if
+       SU_ACCESS and !USE_PAM.
+
 2011-09-18  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/usermod.c: date_to_str() is always called with negativ set
@@ -81,7 +89,7 @@
 
        * src/su.c: Add splint annotations.
        * src/su.c: Set caller_on_console as boolean.
-       * src/su.c: Ignore retunr value from fputs (usage) / puts (prompt).
+       * src/su.c: Ignore return value from fputs (usage) / puts (prompt).
        * src/su.c: Improved memory management.
 
 2011-08-14  Nicolas François  <nicolas.francois@centraliens.net>
index c1914d32ff9f76b2e73514a5d523c6a79988e078..c8815e08d776d6f9ca6e95214fea98dd28b4faaa 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -654,8 +654,12 @@ static /*@only@*/struct passwd * check_perms (void)
  */
 static void save_caller_context (char **argv)
 {
-       const struct passwd *pw = NULL;
+       struct passwd *pw = NULL;
+#ifndef USE_PAM
+#ifdef SU_ACCESS
        const char *password = NULL;
+#endif                         /* SU_ACCESS */
+#endif                         /* !USE_PAM */
        /*
         * Get the program name. The program name is used as a prefix to
         * most error messages.
@@ -673,7 +677,7 @@ static void save_caller_context (char **argv)
        if ((isatty (0) != 0) && (NULL != caller_tty)) {
 #ifndef USE_PAM
                caller_on_console = console (caller_tty);
-#endif
+#endif                         /* !USE_PAM */
        } else {
                /*
                 * Be more paranoid, like su from SimplePAMApps.  --marekm