]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 12 May 2010 05:23:26 +0000 (17:23 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 12 May 2010 05:23:26 +0000 (17:23 +1200)
Fixed several symbol clashes in auth helpers.

helpers/digest_auth/eDirectory/ldap_backend.c
helpers/digest_auth/ldap/ldap_backend.c
helpers/external_acl/ldap_group/squid_ldap_group.c

index 3cd5a7815a3b63108c6d660ff83958b33b57c3f0..f133b35ff1cafd22d3a742c177aa8f5b31b80c86 100644 (file)
@@ -61,7 +61,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;
@@ -209,7 +209,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);
@@ -245,14 +245,14 @@ retrysrch:
             sprintf(searchbase, "%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) {
 
@@ -264,11 +264,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 {
@@ -279,7 +279,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);
@@ -299,7 +299,7 @@ retrydnattr:
                 }
                 value++;
             }
-            if (debug)
+            if (show_debug_messages)
                 printf("password: %s\n", password);
             if (password)
                 password = strdup(password);
@@ -417,7 +417,7 @@ ldapconnect(void)
                 ld = NULL;
             }
         }
-        if (debug)
+        if (show_debug_messages)
             fprintf(stderr, "Connected OK\n");
     }
 }
@@ -574,7 +574,7 @@ LDAPArguments(int argc, char **argv)
             break;
 #endif
         case 'd':
-            debug = 1;
+            show_debug_messages = 1;
             break;
         case 'E':
             strip_nt_domain = 1;
index 6fa0d163754bb757d79ed19dad06c2d07e637242..08c8841324db09eeb4cc9e8a6fa3f634c5fb74b0 100644 (file)
@@ -60,7 +60,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 aliasderef = LDAP_DEREF_NEVER;
@@ -204,7 +204,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);
@@ -240,7 +240,7 @@ retrysrch:
             sprintf(searchbase, "%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);
         }
@@ -253,7 +253,7 @@ retrydnattr:
                 return NULL;
             }
             if (!values) {
-                if (debug)
+                if (show_debug_messages)
                     printf("No attribute value found\n");
                 ldap_msgfree(res);
                 return NULL;
@@ -271,7 +271,7 @@ retrydnattr:
                 }
                 value++;
             }
-            if (debug)
+            if (show_debug_messages)
                 printf("password: %s\n", password);
             if (password)
                 password = strdup(password);
@@ -386,7 +386,7 @@ ldapconnect(void)
                 ld = NULL;
             }
         }
-        if (debug)
+        if (show_debug_messages)
             fprintf(stderr, "Connected OK\n");
     }
 }
@@ -541,7 +541,7 @@ LDAPArguments(int argc, char **argv)
             break;
 #endif
         case 'd':
-            debug = 1;
+            show_debug_messages = 1;
             break;
         case 'E':
             strip_nt_domain = 1;
index 7420980562328f0214791b531588de8c10ca59d4..d4f22816a5fa77ff62c332764fa6380e37495fa5 100644 (file)
@@ -96,7 +96,7 @@ static const char *bindpasswd = NULL;
 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 aliasderef = LDAP_DEREF_NEVER;
 #if defined(NETSCAPE_SSL)
 static char *sslpath = NULL;
@@ -367,7 +367,7 @@ main(int argc, char **argv)
             break;
 #endif
         case 'd':
-            debug = 1;
+            show_debug_messages = 1;
             break;
         case 'g':
             use_extension_dn = 1;
@@ -572,7 +572,7 @@ recover:
                         break;
                     }
                 }
-                if (debug)
+                if (show_debug_messages)
                     fprintf(stderr, "Connected OK\n");
             }
             if (searchLDAP(ld, group, user, extension_dn) == 0) {
@@ -706,7 +706,7 @@ searchLDAPGroup(LDAP * ld, char *group, char *member, char *extension_dn)
         fprintf(stderr, PROGRAM_NAME " ERROR, Failed to construct LDAP search filter. filter=\"%s\", user=\"%s\", group=\"%s\"\n", filter, member, group);
         return 1;
     }
-    if (debug)
+    if (show_debug_messages)
         fprintf(stderr, "group filter '%s', searchbase '%s'\n", filter, searchbase);
 
     rc = ldap_search_s(ld, searchbase, searchscope, filter, searchattr, 1, &res);
@@ -755,7 +755,7 @@ searchLDAP(LDAP * ld, char *group, char *login, char *extension_dn)
             snprintf(searchbase, sizeof(searchbase), "%s", userbasedn ? userbasedn : basedn);
         ldap_escape_value(escaped_login, sizeof(escaped_login), login);
         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);
-        if (debug)
+        if (show_debug_messages)
             fprintf(stderr, "user filter '%s', searchbase '%s'\n", filter, searchbase);
         rc = ldap_search_s(ld, searchbase, searchscope, filter, searchattr, 1, &res);
         if (rc != LDAP_SUCCESS) {