]> granicus.if.org Git - sudo/commitdiff
Set RUNAS_USER_SPECIFIED when -u is specified and/or RUNAS_GROUP_SPECIFIED
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Sep 2016 19:16:38 +0000 (13:16 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Sep 2016 19:16:38 +0000 (13:16 -0600)
when -g is specified.

plugins/sudoers/testsudoers.c

index fdf45bc1518e10dc484872a09cfdc740fdb3f3e5..30e09232024891e3e4fecc105c66f8c1286eca4e 100644 (file)
@@ -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();