sudo Plugin API (Sudo Plugin API)
PLUGIN API CHANGELOG
The following revisions have been made to the Sudo Plugin API.
Version 1.0
Initial API version.
Version 1.1 (sudo 1.8.0)
The I/O logging plugin's open
() function was modified to take
the command_info list as an argument.
Version 1.2 (sudo 1.8.5)
The Policy and I/O logging plugins' open
() functions are now
passed a list of plugin parameters if any are specified in
sudo.conf(5).
A simple hooks API has been introduced to allow plugins to
hook in to the system's environment handling functions.
The init_session Policy plugin function is now passed a
pointer to the user environment which can be updated as
needed. This can be used to merge in environment variables
stored in the PAM handle before a command is run.
Version 1.3 (sudo 1.8.7)
Support for the exec_background entry has been added to the
command_info list.
The max_groups and plugin_dir entries were added to the
settings list.
The version
() and close
() functions are now optional.
Previously, a missing version
() or close
() function would
result in a crash. If no policy plugin close
() function is
defined, a default close
() function will be provided by the
sudo
front end that displays a warning if the command could
not be executed.
The sudo
front end now installs default signal handlers to
trap common signals while the plugin functions are run.
Version 1.4 (sudo 1.8.8)
The remote_host entry was added to the settings list.
Version 1.5 (sudo 1.8.9)
The preserve_fds entry was added to the command_info list.
Version 1.6 (sudo 1.8.11)
The behavior when an I/O logging plugin returns an error (-1)
has changed. Previously, the sudo
front end took no action
when the log_ttyin
(), log_ttyout
(), log_stdin
(),
log_stdout
(), or log_stderr
() function returned an error.
The behavior when an I/O logging plugin returns 0 has
changed. Previously, output from the command would be
displayed to the terminal even if an output logging function
returned 0.
Version 1.7 (sudo 1.8.12)
The plugin_path entry was added to the settings list.
The debug_flags entry now starts with a debug file path name
and may occur multiple times if there are multiple plugin-
specific Debug lines in the sudo.conf(5) file.
Version 1.8 (sudo 1.8.15)
The sudoedit_checkdir and sudoedit_follow entries were added
to the command_info list. The default value of
sudoedit_checkdir was changed to true in sudo 1.8.16.
The sudo conversation function now takes a pointer to a
struct sudo_conv_callback as its fourth argument. The
sudo_conv_t definition has been updated to match. The plugin
must specify that it supports plugin API version 1.8 or
higher to receive a conversation function pointer that
supports this argument.
Version 1.9 (sudo 1.8.16)
The execfd entry was added to the command_info list.
Version 1.10 (sudo 1.8.19)
The umask entry was added to the user_info list. The
iolog_group, iolog_mode, and iolog_user entries were added to
the command_info list.
Version 1.11 (sudo 1.8.20)
The timeout entry was added to the settings list.
Version 1.12 (sudo 1.8.21)
The change_winsize field was added to the io_plugin struct.
Version 1.13 (sudo 1.8.26)
The log_suspend field was added to the io_plugin struct.
Version 1.14 (sudo 1.8.29)
The umask_override entry was added to the command_info list.
Version 1.15 (sudo 1.9.0)
The cwd_optional entry was added to the command_info list.
The event_alloc field was added to the policy_plugin and
io_plugin structs.
The errstr argument was added to the policy and I/O plugin
functions which the plugin function can use to return an
error string. This string may be used by the audit plugin to
report failure or error conditions set by the other plugins.
The close
() function is now is called regardless of whether
or not a command was actually executed. This makes it
possible for plugins to perform cleanup even when a command
was not run.
SUDO_CONV_REPL_MAX has increased from 255 to 1023 bytes.
Support for audit and approval plugins was added.
Version 1.16 (sudo 1.9.3)
Initial resource limit values were added to the user_info
list.
The cmnd_chroot and cmnd_cwd enties were added to the
settings list.
Version 1.17 (sudo 1.9.4)
The event_alloc field was added to the audit_plugin and
approval_plugin structs.