]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/translucent.c
forgot access control...
[openldap] / servers / slapd / overlays / translucent.c
index a5b4e6a80b5a12391619b4dbfa9993a74a2bb60e..e87cbe4632aa3dd05aeaef704efe84abdabbcafc 100644 (file)
@@ -95,14 +95,6 @@ static ConfigTable translucentcfg[] = {
        { NULL, NULL, 0, 0, 0, ARG_IGNORED }
 };
 
-static ConfigTable transdummy[] = {
-       { "", "", 0, 0, 0, ARG_IGNORED,
-               NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "
-                       "DESC 'The backend type for a database instance' "
-                       "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL },
-       { NULL, NULL, 0, 0, 0, ARG_IGNORED }
-};
-
 static ConfigOCs translucentocs[] = {
        { "( OLcfgOvOc:14.1 "
          "NAME 'olcTranslucentConfig' "
@@ -115,7 +107,7 @@ static ConfigOCs translucentocs[] = {
        { "( OLcfgOvOc:14.2 "
          "NAME 'olcTranslucentDatabase' "
          "DESC 'Translucent target database configuration' "
-         "AUXILIARY )", Cft_Misc, transdummy, translucent_ldadd },
+         "AUXILIARY )", Cft_Misc, olcDatabaseDummy, translucent_ldadd },
        { NULL, 0, NULL }
 };
 /* for translucent_init() */
@@ -167,7 +159,7 @@ translucent_cfadd( Operation *op, SlapReply *rs, Entry *e, ConfigArgs *ca )
        /* FIXME: should not hardcode "olcDatabase" here */
        bv.bv_len = snprintf( ca->cr_msg, sizeof( ca->cr_msg ),
                "olcDatabase=%s", ov->db.bd_info->bi_type );
-       if ( bv.bv_len < 0 || bv.bv_len >= sizeof( ca->cr_msg ) ) {
+       if ( bv.bv_len >= sizeof( ca->cr_msg ) ) {
                return -1;
        }
        bv.bv_val = ca->cr_msg;
@@ -829,7 +821,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
                        if ( re ) {
                                if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
                                        rs->sr_flags ^= REP_ENTRY_MUSTRELEASE;
-                                       be_entry_release_r( op, rs->sr_entry );
+                                       overlay_entry_release_ov( op, rs->sr_entry, 0, on );
                                }
                                if ( rs->sr_flags & REP_ENTRY_MUSTBEFREED ) {
                                        rs->sr_flags ^= REP_ENTRY_MUSTBEFREED;
@@ -863,7 +855,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
                        re = entry_dup( rs->sr_entry );
                        if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
                                rs->sr_flags ^= REP_ENTRY_MUSTRELEASE;
-                               be_entry_release_r( op, rs->sr_entry );
+                               overlay_entry_release_ov( op, rs->sr_entry, 0, on );
                        }
                        if ( rs->sr_flags & REP_ENTRY_MUSTBEFREED ) {
                                rs->sr_flags ^= REP_ENTRY_MUSTBEFREED;
@@ -906,7 +898,7 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) {
                if ( tc->step & LCL_SIDE ) {
                        if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) {
                                rs->sr_flags ^= REP_ENTRY_MUSTRELEASE;
-                               be_entry_release_r( op, rs->sr_entry );
+                               overlay_entry_release_ov( op, rs->sr_entry, 0, on );
                        }
                        if ( rs->sr_flags & REP_ENTRY_MUSTBEFREED ) {
                                rs->sr_flags ^= REP_ENTRY_MUSTBEFREED;