Reduce a level of indent by a few placed continue statements.

This commit is contained in:
Todd C. Miller
2007-07-06 00:21:16 +00:00
parent 7f0bb4b1a8
commit 45b311cfa8

View File

@@ -273,29 +273,28 @@ main(argc, argv)
printf("\nEntries for user %s:\n", user_name); printf("\nEntries for user %s:\n", user_name);
matched = UNSPEC; matched = UNSPEC;
for (us = userspecs; us != NULL; us = us->next) { for (us = userspecs; us != NULL; us = us->next) {
if (user_matches(sudo_user.pw, us->user) == TRUE) { if (user_matches(sudo_user.pw, us->user) != TRUE)
for (priv = us->privileges; priv != NULL; priv = priv->next) { continue;
putchar('\n'); for (priv = us->privileges; priv != NULL; priv = priv->next) {
print_privilege(priv); putchar('\n');
putchar('\n'); print_privilege(priv);
if (host_matches(priv->hostlist) == TRUE) { putchar('\n');
puts("\thost matched"); if (host_matches(priv->hostlist) == TRUE) {
runas = NULL; puts("\thost matched");
for (cs = priv->cmndlist; cs != NULL; cs = cs->next) { runas = NULL;
if (cs->runaslist != NULL) for (cs = priv->cmndlist; cs != NULL; cs = cs->next) {
runas = cs->runaslist; if (cs->runaslist != NULL)
if (runas_matches(runas) == TRUE) { runas = cs->runaslist;
puts("\trunas matched"); if (runas_matches(runas) == TRUE) {
rval = cmnd_matches(cs->cmnd); puts("\trunas matched");
if (rval != UNSPEC) rval = cmnd_matches(cs->cmnd);
matched = rval; if (rval != UNSPEC)
printf("\tcmnd %s\n", rval == ALLOW ? "allowed" : matched = rval;
rval == DENY ? "denied" : "unmatched"); printf("\tcmnd %s\n", rval == ALLOW ? "allowed" :
} rval == DENY ? "denied" : "unmatched");
} }
} else }
puts("\thost unmatched"); } else puts("\thost unmatched");
}
} }
} }
printf("\nCommand %s\n", matched == TRUE ? "allowed" : printf("\nCommand %s\n", matched == TRUE ? "allowed" :