From: Todd C. Miller Date: Wed, 5 Jan 2005 19:43:36 +0000 (+0000) Subject: g/c pwcache_init/pwcache_destroy X-Git-Tag: SUDO_1_7_0~751 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfccf1933885e7b2330d798e71464c3a4adb8414;p=sudo g/c pwcache_init/pwcache_destroy --- diff --git a/logging.c b/logging.c index aad9dbded..c2db37045 100644 --- 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 dec4bb961..bc4ee70e8 100644 --- 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(); } /*