]> granicus.if.org Git - sudo/commitdiff
g/c pwcache_init/pwcache_destroy
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 5 Jan 2005 19:43:36 +0000 (19:43 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 5 Jan 2005 19:43:36 +0000 (19:43 +0000)
logging.c
sudo.c

index aad9dbdedb32167efa5bc36e70793319f3d5ce9d..c2db37045b6f96387e06c4e8897579b08c1630b0 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -493,7 +493,6 @@ send_mail(line)
                /* Close password, group and other fds so we don't leak. */
                sudo_endpwent();
                sudo_endgrent();
-               pwcache_destroy();
                closefrom(STDERR_FILENO + 1);
 
                /*
diff --git a/sudo.c b/sudo.c
index dec4bb961ba2e7f9f82e27f960614224dc22f60c..bc4ee70e8558f59b2b0589b5e4a93e3ebc0ab4b5 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -195,7 +195,6 @@ main(argc, argv, envp)
     initial_setup();
     sudo_setpwent();
     sudo_setgrent();
-    pwcache_init();
 
     /* Parse our arguments. */
     sudo_mode = parse_args(Argc, Argv);
@@ -409,7 +408,6 @@ main(argc, argv, envp)
        /* Close the password and group files */
        sudo_endpwent();
        sudo_endgrent();
-       pwcache_destroy();
 
        /* Install the real environment. */
        environ = new_environ;
@@ -1147,7 +1145,8 @@ get_authpw()
 void
 cleanup()
 {
-    pwcache_destroy();
+    sudo_endpwent();
+    sudo_endgrent();
 }
 
 /*