Do not allow the same callback function to be registered more that
once in fatal_callback_register(). Add fatal_callback_deregister() to deregister a callback.
This commit is contained in:
@@ -576,6 +576,9 @@ sudoers_policy_close(int exit_status, int error_code)
|
||||
if (ISSET(sudo_mode, MODE_RUN|MODE_EDIT))
|
||||
(void)sudo_auth_end_session(runas_pw);
|
||||
|
||||
/* Deregister the callback for fatal()/fatalx(). */
|
||||
fatal_callback_deregister(sudoers_cleanup);
|
||||
|
||||
/* Free remaining references to password and group entries. */
|
||||
/* XXX - move cleanup to function in sudoers.c */
|
||||
sudo_pw_delref(sudo_user.pw);
|
||||
|
Reference in New Issue
Block a user