]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
update for new backend types
[openldap] / servers / slapd / backend.c
index 3840ea02e914d8d2001dca1a3ae1f14b973f3651..34d004d6629134dfc920a454d1d45d5c90423a63 100644 (file)
@@ -1182,7 +1182,7 @@ be_entry_get_rw(
 }
 
 int 
-backend_group(
+fe_acl_group(
        Operation *op,
        Entry   *target,
        struct berval *gr_ndn,
@@ -1196,8 +1196,6 @@ backend_group(
        GroupAssertion *g;
        Backend *be = op->o_bd;
 
-       if ( op->o_abandon ) return SLAPD_ABANDON;
-
        op->o_bd = select_backend( gr_ndn, 0, 0 );
 
        for ( g = op->o_groups; g; g = g->ga_next ) {
@@ -1350,7 +1348,32 @@ done:
 }
 
 int 
-backend_attribute(
+backend_group(
+       Operation *op,
+       Entry   *target,
+       struct berval *gr_ndn,
+       struct berval *op_ndn,
+       ObjectClass *group_oc,
+       AttributeDescription *group_at )
+{
+       int                     rc;
+       BackendDB               *be_orig;
+
+       if ( op->o_abandon ) {
+               return SLAPD_ABANDON;
+       }
+
+       be_orig = op->o_bd;
+       op->o_bd = frontendDB;
+       rc = frontendDB->be_group( op, target, gr_ndn,
+               op_ndn, group_oc, group_at );
+       op->o_bd = be_orig;
+
+       return rc;
+}
+
+int 
+fe_acl_attribute(
        Operation *op,
        Entry   *target,
        struct berval   *edn,
@@ -1457,6 +1480,27 @@ freeit:          if ( e != target ) {
        return rc;
 }
 
+int 
+backend_attribute(
+       Operation *op,
+       Entry   *target,
+       struct berval   *edn,
+       AttributeDescription *entry_at,
+       BerVarray *vals,
+       slap_access_t access )
+{
+       int                     rc;
+       BackendDB               *be_orig;
+
+       be_orig = op->o_bd;
+       op->o_bd = frontendDB;
+       rc = frontendDB->be_attribute( op, target, edn,
+               entry_at, vals, access );
+       op->o_bd = be_orig;
+
+       return rc;
+}
+
 int 
 backend_access(
        Operation               *op,
@@ -1558,13 +1602,14 @@ freeit:         if ( e != target ) {
        return rc;
 }
 
-int backend_operational(
+int
+fe_aux_operational(
        Operation *op,
        SlapReply *rs )
 {
-       Attribute       **ap;
-       int             rc = 0;
-       BackendDB       *be_orig;
+       Attribute               **ap;
+       int                     rc = 0;
+       BackendDB               *be_orig;
 
        for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
                /* just count them */ ;
@@ -1588,7 +1633,7 @@ int backend_operational(
                ap = &(*ap)->a_next;
        }
 
-       if ( op->o_bd != NULL )
+       if ( op->o_bd != NULL && op->o_bd != frontendDB )
        {
                /* Let the overlays have a chance at this */
                be_orig = op->o_bd;
@@ -1606,3 +1651,18 @@ int backend_operational(
        return rc;
 }
 
+int backend_operational( Operation *op, SlapReply *rs )
+{
+       int rc;
+       BackendDB *be_orig;
+
+       /* Moved this into the frontend so global overlays are called */
+
+       be_orig = op->o_bd;
+       op->o_bd = frontendDB;
+       rc = frontendDB->be_operational( op, rs );
+       op->o_bd = be_orig;
+
+       return rc;
+}
+