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:
@@ -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
|
||||
|
Reference in New Issue
Block a user