View | Details | Raw Unified | Return to bug 37814
Collapse All | Expand All

(-)util_ldap.c.orig (-3 / +9 lines)
Lines 48-53 Link Here
48
#define UTIL_LDAP_SET_MUTEX_PERMS
48
#define UTIL_LDAP_SET_MUTEX_PERMS
49
#endif
49
#endif
50
50
51
#if APR_HAS_MICROSOFT_LDAPSDK
52
#define LDAP_SIZE_LIMIT 2147483647
53
#else
54
#define LDAP_SIZE_LIMIT -1
55
#endif
56
   
51
    /* defines for certificate file types
57
    /* defines for certificate file types
52
    */
58
    */
53
#define LDAP_CA_TYPE_UNKNOWN            0
59
#define LDAP_CA_TYPE_UNKNOWN            0
Lines 583-589 Link Here
583
    /* search for reqdn */
589
    /* search for reqdn */
584
    if ((result = ldap_search_ext_s(ldc->ldap, const_cast(reqdn), LDAP_SCOPE_BASE, 
590
    if ((result = ldap_search_ext_s(ldc->ldap, const_cast(reqdn), LDAP_SCOPE_BASE, 
585
				    "(objectclass=*)", NULL, 1, 
591
				    "(objectclass=*)", NULL, 1, 
586
				    NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN) {
592
				    NULL, NULL, NULL, LDAP_SIZE_LIMIT, &res)) == LDAP_SERVER_DOWN) {
587
        ldc->reason = "DN Comparison ldap_search_ext_s() failed with server down";
593
        ldc->reason = "DN Comparison ldap_search_ext_s() failed with server down";
588
        util_ldap_connection_unbind(ldc);
594
        util_ldap_connection_unbind(ldc);
589
        goto start_over;
595
        goto start_over;
Lines 847-853 Link Here
847
    if ((result = ldap_search_ext_s(ldc->ldap,
853
    if ((result = ldap_search_ext_s(ldc->ldap,
848
				    const_cast(basedn), scope, 
854
				    const_cast(basedn), scope, 
849
				    const_cast(filter), attrs, 0, 
855
				    const_cast(filter), attrs, 0, 
850
				    NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN) {
856
				    NULL, NULL, NULL, LDAP_SIZE_LIMIT, &res)) == LDAP_SERVER_DOWN) {
851
        ldc->reason = "ldap_search_ext_s() for user failed with server down";
857
        ldc->reason = "ldap_search_ext_s() for user failed with server down";
852
        util_ldap_connection_unbind(ldc);
858
        util_ldap_connection_unbind(ldc);
853
        goto start_over;
859
        goto start_over;
Lines 1077-1083 Link Here
1077
    if ((result = ldap_search_ext_s(ldc->ldap,
1083
    if ((result = ldap_search_ext_s(ldc->ldap,
1078
				    const_cast(basedn), scope, 
1084
				    const_cast(basedn), scope, 
1079
				    const_cast(filter), attrs, 0, 
1085
				    const_cast(filter), attrs, 0, 
1080
				    NULL, NULL, NULL, -1, &res)) == LDAP_SERVER_DOWN) {
1086
				    NULL, NULL, NULL, LDAP_SIZE_LIMIT, &res)) == LDAP_SERVER_DOWN) {
1081
        ldc->reason = "ldap_search_ext_s() for user failed with server down";
1087
        ldc->reason = "ldap_search_ext_s() for user failed with server down";
1082
        util_ldap_connection_unbind(ldc);
1088
        util_ldap_connection_unbind(ldc);
1083
        goto start_over;
1089
        goto start_over;

Return to bug 37814