Commit d3ced75f authored by Howard Chu's avatar Howard Chu
Browse files

Add SLAP_DBFLAG_OVERLAY

parent b4eceddb
......@@ -1535,7 +1535,8 @@ int backend_operational(
/* Let the overlays have a chance at this */
be_orig = op->o_bd;
op->o_bd = select_backend( be_orig->be_nsuffix, 0, 0 );
if ( SLAP_ISOVERLAY( be_orig ))
op->o_bd = select_backend( be_orig->be_nsuffix, 0, 0 );
if (( SLAP_OPATTRS( rs->sr_attr_flags ) || op->ors_attrs ) &&
op->o_bd && op->o_bd->be_operational != NULL )
......
......@@ -178,6 +178,7 @@ over_back_response ( Operation *op, SlapReply *rs )
int rc = SLAP_CB_CONTINUE;
BackendDB *be = op->o_bd, db = *op->o_bd;
db.be_flags |= SLAP_DBFLAG_OVERLAY;
op->o_bd = &db;
for (; on; on=on->on_next ) {
if ( on->on_response ) {
......@@ -241,6 +242,7 @@ over_op_func(
slap_callback cb = {NULL, over_back_response, NULL, NULL};
int rc = SLAP_CB_CONTINUE;
db.be_flags |= SLAP_DBFLAG_OVERLAY;
op->o_bd = &db;
cb.sc_next = op->o_callback;
cb.sc_private = oi;
......
......@@ -1565,6 +1565,7 @@ struct slap_backend_db {
#define SLAP_DBFLAG_GLUE_INSTANCE 0x0010U /* a glue backend */
#define SLAP_DBFLAG_GLUE_SUBORDINATE 0x0020U /* child of a glue hierarchy */
#define SLAP_DBFLAG_GLUE_LINKED 0x0040U /* child is connected to parent */
#define SLAP_DBFLAG_OVERLAY 0x0080U /* this db struct is an overlay */
#define SLAP_DBFLAG_SHADOW 0x8000U /* a shadow */
#define SLAP_DBFLAG_SYNC_SHADOW 0x1000U /* a sync shadow */
#define SLAP_DBFLAG_SLURP_SHADOW 0x2000U /* a slurp shadow */
......@@ -1572,6 +1573,7 @@ struct slap_backend_db {
#define SLAP_DBFLAGS(be) ((be)->be_flags)
#define SLAP_NOLASTMOD(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_NOLASTMOD)
#define SLAP_LASTMOD(be) (!SLAP_NOLASTMOD(be))
#define SLAP_ISOVERLAY(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_OVERLAY)
#define SLAP_NO_SCHEMA_CHECK(be) \
(SLAP_DBFLAGS(be) & SLAP_DBFLAG_NO_SCHEMA_CHECK)
#define SLAP_GLUE_INSTANCE(be) \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment