Bug 464 - sudo compiled without io-logging enabled sends multiple signals to child
sudo compiled without io-logging enabled sends multiple signals to child
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.4
PC Other
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-04 14:21 MST by kbyanc
Modified: 2011-03-03 09:51 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.