When checking for unused Runas_Aliases, count those used as part

of a Runas Group too.  Fixes a false positive warning.
This commit is contained in:
Todd C. Miller
2013-10-04 16:22:25 -06:00
parent e223df6908
commit 020fb00948

View File

@@ -1202,6 +1202,12 @@ check_aliases(bool strict, bool quiet)
errors++; 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 ((m = cs->cmnd)->type == ALIAS) {
if (!alias_remove_recursive(m->name, CMNDALIAS)) if (!alias_remove_recursive(m->name, CMNDALIAS))
errors++; errors++;