Reduce a level of indent by a few placed continue statements.
This commit is contained in:
@@ -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" :
|
||||||
|
Reference in New Issue
Block a user