Document signal handler behavior in plugin API 1.3

This commit is contained in:
Todd C. Miller
2013-01-17 15:13:32 -05:00
parent 855a11af2b
commit 872e168836
3 changed files with 140 additions and 0 deletions

View File

@@ -1069,6 +1069,29 @@ DDEESSCCRRIIPPTTIIOONN
Same as for the _P_o_l_i_c_y _p_l_u_g_i_n _A_P_I.
SSiiggnnaall hhaannddlleerrss
The ssuuddoo front end installs default signal handlers to trap common
signals while the plugin functions are run. The following signals are
trapped by default before the command is executed:
oo SIGALRM
oo SIGHUP
oo SIGINT
oo SIGQUIT
oo SIGTERM
oo SIGTSTP
oo SIGUSR1
oo SIGUSR2
If a fatal signal is received before the command is executed, ssuuddoo will
call the plugin's cclloossee() function with an exit status of 128 plus the
value of the signal that was received. This allows for consistent
logging of commands killed by a signal for plugins that log such
information in their cclloossee() function.
A plugin may temporarily install its own signal handlers but must restore
the original handler before the plugin function returns.
HHooookk ffuunnccttiioonn AAPPII
Beginning with plugin API version 1.2, it is possible to install hooks
for certain functions called by the ssuuddoo front end.
@@ -1388,6 +1411,13 @@ PPLLUUGGIINN AAPPII CCHHAANNGGEELLOOGG
used to merge in environment variables stored in the PAM handle
before a command is run.
Version 1.3
Support for the _e_x_e_c___b_a_c_k_g_r_o_u_n_d entry has been added to the
command_info list.
The ssuuddoo front end now installs default signal handlers to trap
common signals while the plugin functions are run.
SSEEEE AALLSSOO
sudoers(4), sudo(1m)