|
Lines 197-202
squid_ldap_memfree(char *p)
Link Here
|
| 197 |
|
197 |
|
| 198 |
#endif |
198 |
#endif |
| 199 |
|
199 |
|
|
|
200 |
#ifdef LDAP_API_FEATURE_X_OPENLDAP |
| 201 |
#if LDAP_VENDOR_VERSION > 194 |
| 202 |
#define HAS_URI_SUPPORT 1 |
| 203 |
#endif |
| 204 |
#endif |
| 205 |
|
| 200 |
static LDAP * |
206 |
static LDAP * |
| 201 |
open_ldap_connection(const char *ldapServer, int port) |
207 |
open_ldap_connection(const char *ldapServer, int port) |
| 202 |
{ |
208 |
{ |
|
Lines 206-212
open_ldap_connection(const char *ldapSer
Link Here
|
| 206 |
int rc = ldap_initialize(&ld, ldapServer); |
212 |
int rc = ldap_initialize(&ld, ldapServer); |
| 207 |
if (rc != LDAP_SUCCESS) { |
213 |
if (rc != LDAP_SUCCESS) { |
| 208 |
fprintf(stderr, "\nUnable to connect to LDAPURI:%s\n", ldapServer); |
214 |
fprintf(stderr, "\nUnable to connect to LDAPURI:%s\n", ldapServer); |
| 209 |
break; |
215 |
exit(1); |
| 210 |
} |
216 |
} |
| 211 |
} else |
217 |
} else |
| 212 |
#endif |
218 |
#endif |
|
Lines 255-266
open_ldap_connection(const char *ldapSer
Link Here
|
| 255 |
return ld; |
261 |
return ld; |
| 256 |
} |
262 |
} |
| 257 |
|
263 |
|
| 258 |
#ifdef LDAP_API_FEATURE_X_OPENLDAP |
|
|
| 259 |
#if LDAP_VENDOR_VERSION > 194 |
| 260 |
#define HAS_URI_SUPPORT 1 |
| 261 |
#endif |
| 262 |
#endif |
| 263 |
|
| 264 |
int |
264 |
int |
| 265 |
main(int argc, char **argv) |
265 |
main(int argc, char **argv) |
| 266 |
{ |
266 |
{ |
|
Lines 479-485
main(int argc, char **argv)
Link Here
|
| 479 |
} |
479 |
} |
| 480 |
rfc1738_unescape(user); |
480 |
rfc1738_unescape(user); |
| 481 |
rfc1738_unescape(passwd); |
481 |
rfc1738_unescape(passwd); |
| 482 |
tryagain = 1; |
482 |
tryagain = (ld != NULL); |
| 483 |
recover: |
483 |
recover: |
| 484 |
if (ld == NULL && persistent) |
484 |
if (ld == NULL && persistent) |
| 485 |
ld = open_ldap_connection(ldapServer, port); |
485 |
ld = open_ldap_connection(ldapServer, port); |
|
Lines 637-643
checkLDAP(LDAP * persistent_ld, const ch
Link Here
|
| 637 |
ldap_unbind(bind_ld); |
637 |
ldap_unbind(bind_ld); |
| 638 |
bind_ld = NULL; |
638 |
bind_ld = NULL; |
| 639 |
} |
639 |
} |
| 640 |
return 0; |
640 |
return ret; |
| 641 |
} |
641 |
} |
| 642 |
|
642 |
|
| 643 |
int |
643 |
int |