g/c pwcache_init/pwcache_destroy
This commit is contained in:
@@ -493,7 +493,6 @@ send_mail(line)
|
|||||||
/* Close password, group and other fds so we don't leak. */
|
/* Close password, group and other fds so we don't leak. */
|
||||||
sudo_endpwent();
|
sudo_endpwent();
|
||||||
sudo_endgrent();
|
sudo_endgrent();
|
||||||
pwcache_destroy();
|
|
||||||
closefrom(STDERR_FILENO + 1);
|
closefrom(STDERR_FILENO + 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
5
sudo.c
5
sudo.c
@@ -195,7 +195,6 @@ main(argc, argv, envp)
|
|||||||
initial_setup();
|
initial_setup();
|
||||||
sudo_setpwent();
|
sudo_setpwent();
|
||||||
sudo_setgrent();
|
sudo_setgrent();
|
||||||
pwcache_init();
|
|
||||||
|
|
||||||
/* Parse our arguments. */
|
/* Parse our arguments. */
|
||||||
sudo_mode = parse_args(Argc, Argv);
|
sudo_mode = parse_args(Argc, Argv);
|
||||||
@@ -409,7 +408,6 @@ main(argc, argv, envp)
|
|||||||
/* Close the password and group files */
|
/* Close the password and group files */
|
||||||
sudo_endpwent();
|
sudo_endpwent();
|
||||||
sudo_endgrent();
|
sudo_endgrent();
|
||||||
pwcache_destroy();
|
|
||||||
|
|
||||||
/* Install the real environment. */
|
/* Install the real environment. */
|
||||||
environ = new_environ;
|
environ = new_environ;
|
||||||
@@ -1147,7 +1145,8 @@ get_authpw()
|
|||||||
void
|
void
|
||||||
cleanup()
|
cleanup()
|
||||||
{
|
{
|
||||||
pwcache_destroy();
|
sudo_endpwent();
|
||||||
|
sudo_endgrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user