sudo_sss_filter_user_netgroup(): fix comment typos, break out of loop

early if we match ALL or netgroup.
This commit is contained in:
Todd C. Miller
2013-12-03 15:47:45 -07:00
parent 302d3273a8
commit 9e964a8c0e

View File

@@ -595,8 +595,8 @@ sudo_sss_check_host(struct sudo_sss_handle *handle, struct sss_sudo_rule *rule)
* Look for netgroup specifcations in the sudoUser attribute and * Look for netgroup specifcations in the sudoUser attribute and
* if found, filter according to netgroup membership. * if found, filter according to netgroup membership.
* returns: * returns:
* true -> netgroup spec found && negroup member * true -> netgroup spec found && netgroup member
* false -> netgroup spec found && not a meber of netgroup * false -> netgroup spec found && not a member of netgroup
* true -> netgroup spec not found (filtered by SSSD already, netgroups are an exception) * true -> netgroup spec not found (filtered by SSSD already, netgroups are an exception)
*/ */
static bool static bool
@@ -631,7 +631,9 @@ sudo_sss_filter_user_netgroup(struct sudo_sss_handle *handle, struct sss_sudo_ru
if (strcmp(val, "ALL") == 0 || netgr_matches(val, NULL, NULL, handle->pw->pw_name)) { if (strcmp(val, "ALL") == 0 || netgr_matches(val, NULL, NULL, handle->pw->pw_name)) {
ret = true; ret = true;
sudo_debug_printf(SUDO_DEBUG_DIAG, sudo_debug_printf(SUDO_DEBUG_DIAG,
"sssd/ldap sudoUser '%s' ... MATCH! (%s)", val, handle->pw->pw_name); "sssd/ldap sudoUser '%s' ... MATCH! (%s)",
val, handle->pw->pw_name);
break;
} }
} }
handle->fn_free_values(val_array); handle->fn_free_values(val_array);