add RUNAS_DEFAULT
This commit is contained in:
4
OPTIONS
4
OPTIONS
@@ -1,5 +1,9 @@
|
||||
The following options may be used to configure sudo 1.4
|
||||
|
||||
RUNAS_DEFAULT
|
||||
The default user to run commands as if the -u flag is not specified
|
||||
on the command line. This defaults to "root".
|
||||
|
||||
FQDN
|
||||
Define this if you want to put fully qualified hostnames in the sudoers
|
||||
file. Ie: instead of myhost you would use myhost.mydomain.edu.
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
/* User-configurable Sudo runtime options */
|
||||
|
||||
#define RUNAS_DEFAULT "root" /* default user to run cmd as if no -u flag */
|
||||
/*#define FQDN /* expect fully qualified hosts in sudoers */
|
||||
#define LOGGING SLOG_SYSLOG /* log via SLOG_SYSLOG, SLOG_FILE, SLOG_BOTH */
|
||||
#define LOGFAC LOG_LOCAL2 /* syslog facility for sudo to use */
|
||||
|
@@ -308,7 +308,7 @@ opcmnd : cmnd { ; }
|
||||
;
|
||||
|
||||
runasspec : /* empty */ {
|
||||
$$ = (strcmp("root", runas_user) == 0);
|
||||
$$ = (strcmp(RUNAS_DEFAULT, runas_user) == 0);
|
||||
}
|
||||
| RUNAS runaslist {
|
||||
$$ = $2;
|
||||
|
2
sudo.c
2
sudo.c
@@ -141,7 +141,7 @@ char **Argv;
|
||||
int NewArgc = 0;
|
||||
char **NewArgv = NULL;
|
||||
struct passwd *user_pw_ent;
|
||||
char *runas_user = "root";
|
||||
char *runas_user = RUNAS_DEFAULT;
|
||||
char *cmnd = NULL;
|
||||
char *cmnd_args = NULL;
|
||||
char *tty = "unknown";
|
||||
|
@@ -78,7 +78,7 @@ extern int num_interfaces;
|
||||
|
||||
char *cmnd = NULL;
|
||||
char *cmnd_args = NULL;
|
||||
char *runas_user = "root";
|
||||
char *runas_user = RUNAS_DEFAULT;
|
||||
char host[MAXHOSTNAMELEN];
|
||||
char *shost;
|
||||
char cwd[MAXPATHLEN];
|
||||
|
Reference in New Issue
Block a user