]> granicus.if.org Git - shadow/commitdiff
* src/su.c: Close the password databases together with syslog.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:27:17 +0000 (18:27 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:27:17 +0000 (18:27 +0000)
ChangeLog
src/su.c

index 9f00f94dea482bd09f8434efd89c3a2fdbeeaa6e..d4c6c99b63c6ad671e7dc234c666ac6034e9f8e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
        * src/su.c: Cleanup check_perms_nopam().
        * src/su.c: Merge environment setting blocks after the creation of
        the session.
+       * src/su.c: Close the password databases together with syslog.
 
 2011-06-10  Nicolas François  <nicolas.francois@centraliens.net>
 
index 3ec46c4798fc990bc7fbd84bfd860b178df01e7f..121b95766b85bb151adf0f490b363c421dd0de03 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -868,8 +868,6 @@ int main (int argc, char **argv)
        }
 
        sulog (caller_tty, true, caller_name, name);    /* save SU information */
-       endpwent ();
-       endspent ();
 #ifdef USE_SYSLOG
        if (getdef_bool ("SYSLOG_SU_ENAB")) {
                SYSLOG ((LOG_INFO, "+ %s %s:%s", caller_tty,
@@ -1034,6 +1032,8 @@ int main (int argc, char **argv)
                }
        }
 
+       endpwent ();
+       endspent ();
        /*
         * This is a workaround for Linux libc bug/feature (?) - the
         * /dev/log file descriptor is open without the close-on-exec flag