Skip to content
Snippets Groups Projects
Commit 873be21a authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

add referral check to functions elaborated by overlays

parent 0b37fb4e
Branches
Tags
No related merge requests found
......@@ -146,9 +146,21 @@ over_back_response ( Operation *op, SlapReply *rs )
return rc;
}
enum op_which { op_bind = 0, op_unbind, op_search, op_compare,
op_modify, op_modrdn, op_add, op_delete, op_abandon,
op_cancel, op_extended };
enum op_which {
op_bind = 0,
op_unbind,
op_search,
op_compare,
op_modify,
op_modrdn,
op_add,
op_delete,
op_abandon,
op_cancel,
op_extended,
op_aux_chk_referrals,
op_last
};
static int
over_op_func(
......@@ -257,6 +269,12 @@ over_op_extended( Operation *op, SlapReply *rs )
return over_op_func( op, rs, op_extended );
}
static int
over_chk_referrals( Operation *op, SlapReply *rs )
{
return over_op_func( op, rs, op_aux_chk_referrals );
}
int
overlay_register(
slap_overinst *on
......@@ -325,8 +343,17 @@ overlay_config( BackendDB *be, const char *ov )
bi->bi_op_delete = over_op_delete;
bi->bi_op_abandon = over_op_abandon;
bi->bi_op_cancel = over_op_cancel;
bi->bi_extended = over_op_extended;
/*
* this is fine because it has the same
* args of the operations; we need to rework
* all the hooks to share the same args
* of the operations...
*/
bi->bi_chk_referrals = over_chk_referrals;
be->bd_info = bi;
} else {
......
......@@ -1412,9 +1412,9 @@ struct slap_backend_db {
#define be_extended bd_info->bi_extended
#define be_chk_referrals bd_info->bi_chk_referrals
#define be_fetch bd_info->bi_entry_get_rw
#define be_release bd_info->bi_entry_release_rw
#define be_chk_referrals bd_info->bi_chk_referrals
#define be_group bd_info->bi_acl_group
#define be_attribute bd_info->bi_acl_attribute
#define be_operational bd_info->bi_operational
......@@ -1689,10 +1689,10 @@ typedef int (BI_op_delete) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
typedef int (BI_op_abandon) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
typedef int (BI_op_cancel) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
typedef int (BI_op_extended) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
typedef int (BI_chk_referrals) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
typedef int (BI_entry_release_rw) LDAP_P(( struct slap_op *op, Entry *e, int rw ));
typedef int (BI_entry_get_rw) LDAP_P(( struct slap_op *op, struct berval *ndn,
ObjectClass *oc, AttributeDescription *at, int rw, Entry **e ));
typedef int (BI_chk_referrals) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
typedef int (BI_operational) LDAP_P(( struct slap_op *op, struct slap_rep *rs, int opattrs, Attribute **ap ));
typedef int (BI_has_subordinates) LDAP_P(( struct slap_op *op, Entry *e, int *hasSubs ));
......@@ -1787,9 +1787,9 @@ struct slap_backend_info {
BI_op_extended *bi_extended;
/* Auxilary Functions */
BI_chk_referrals *bi_chk_referrals;
BI_entry_get_rw *bi_entry_get_rw;
BI_entry_release_rw *bi_entry_release_rw;
BI_chk_referrals *bi_chk_referrals;
BI_operational *bi_operational;
BI_has_subordinates *bi_has_subordinates;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment