2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-02 23:35:36 +00:00

On SIGHUP, deregister the old debug instance before registering a new one.

Otherwise, if debugging is enabled we will get an extra log instance
each time sudo_logsrvd reeives SIGHUP which results in duplicate
lines in the debug log.
This commit is contained in:
Todd C. Miller
2020-11-10 19:36:55 -07:00
parent 72df19088b
commit deb217adf9
3 changed files with 91 additions and 23 deletions

View File

@@ -137,6 +137,7 @@ sudo_debug_free_output(struct sudo_debug_output *output)
/*
* Create a new output file for the specified debug instance.
* Returns NULL if the file cannot be opened or memory cannot be allocated.
* XXX - check for duplicates
*/
static struct sudo_debug_output *
sudo_debug_new_output(struct sudo_debug_instance *instance,