]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fixes for ext_edirectory_userip_acl Solaris builds
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 6 Nov 2010 04:28:11 +0000 (17:28 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 6 Nov 2010 04:28:11 +0000 (17:28 +1300)
 - bcmp() function is obsolete. use memcmp() instead
 - Kerberos is not supported by LDAP_AUTH_*

helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc

index f3c3d18583dd9b318584d8c02e2eef76cb1fcf28..e5c0a58709b9c3baff78f1814dc528f5fa5ea9b0 100644 (file)
@@ -785,15 +785,21 @@ int BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t)
     case LDAP_AUTH_SASL:
         l->type = t;
         break;
+#ifdef LDAP_AUTH_KRBV4
     case LDAP_AUTH_KRBV4:
         l->type = t;
         break;
+#endif
+#ifdef LDAP_AUTH_KRBV41
     case LDAP_AUTH_KRBV41:
         l->type = t;
         break;
+#endif
+#ifdef LDAP_AUTH_KRBV42
     case LDAP_AUTH_KRBV42:
         l->type = t;
         break;
+#endif
 #ifdef LDAP_AUTH_TLS
     case LDAP_AUTH_TLS:                                        /* Added for chicken switch to TLS-enabled without using SSL */
         l->type = t;
@@ -805,7 +811,7 @@ int BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t)
     }
 
     /* Bind */
-#ifdef NETSCAPE_SSL
+#if defined(LDAP_AUTH_TLS) && defined(NETSCAPE_SSL)
     if (l->type == LDAP_AUTH_TLS)
         s = ldap_start_tls_s(l->lp, NULL, NULL);
     else
@@ -1417,7 +1423,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid)
                         }
                         y = strlen(bufb);
                         /* Compare value with IP */
-                        if (bcmp(l->search_ip, bufb, y) == 0) {
+                        if (memcmp(l->search_ip, bufb, y) == 0) {
                             /* We got a match! - Scan 'ber' for 'cn' values */
                             z = ldap_count_values_len(ber);
                             for (j = 0; j < z; j++)
@@ -1449,7 +1455,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid)
                         }
                         y = strlen(bufb);
                         /* Compare value with IP */
-                        if (bcmp(l->search_ip, bufb, y) == 0) {
+                        if (memcmp(l->search_ip, bufb, y) == 0) {
                             /* We got a match! - Scan 'ber' for 'cn' values */
                             z = ldap_count_values_len(ber);
                             for (j = 0; j < z; j++)
@@ -1481,7 +1487,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid)
                         }
                         y = strlen(bufb);
                         /* Compare value with IP */
-                        if (bcmp(l->search_ip, bufb, y) == 0) {
+                        if (memcmp(l->search_ip, bufb, y) == 0) {
                             /* We got a match! - Scan 'ber' for 'cn' values */
                             z = ldap_count_values_len(ber);
                             for (j = 0; j < z; j++)
@@ -1513,7 +1519,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid)
                         }
                         y = strlen(bufb);
                         /* Compare value with IP */
-                        if (bcmp(l->search_ip, bufb, y) == 0) {
+                        if (memcmp(l->search_ip, bufb, y) == 0) {
                             /* We got a match! - Scan 'ber' for 'cn' values */
                             z = ldap_count_values_len(ber);
                             for (j = 0; j < z; j++)
@@ -1545,7 +1551,7 @@ int SearchIPLDAP(edui_ldap_t *l, char *uid)
                         }
                         y = strlen(bufb);
                         /* Compare value with IP */
-                        if (bcmp(l->search_ip, bufb, y) == 0) {
+                        if (memcmp(l->search_ip, bufb, y) == 0) {
                             /* We got a match! - Scan 'ber' for 'cn' values */
                             z = ldap_count_values_len(ber);
                             for (j = 0; j < z; j++)