Initial cut at a hooks implementation. The plugin can register

hooks for getenv, putenv, setenv and unsetenv.  This makes it
possible for the plugin to trap changes to the environment made by
authentication methods such as PAM or BSD auth so that such changes
are reflected in the environment passed back to sudo for execve().
This commit is contained in:
Todd C. Miller
2012-03-07 16:35:42 -05:00
parent 1504256134
commit 37770ecf1e
24 changed files with 1086 additions and 282 deletions

View File

@@ -68,6 +68,7 @@
#define SUDO_DEBUG_RBTREE (22<<4) /* red-black tree functions */
#define SUDO_DEBUG_PERMS (23<<4) /* uid/gid swapping functions */
#define SUDO_DEBUG_PLUGIN (24<<4) /* main plugin functions */
#define SUDO_DEBUG_HOOKS (25<<4) /* hook functions */
#define SUDO_DEBUG_ALL 0xfff0 /* all subsystems */
/* Extract priority and convert to an index. */