From: Todd C. Miller Date: Thu, 15 Sep 2016 19:16:38 +0000 (-0600) Subject: Set RUNAS_USER_SPECIFIED when -u is specified and/or RUNAS_GROUP_SPECIFIED X-Git-Tag: SUDO_1_8_18^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a750bebf105f0ea659e2066e6d77619f662882a6;p=sudo Set RUNAS_USER_SPECIFIED when -u is specified and/or RUNAS_GROUP_SPECIFIED when -g is specified. --- diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c index fdf45bc15..30e092320 100644 --- a/plugins/sudoers/testsudoers.c +++ b/plugins/sudoers/testsudoers.c @@ -154,6 +154,7 @@ main(int argc, char *argv[]) break; case 'g': runas_group = optarg; + SET(sudo_user.flags, RUNAS_GROUP_SPECIFIED); break; case 'p': pwfile = optarg; @@ -171,6 +172,7 @@ main(int argc, char *argv[]) break; case 'u': runas_user = optarg; + SET(sudo_user.flags, RUNAS_USER_SPECIFIED); break; default: usage();