]> granicus.if.org Git - sudo/commitdiff
Don't print an empty user list as ALL.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Tue, 6 Mar 2018 21:38:17 +0000 (14:38 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Tue, 6 Mar 2018 21:38:17 +0000 (14:38 -0700)
plugins/sudoers/testsudoers.c

index 4982a501d96c037b691121f19bbe723bb062ff04..cf7785044111de561b7012460011f935ab2c3c01 100644 (file)
@@ -487,10 +487,10 @@ print_member(struct member *m)
 
     if (m->negated)
        putchar('!');
-    if (m->name == NULL)
+    if (m->type == ALL)
        fputs("ALL", stdout);
     else if (m->type != COMMAND)
-       fputs(m->name, stdout);
+       fputs(m->name ? m->name : "", stdout);
     else {
        c = (struct sudo_command *) m->name;
        printf("%s%s%s", c->cmnd, c->args ? " " : "",