From: Francesco Chemolli Date: Thu, 29 Apr 2010 15:41:11 +0000 (+0200) Subject: Fixed symbol clash in eDirectory auth helper. X-Git-Tag: SQUID_3_2_0_1~256 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=942d3ab0ecd44a127994de060a9f1c1b97a3eb1b;p=thirdparty%2Fsquid.git Fixed symbol clash in eDirectory auth helper. --- diff --git a/helpers/digest_auth/eDirectory/ldap_backend.c b/helpers/digest_auth/eDirectory/ldap_backend.c index e3cc11f612..1b1591234a 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.c +++ b/helpers/digest_auth/eDirectory/ldap_backend.c @@ -63,7 +63,7 @@ static int encrpass = 0; static int searchscope = LDAP_SCOPE_SUBTREE; static int persistent = 0; static int noreferrals = 0; -static int debug = 0; +static int show_debug_messages = 0; static int port = LDAP_PORT; static int strip_nt_domain = 0; static int edir_universal_passwd = 0; @@ -211,7 +211,7 @@ getpassword(char *login, char *realm) snprintf(filter, sizeof(filter), usersearchfilter, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login, escaped_login); retrysrch: - if (debug) + if (show_debug_messages) fprintf(stderr, "user filter '%s', searchbase '%s'\n", filter, searchbase); rc = ldap_search_s(ld, searchbase, searchscope, filter, NULL, 0, &res); @@ -247,14 +247,14 @@ retrysrch: snprintf(searchbase, 8192, "%s=%s, %s", userdnattr, login, userbasedn); retrydnattr: - if (debug) + if (show_debug_messages) fprintf(stderr, "searchbase '%s'\n", searchbase); rc = ldap_search_s(ld, searchbase, searchscope, NULL, NULL, 0, &res); } if (rc == LDAP_SUCCESS) { entry = ldap_first_entry(ld, res); if (entry) { - if (debug) + if (show_debug_messages) printf("ldap dn: %s\n", ldap_get_dn(ld, entry)); if (edir_universal_passwd) { @@ -266,11 +266,11 @@ retrydnattr: /* actually talk to NMAS to get a password */ nmas_res = nds_get_password(ld, ldap_get_dn(ld, entry), &universal_password_len, universal_password); if (nmas_res == LDAP_SUCCESS && universal_password) { - if (debug) + if (show_debug_messages) printf("NMAS returned value %s\n", universal_password); values[0] = universal_password; } else { - if (debug) + if (show_debug_messages) printf("Error reading Universal Password: %d = %s\n", nmas_res, ldap_err2string(nmas_res)); } } else { @@ -281,7 +281,7 @@ retrydnattr: return NULL; } if (!values) { - if (debug) + if (show_debug_messages) printf("No attribute value found\n"); if (edir_universal_passwd) free(universal_password); @@ -301,7 +301,7 @@ retrydnattr: } value++; } - if (debug) + if (show_debug_messages) printf("password: %s\n", password); if (password) password = xstrdup(password); @@ -419,7 +419,7 @@ ldapconnect(void) ld = NULL; } } - if (debug) + if (show_debug_messages) fprintf(stderr, "Connected OK\n"); } } @@ -576,7 +576,7 @@ LDAPArguments(int argc, char **argv) break; #endif case 'd': - debug = 1; + show_debug_messages = 1; break; case 'E': strip_nt_domain = 1;