Fix the -s and -i flags and add support for the "implied_shell"

option.  If the user does not specify a command, sudo will now pass
in the path to the user's shell and set impied_shell=true.  The
plugin can them either check the command normally or return -2 to
cause sudo to print a usage message and exit.
This commit is contained in:
Todd C. Miller
2010-03-21 08:54:06 -04:00
parent 2e27226a0d
commit 6b180d24da
8 changed files with 284 additions and 190 deletions

View File

@@ -117,6 +117,7 @@ struct user_details {
const char *cwd;
const char *tty;
const char *host;
const char *shell;
GETGROUPS_T *groups;
int ngroups;
int ts_cols;
@@ -210,6 +211,9 @@ int exec_setup(struct command_details *details);
extern int debug_level;
extern struct plugin_container_list io_plugins;
/* parse_args.c */
void usage(int) __attribute__((__noreturn__));
#ifndef errno
extern int errno;
#endif