Defer call to sudo_nonunix_groupcheck_cleanup() until after we have
closed the sudoers sources. From Quest sudo.
This commit is contained in:
@@ -381,11 +381,6 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USING_NONUNIX_GROUPS
|
|
||||||
/* Finished with the groupcheck code */
|
|
||||||
sudo_nonunix_groupcheck_cleanup();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (safe_cmnd == NULL)
|
if (safe_cmnd == NULL)
|
||||||
safe_cmnd = estrdup(user_cmnd);
|
safe_cmnd = estrdup(user_cmnd);
|
||||||
|
|
||||||
@@ -534,6 +529,11 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
|
|||||||
nss->close(nss);
|
nss->close(nss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USING_NONUNIX_GROUPS
|
||||||
|
/* Finished with the groupcheck code */
|
||||||
|
sudo_nonunix_groupcheck_cleanup();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ISSET(sudo_mode, (MODE_VALIDATE|MODE_CHECK|MODE_LIST)))
|
if (ISSET(sudo_mode, (MODE_VALIDATE|MODE_CHECK|MODE_LIST)))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
@@ -1139,6 +1139,9 @@ cleanup(int gotsignal)
|
|||||||
tq_foreach_fwd(snl, nss)
|
tq_foreach_fwd(snl, nss)
|
||||||
nss->close(nss);
|
nss->close(nss);
|
||||||
}
|
}
|
||||||
|
#ifdef USING_NONUNIX_GROUPS
|
||||||
|
sudo_nonunix_groupcheck_cleanup();
|
||||||
|
#endif
|
||||||
sudo_endpwent();
|
sudo_endpwent();
|
||||||
sudo_endgrent();
|
sudo_endgrent();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user