[sudo-users] Plugins and signal handlers

Todd C. Miller Todd.Miller at sudo.ws
Tue Mar 19 15:46:16 MDT 2019

On Tue, 19 Mar 2019 16:40:59 -0500, Bryan Christ wrote:

> No.  I could do that.  I just have to put checks in several places.
> And if I need to kill the sudo process itself, should I raise SIGTERM.
> would that be sufficient?

That should work in most cases.  Sudo will forward the signal to
the command and wait for it to exit.  However, if the command ignores
SIGTERM sudo will keep running.

However, it is better to just return 0 from the I/O logging plugin
log_* functions if you can.  That will cause sudo to kill the command
and exit.

 - todd

More information about the sudo-users mailing list