use strcmp, not strcasecmp when comparing ALL

This commit is contained in:
Todd C. Miller
2007-11-21 18:26:59 +00:00
parent 6751e9a9cd
commit 4a39e1bebe

4
ldap.c
View File

@@ -183,7 +183,7 @@ sudo_ldap_check_host(ld, entry)
/* walk through values */ /* walk through values */
for (p = v; p && *p && !ret; p++) { for (p = v; p && *p && !ret; p++) {
/* match any or address or netgroup or hostname */ /* match any or address or netgroup or hostname */
if (!strcasecmp(*p, "ALL") || addr_matches(*p) || if (!strcmp(*p, "ALL") || addr_matches(*p) ||
netgr_matches(*p, user_host, user_shost, NULL) || netgr_matches(*p, user_host, user_shost, NULL) ||
!hostname_matches(user_shost, user_host, *p)) !hostname_matches(user_shost, user_host, *p))
ret = TRUE; ret = TRUE;
@@ -291,7 +291,7 @@ sudo_ldap_check_command(ld, entry, setenv_ok)
for (p = v; p && *p && ret >= 0; p++) { for (p = v; p && *p && ret >= 0; p++) {
/* Match against ALL ? */ /* Match against ALL ? */
if (!strcasecmp(*p, "ALL")) { if (!strcmp(*p, "ALL")) {
ret = TRUE; ret = TRUE;
if (setenv_ok != NULL) if (setenv_ok != NULL)
*setenv_ok = TRUE; *setenv_ok = TRUE;