Bug 464

Summary: sudo compiled without io-logging enabled sends multiple signals to child
Product: Sudo Reporter: kbyanc
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.7.4   
Hardware: PC   
OS: Other   

Description kbyanc 2011-02-04 14:21:10 MST
If you compile sudo 1.7.4p6 without --with_iologdir, then sudo will deliver SIGINT (and possibly other signals) multiple times to the child process.

I suspect this is because, while the recvsig array is cleared in sudo_execve for the _PATH_SUDO_IO_LOGDIR case, it is never cleared when _PATH_SUDO_IO_LOGDIR is not defined.
Comment 1 kbyanc 2011-02-04 14:33:53 MST
I've verified that simply clearing recvsig[n] immediately after sending the signal to the child solves the problem.
Comment 2 Todd C. Miller 2011-02-05 11:20:53 MST
Sudo 1.7.5 handles signal delivery differently and does not have this problem.  If you'd like, you can the current beta, http://www.sudo.ws/sudo/dist/beta/sudo-1.7.5b3.tar.gz
Comment 3 Todd C. Miller 2011-03-03 09:51:59 MST
Fixed in sudo 1.7.5 and 1.8.0.