bi->bi_destroy = 0;
bi->bi_db_init = ldap_back_db_init;
- bi->bi_db_config = ldap_back_db_config;
+ bi->bi_db_config = config_generic_wrapper;
bi->bi_db_open = ldap_back_db_open;
bi->bi_db_close = 0;
bi->bi_db_destroy = ldap_back_db_destroy;
bi->bi_connection_init = 0;
bi->bi_connection_destroy = ldap_back_conn_destroy;
- if ( chain_init( ) ) {
+ if ( chain_init() ) {
return -1;
}
- return 0;
+ return ldap_back_init_cf( bi );
}
int
return -1;
}
+ BER_BVZERO( &li->acl_authcID );
BER_BVZERO( &li->acl_authcDN );
BER_BVZERO( &li->acl_passwd );
-#ifdef LDAP_BACK_PROXY_AUTHZ
+ li->acl_authmethod = LDAP_AUTH_NONE;
+ BER_BVZERO( &li->acl_sasl_mech );
+ li->acl_sb.sb_tls = SB_TLS_DEFAULT;
+
li->idassert_mode = LDAP_BACK_IDASSERT_LEGACY;
BER_BVZERO( &li->idassert_authcID );
BER_BVZERO( &li->idassert_passwd );
BER_BVZERO( &li->idassert_authzID );
- li->idassert_authz = NULL;
- li->idassert_authmethod = LDAP_AUTH_SIMPLE;
- li->idassert_sasl_flags = LDAP_SASL_QUIET;
+ li->idassert_authmethod = LDAP_AUTH_NONE;
BER_BVZERO( &li->idassert_sasl_mech );
- BER_BVZERO( &li->idassert_sasl_realm );
-
- li->idassert_ppolicy = 0;
+ li->idassert_sb.sb_tls = SB_TLS_DEFAULT;
/* by default, use proxyAuthz control on each operation */
li->idassert_flags = LDAP_BACK_AUTH_NONE;
-#endif /* LDAP_BACK_PROXY_AUTHZ */
+
+ li->idassert_authz = NULL;
+
+ /* initialize flags */
+ li->flags = LDAP_BACK_F_CHASE_REFERRALS;
+
+ /* initialize version */
+ li->version = LDAP_VERSION3;
ldap_pvt_thread_mutex_init( &li->conn_mutex );
be->be_private = li;
SLAP_DBFLAGS( be ) |= SLAP_DBFLAG_NOLASTMOD;
+ be->be_cf_ocs = be->bd_info->bi_cf_ocs;
+
return 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 */
switch ( li->idassert_mode ) {
case LDAP_BACK_IDASSERT_LEGACY:
default:
break;
}
-#endif /* LDAP_BACK_PROXY_AUTHZ */
#if 0 && defined(SLAPD_MONITOR)
{
+ /* FIXME: disabled because namingContexts doesn't have
+ * a matching rule, and using an MRA filter doesn't work
+ * because the normalized assertion is compared to the
+ * non-normalized value, which in general differs from
+ * the normalized one. See ITS#3406 */
struct berval filter,
- base = BER_BVC( "cn=Databases,cn=Monitor" );
+ base = BER_BVC( "cn=Databases," SLAPD_MONITOR );
struct berval vals[ 2 ];
Attribute a = { 0 };
}
#endif /* SLAPD_MONITOR */
+ if ( li->flags & LDAP_BACK_F_SUPPORT_T_F_DISCOVER ) {
+ int rc;
+
+ li->flags &= ~LDAP_BACK_F_SUPPORT_T_F_DISCOVER;
+
+ rc = slap_discover_feature( li->url, li->version,
+ slap_schema.si_ad_supportedFeatures->ad_cname.bv_val,
+ LDAP_FEATURE_ABSOLUTE_FILTERS );
+ if ( rc == LDAP_COMPARE_TRUE ) {
+ li->flags |= LDAP_BACK_F_SUPPORT_T_F;
+ }
+ }
+
return 0;
}
ldap_free_urldesc( li->lud );
li->lud = NULL;
}
+ if ( !BER_BVISNULL( &li->acl_authcID ) ) {
+ ch_free( li->acl_authcID.bv_val );
+ BER_BVZERO( &li->acl_authcID );
+ }
if ( !BER_BVISNULL( &li->acl_authcDN ) ) {
ch_free( li->acl_authcDN.bv_val );
BER_BVZERO( &li->acl_authcDN );
ch_free( li->acl_passwd.bv_val );
BER_BVZERO( &li->acl_passwd );
}
-#ifdef LDAP_BACK_PROXY_AUTHZ
+ if ( !BER_BVISNULL( &li->acl_sasl_mech ) ) {
+ ch_free( li->acl_sasl_mech.bv_val );
+ BER_BVZERO( &li->acl_sasl_mech );
+ }
+ if ( !BER_BVISNULL( &li->acl_sasl_realm ) ) {
+ ch_free( li->acl_sasl_realm.bv_val );
+ BER_BVZERO( &li->acl_sasl_realm );
+ }
if ( !BER_BVISNULL( &li->idassert_authcID ) ) {
ch_free( li->idassert_authcID.bv_val );
BER_BVZERO( &li->idassert_authcID );
ch_free( li->idassert_sasl_realm.bv_val );
BER_BVZERO( &li->idassert_sasl_realm );
}
-#endif /* LDAP_BACK_PROXY_AUTHZ */
if ( li->conntree ) {
avl_free( li->conntree, ldap_back_conn_free );
}