]> granicus.if.org Git - sudo/commitdiff
sudo_sss_filter_user_netgroup(): fix comment typos, break out of loop
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 3 Dec 2013 22:47:45 +0000 (15:47 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 3 Dec 2013 22:47:45 +0000 (15:47 -0700)
early if we match ALL or netgroup.

plugins/sudoers/sssd.c

index d73546b121e51904ca697a1c50db586643dda6fc..a04bd91ab5581a9ddab56833929240f5046bff33 100644 (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
  * if found, filter according to netgroup membership.
  *  returns:
- *   true -> netgroup spec found && negroup member
- *  false -> netgroup spec found && not a meber of netgroup
+ *   true -> netgroup spec found && netgroup member
+ *  false -> netgroup spec found && not a member of netgroup
  *   true -> netgroup spec not found (filtered by SSSD already, netgroups are an exception)
  */
 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)) {
            ret = true;
            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);