]> granicus.if.org Git - sudo/commitdiff
When checking for unused Runas_Aliases, count those used as part
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 4 Oct 2013 22:22:25 +0000 (16:22 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 4 Oct 2013 22:22:25 +0000 (16:22 -0600)
of a Runas Group too.  Fixes a false positive warning.

plugins/sudoers/visudo.c

index 2851ced1f0fb83c38c278bcb70d6614de1b59313..4d788e7a6e92c4149861c6e4601c5b0b38fd2e5f 100644 (file)
@@ -1202,6 +1202,12 @@ check_aliases(bool strict, bool quiet)
                            errors++;
                    }
                }
+               tq_foreach_fwd(&cs->runasgrouplist, m) {
+                   if (m->type == ALIAS) {
+                       if (!alias_remove_recursive(m->name, RUNASALIAS))
+                           errors++;
+                   }
+               }
                if ((m = cs->cmnd)->type == ALIAS) {
                    if (!alias_remove_recursive(m->name, CMNDALIAS))
                        errors++;