mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
A subentries control framework
This commit is contained in:
parent
2a0bb35194
commit
2958cb4dd0
@ -187,12 +187,13 @@ typedef struct ldapcontrol {
|
|||||||
#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040U
|
#define LDAP_CHASE_EXTERNAL_REFERRALS 0x0040U
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.666.5.1"
|
||||||
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
|
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
|
||||||
|
|
||||||
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
|
|
||||||
#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
|
#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
|
||||||
#define LDAP_CONTROL_DUPENT_RESPONSE "2.16.840.1.113719.1.27.101.2"
|
#define LDAP_CONTROL_DUPENT_RESPONSE "2.16.840.1.113719.1.27.101.2"
|
||||||
#define LDAP_CONTROL_DUPENT_ENTRY "2.16.840.1.113719.1.27.101.3"
|
#define LDAP_CONTROL_DUPENT_ENTRY "2.16.840.1.113719.1.27.101.3"
|
||||||
|
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
|
||||||
|
|
||||||
/* Experimental Controls */
|
/* Experimental Controls */
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
char *supportedControls[] = {
|
char *supportedControls[] = {
|
||||||
LDAP_CONTROL_MANAGEDSAIT,
|
LDAP_CONTROL_MANAGEDSAIT,
|
||||||
|
LDAP_CONTROL_SUBENTRIES,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -244,3 +245,26 @@ int get_manageDSAit( Operation *op )
|
|||||||
|
|
||||||
return SLAP_NO_CONTROL;
|
return SLAP_NO_CONTROL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int get_subentries( Operation *op, int *visibility )
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
if( op == NULL || op->o_ctrls == NULL ) {
|
||||||
|
return SLAP_NO_CONTROL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for( i=0; op->o_ctrls[i] != NULL; i++ ) {
|
||||||
|
if( strcmp( LDAP_CONTROL_SUBENTRIES,
|
||||||
|
op->o_ctrls[i]->ldctl_oid ) == 0 )
|
||||||
|
{
|
||||||
|
/* need to parse the value */
|
||||||
|
*visibility = 0;
|
||||||
|
|
||||||
|
return op->o_ctrls[i]->ldctl_iscritical
|
||||||
|
? SLAP_CRITICAL_CONTROL
|
||||||
|
: SLAP_NONCRITICAL_CONTROL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SLAP_NO_CONTROL;
|
||||||
|
}
|
||||||
|
@ -297,6 +297,7 @@ LDAP_SLAPD_F (int) get_ctrls LDAP_P((
|
|||||||
int senderrors ));
|
int senderrors ));
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) get_manageDSAit LDAP_P(( Operation *op ));
|
LDAP_SLAPD_F (int) get_manageDSAit LDAP_P(( Operation *op ));
|
||||||
|
LDAP_SLAPD_F (int) get_subentries LDAP_P(( Operation *op, int *visibility ));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* config.c
|
* config.c
|
||||||
|
Loading…
Reference in New Issue
Block a user