From dab96b73874d254e92cf20a0c999e4d39c20c6dd Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Fri, 6 Nov 2009 16:27:51 +0100 Subject: [PATCH] Fixed symbol name clash in basic_ldap_auth.cc. --- helpers/basic_auth/LDAP/basic_ldap_auth.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/helpers/basic_auth/LDAP/basic_ldap_auth.cc b/helpers/basic_auth/LDAP/basic_ldap_auth.cc index 80142bf144..eaee9ce809 100644 --- a/helpers/basic_auth/LDAP/basic_ldap_auth.cc +++ b/helpers/basic_auth/LDAP/basic_ldap_auth.cc @@ -145,7 +145,7 @@ static int sslinit = 0; #endif static int connect_timeout = 0; static int timelimit = LDAP_NO_LIMIT; -static int debug = 0; +static int debug_mode = 0; /* Added for TLS support and version 3 */ static int use_tls = 0; @@ -493,7 +493,7 @@ main(int argc, char **argv) break; #endif case 'd': - debug++; + debug_mode++; break; default: fprintf(stderr, PROGRAM_NAME ": ERROR: Unknown command line option '%c'\n", option); @@ -647,7 +647,7 @@ checkLDAP(LDAP * persistent_ld, const char *userid, const char *password, const /* LDAP can't bind with a blank password. Seen as "anonymous" * and always granted access */ - if (debug) + if (debug_mode) fprintf(stderr, "Blank password given\n"); return 1; } @@ -674,7 +674,7 @@ checkLDAP(LDAP * persistent_ld, const char *userid, const char *password, const } } snprintf(filter, sizeof(filter), searchfilter, 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); - if (debug) + if (debug_mode) fprintf(stderr, "user filter '%s', searchbase '%s'\n", filter, basedn); rc = ldap_search_s(search_ld, basedn, searchscope, filter, searchattr, 1, &res); if (rc != LDAP_SUCCESS) { @@ -682,7 +682,7 @@ checkLDAP(LDAP * persistent_ld, const char *userid, const char *password, const /* Everything is fine. This is expected when referrals * are disabled. */ - if (debug) + if (debug_mode) fprintf(stderr, "noreferrals && rc == LDAP_PARTIAL_RESULTS\n"); } else { fprintf(stderr, PROGRAM_NAME ": WARNING, LDAP search error '%s'\n", ldap_err2string(rc)); @@ -698,7 +698,7 @@ checkLDAP(LDAP * persistent_ld, const char *userid, const char *password, const } entry = ldap_first_entry(search_ld, res); if (!entry) { - if (debug) + if (debug_mode) fprintf(stderr, "Ldap search returned nothing\n"); ret = 1; goto search_done; @@ -732,7 +732,7 @@ search_done: snprintf(dn, sizeof(dn), "%s=%s,%s", userattr, userid, basedn); } - if (debug) + if (debug_mode) fprintf(stderr, "attempting to authenticate user '%s'\n", dn); if (!bind_ld && !bind_once) bind_ld = persistent_ld; -- 2.47.2