Do not error out if arg to -U option cannot be resolved, that is for

the plugin to decide.
There is no need for runas_user and runas_group to be global, make
them local to parse_args() instead.
This commit is contained in:
Todd C. Miller
2013-07-16 14:04:23 -06:00
parent e53e80187d
commit b4e1f7c446
3 changed files with 4 additions and 4 deletions

View File

@@ -129,6 +129,8 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
int valid_flags, ch;
int i, j;
char *cp, **env_add, **settings;
const char *runas_user = NULL;
const char *runas_group = NULL;
const char *debug_flags;
int nenv = 0;
int env_size = 32;
@@ -282,8 +284,6 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
SET(flags, MODE_SHELL);
break;
case 'U':
if ((getpwnam(optarg)) == NULL)
fatalx(_("unknown user: %s"), optarg);
list_user = optarg;
break;
case 'u':