mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
New backend routine: back_attribute
This commit is contained in:
parent
719b945c78
commit
295f3ba0aa
5 changed files with 52 additions and 0 deletions
|
|
@ -80,6 +80,13 @@ extern int ldbm_back_group LDAP_P(( BackendDB *bd,
|
|||
ObjectClass* group_oc,
|
||||
AttributeDescription* group_at));
|
||||
|
||||
extern int ldbm_back_attribute LDAP_P(( BackendDB *bd,
|
||||
Connection *conn, Operation *op,
|
||||
Entry *target,
|
||||
const char* e_ndn,
|
||||
AttributeDescription* entry_at,
|
||||
const char ***vals));
|
||||
|
||||
|
||||
/* hooks for slap tools */
|
||||
extern int ldbm_tool_entry_open LDAP_P(( BackendDB *be, int mode ));
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ ldbm_back_initialize(
|
|||
|
||||
bi->bi_entry_release_rw = ldbm_back_entry_release_rw;
|
||||
bi->bi_acl_group = ldbm_back_group;
|
||||
bi->bi_acl_attribute = ldbm_back_attribute;
|
||||
bi->bi_chk_referrals = ldbm_back_referrals;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -667,6 +667,35 @@ backend_group(
|
|||
return LDAP_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
int
|
||||
backend_attribute(
|
||||
Backend *be,
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *target,
|
||||
const char *e_ndn,
|
||||
AttributeDescription *entry_at,
|
||||
const char ***vals
|
||||
)
|
||||
{
|
||||
if( target == NULL || strcmp( target->e_ndn, e_ndn ) != 0 ) {
|
||||
/* we won't attempt to send it to a different backend */
|
||||
|
||||
be = select_backend(e_ndn);
|
||||
|
||||
if (be == NULL) {
|
||||
return LDAP_NO_SUCH_OBJECT;
|
||||
}
|
||||
}
|
||||
|
||||
if( be->be_attribute ) {
|
||||
return be->be_attribute( be, conn, op, target, e_ndn,
|
||||
entry_at, vals );
|
||||
}
|
||||
|
||||
return LDAP_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
Attribute *backend_operational(
|
||||
Backend *be,
|
||||
Entry *e )
|
||||
|
|
|
|||
|
|
@ -173,6 +173,15 @@ LDAP_SLAPD_F (int) backend_group LDAP_P((Backend *be,
|
|||
AttributeDescription *group_at
|
||||
));
|
||||
|
||||
LDAP_SLAPD_F (int) backend_attribute LDAP_P((Backend *be,
|
||||
Connection *conn,
|
||||
Operation *op,
|
||||
Entry *target,
|
||||
const char *e_ndn,
|
||||
AttributeDescription *entry_at,
|
||||
const char ***vals
|
||||
));
|
||||
|
||||
LDAP_SLAPD_F (Attribute *) backend_operational( Backend *, Entry * );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -757,6 +757,7 @@ struct slap_backend_db {
|
|||
#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_controls bd_info->bi_controls
|
||||
|
||||
|
|
@ -929,6 +930,11 @@ struct slap_backend_info {
|
|||
Entry *e, const char *bdn, const char *edn,
|
||||
ObjectClass *group_oc,
|
||||
AttributeDescription *group_at ));
|
||||
int (*bi_acl_attribute) LDAP_P((Backend *bd,
|
||||
struct slap_conn *c, struct slap_op *o,
|
||||
Entry *e, const char *edn,
|
||||
AttributeDescription *entry_at,
|
||||
const char ***vals ));
|
||||
|
||||
int (*bi_connection_init) LDAP_P((BackendDB *bd,
|
||||
struct slap_conn *c));
|
||||
|
|
|
|||
Loading…
Reference in a new issue