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

(-)a/include/apr_ldap_init.h (+1 lines)
Lines 138-143 APU_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void); Link Here
138
 */
138
 */
139
APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
139
APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
140
                                    LDAP **ldap,
140
                                    LDAP **ldap,
141
                                    const char *uri,
141
                                    const char *hostname,
142
                                    const char *hostname,
142
                                    int portno,
143
                                    int portno,
143
                                    int secure,
144
                                    int secure,
(-)a/include/private/apu_internal.h (-1 / +1 lines)
Lines 46-52 apr_status_t apu_dso_load(apr_dso_handle_t **dso, apr_dso_handle_sym_t *dsoptr, Link Here
46
46
47
struct apr__ldap_dso_fntable {
47
struct apr__ldap_dso_fntable {
48
    int (*info)(apr_pool_t *pool, apr_ldap_err_t **result_err);
48
    int (*info)(apr_pool_t *pool, apr_ldap_err_t **result_err);
49
    int (*init)(apr_pool_t *pool, LDAP **ldap, const char *hostname,
49
    int (*init)(apr_pool_t *pool, LDAP **ldap, const char *url,const char *hostname,
50
                int portno, int secure, apr_ldap_err_t **result_err);
50
                int portno, int secure, apr_ldap_err_t **result_err);
51
    int (*ssl_init)(apr_pool_t *pool, const char *cert_auth_file,
51
    int (*ssl_init)(apr_pool_t *pool, const char *cert_auth_file,
52
                    int cert_file_type, apr_ldap_err_t **result_err);
52
                    int cert_file_type, apr_ldap_err_t **result_err);
(-)a/ldap/apr_ldap_init.c (-1 / +3 lines)
Lines 146-151 APU_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void) Link Here
146
 */
146
 */
147
APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
147
APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
148
                                    LDAP **ldap,
148
                                    LDAP **ldap,
149
                                    const char *uri,
149
                                    const char *hostname,
150
                                    const char *hostname,
150
                                    int portno,
151
                                    int portno,
151
                                    int secure,
152
                                    int secure,
Lines 154-160 APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool, Link Here
154
155
155
    apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
156
    apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
156
    *result_err = result;
157
    *result_err = result;
157
158
#if APR_HAS_LDAPSSL_INIT
158
#if APR_HAS_LDAPSSL_INIT
159
#if APR_HAS_SOLARIS_LDAPSDK
159
#if APR_HAS_SOLARIS_LDAPSDK
160
    /*
160
    /*
Lines 169-174 APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool, Link Here
169
#endif
169
#endif
170
#elif APR_HAS_LDAP_SSLINIT
170
#elif APR_HAS_LDAP_SSLINIT
171
    *ldap = ldap_sslinit((char *)hostname, portno, 0);
171
    *ldap = ldap_sslinit((char *)hostname, portno, 0);
172
#elif APR_HAS_OPENLDAP_LDAPSDK
173
    ldap_initialize(ldap, uri);
172
#else
174
#else
173
    *ldap = ldap_init((char *)hostname, portno);
175
    *ldap = ldap_init((char *)hostname, portno);
174
#endif
176
#endif
(-)a/ldap/apr_ldap_stub.c (-1 / +2 lines)
Lines 72-84 APU_DECLARE_LDAP(int) apr_ldap_info(apr_pool_t *pool, Link Here
72
72
73
APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
73
APU_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
74
                                    LDAP **ldap,
74
                                    LDAP **ldap,
75
                                    const char *url,
75
                                    const char *hostname,
76
                                    const char *hostname,
76
                                    int portno,
77
                                    int portno,
77
                                    int secure,
78
                                    int secure,
78
                                    apr_ldap_err_t **result_err)
79
                                    apr_ldap_err_t **result_err)
79
{
80
{
80
    LOAD_LDAP_STUB(pool, -1);
81
    LOAD_LDAP_STUB(pool, -1);
81
    return lfn->init(pool, ldap, hostname, portno, secure, result_err);
82
    return lfn->init(pool, ldap, url, hostname, portno, secure, result_err);
82
}
83
}
83
84
84
APU_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,
85
APU_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,
(-)a/ldap/apr_ldap_url.c (+5 lines)
Lines 286-291 APU_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool, Link Here
286
        result->rc = APR_LDAP_URL_ERR_BADSCHEME;
286
        result->rc = APR_LDAP_URL_ERR_BADSCHEME;
287
        return APR_EGENERAL;
287
        return APR_EGENERAL;
288
    }
288
    }
289
    else if ( !APR_HAS_OPENLDAP_LDAPSDK && strcasecmp(scheme, "ldapi") == 0 ) {
290
        result->reason = "ldapi:// is only supported with OpenLDAP client library.";
291
        result->rc = APR_LDAP_URL_ERR_BADSCHEME;
292
        return APR_EGENERAL;
293
    }
289
294
290
    /* make working copy of the remainder of the URL */
295
    /* make working copy of the remainder of the URL */
291
    url = (char *)apr_pstrdup(pool, url_tmp);
296
    url = (char *)apr_pstrdup(pool, url_tmp);

Return to bug 44302