rc = ldap_back_op_result( lc, op, rs, msgid, 1 );
if ( rc == LDAP_SUCCESS ) {
-#ifdef LDAP_BACK_PROXY_AUTHZ
+#if defined(LDAP_BACK_PROXY_AUTHZ)
if ( li->idassert_flags & LDAP_BACK_AUTH_OVERRIDE ) {
ldap_back_proxy_authz_bind( lc, op, rs );
if ( lc->lc_bound == 0 ) {
if ( li->url != NULL ) {
ch_free( li->url );
}
+
l = strlen( argv[1] ) + STRLENOF( "ldap:///") + 1;
li->url = ch_calloc( l, sizeof( char ) );
if ( li->url == NULL ) {
struct ldapinfo *li = (struct ldapinfo *)be->be_private;
Debug( LDAP_DEBUG_TRACE,
- "ldap_back_db_open: URI=%s\n", li->url, 0, 0 );
+ "ldap_back_db_open: URI=%s\n",
+ li->url != NULL ? li->url : "", 0, 0 );
#ifdef LDAP_BACK_PROXY_AUTHZ
/* by default, use proxyAuthz control on each operation */
ldap_pvt_thread_mutex_lock( &li->conn_mutex );
- if ( li->url ) {
+ if ( li->url != NULL ) {
ch_free( li->url );
li->url = NULL;
}
#if defined(SLAPD_LDAP)
if ( strcmp( bi->bi_type, "ldap" ) == 0 ) {
- struct ldapinfo *li = (struct ldapinfo *)be->be_private;
+ struct ldapinfo *li =
+ (struct ldapinfo *)be->be_private;
struct berval bv;
- bv.bv_val = li->url;
- bv.bv_len = strlen( bv.bv_val );
- attr_merge_normalize_one( e, slap_schema.si_ad_labeledURI,
+ ber_str2bv( li->url, 0, 0, &bv );
+
+ attr_merge_normalize_one( e,
+ slap_schema.si_ad_labeledURI,
&bv, NULL );
}
#endif /* defined(SLAPD_LDAP) */