/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2004-2006 The OpenLDAP Foundation.
+ * Copyright 2004-2007 The OpenLDAP Foundation.
* Portions Copyright 2005 Symas Corporation.
* All rights reserved.
*
Debug(LDAP_DEBUG_TRACE, "==> translucent_cfadd\n", 0, 0, 0);
/* FIXME: should not hardcode "olcDatabase" here */
- bv.bv_len = sprintf( ca->msg, "olcDatabase=%s",
+ bv.bv_len = sprintf( ca->cr_msg, "olcDatabase=%s",
ov->db.bd_info->bi_type );
- bv.bv_val = ca->msg;
+ bv.bv_val = ca->cr_msg;
ca->be = &ov->db;
/* We can only create this entry if the database is table-driven
ber_dupbv(&e->e_nname, &ndn);
a = attr_alloc( slap_schema.si_ad_objectClass );
+ a->a_numvals = 2;
a->a_vals = ch_malloc(sizeof(struct berval) * 3);
ber_dupbv(&a->a_vals[0], &glue[0]);
ber_dupbv(&a->a_vals[1], &glue[1]);
e->e_attrs = a;
a = attr_alloc( slap_schema.si_ad_structuralObjectClass );
+ a->a_numvals = 1;
a->a_vals = ch_malloc(sizeof(struct berval) * 2);
ber_dupbv(&a->a_vals[0], &glue[1]);
ber_dupbv(&a->a_vals[1], &glue[2]);
atmp.a_desc = m->sml_desc;
atmp.a_vals = m->sml_values;
atmp.a_nvals = m->sml_nvalues ? m->sml_nvalues : atmp.a_vals;
+ atmp.a_numvals = m->sml_numvals;
+ atmp.a_flags = 0;
a = attr_dup( &atmp );
a->a_next = ax;
ax = a;
**
*/
-static int translucent_db_init(BackendDB *be) {
+static int translucent_db_init(BackendDB *be, ConfigReply *cr) {
slap_overinst *on = (slap_overinst *) be->bd_info;
translucent_info *ov;
- int rc;
Debug(LDAP_DEBUG_TRACE, "==> translucent_db_init\n", 0, 0, 0);
ov->db.be_private = NULL;
ov->db.be_pcl_mutexp = &ov->db.be_pcl_mutex;
- if ( !backend_db_init( "ldap", &ov->db )) {
+ if ( !backend_db_init( "ldap", &ov->db, -1, NULL )) {
Debug( LDAP_DEBUG_CONFIG, "translucent: unable to open captive back-ldap\n", 0, 0, 0);
return 1;
}
**
*/
-static int translucent_db_open(BackendDB *be) {
+static int translucent_db_open(BackendDB *be, ConfigReply *cr) {
slap_overinst *on = (slap_overinst *) be->bd_info;
translucent_info *ov = on->on_bi.bi_private;
int rc;
ov->db.be_acl = be->be_acl;
ov->db.be_dfltaccess = be->be_dfltaccess;
- rc = backend_startup_one( &ov->db );
+ rc = backend_startup_one( &ov->db, NULL );
if(rc) Debug(LDAP_DEBUG_TRACE,
"translucent: bi_db_open() returned error %d\n", rc, 0, 0);
*/
static int
-translucent_db_close( BackendDB *be )
+translucent_db_close( BackendDB *be, ConfigReply *cr )
{
slap_overinst *on = (slap_overinst *) be->bd_info;
translucent_info *ov = on->on_bi.bi_private;
Debug(LDAP_DEBUG_TRACE, "==> translucent_db_close\n", 0, 0, 0);
if ( ov && ov->db.bd_info && ov->db.bd_info->bi_db_close ) {
- rc = ov->db.bd_info->bi_db_close(&ov->db);
+ rc = ov->db.bd_info->bi_db_close(&ov->db, NULL);
}
return(rc);
*/
static int
-translucent_db_destroy( BackendDB *be )
+translucent_db_destroy( BackendDB *be, ConfigReply *cr )
{
slap_overinst *on = (slap_overinst *) be->bd_info;
translucent_info *ov = on->on_bi.bi_private;
int rc = 0;
- Debug(LDAP_DEBUG_TRACE, "==> translucent_db_close\n", 0, 0, 0);
+ Debug(LDAP_DEBUG_TRACE, "==> translucent_db_destroy\n", 0, 0, 0);
if ( ov ) {
if ( ov->db.be_private != NULL ) {