*/
#define SLAP_MOD_SOFTADD 0x1000
-#define MAXREMATCHES (10)
+#define MAXREMATCHES (100)
#define SLAP_MAX_WORKER_THREADS (32)
#define SLAPD_ROLE_ATTR "roleOccupant"
#define SLAPD_ROLE_CLASS "organizationalRole"
+#ifdef SLAPD_ACI_ENABLED
#define SLAPD_ACI_SYNTAX "1.3.6.1.4.1.4203.666.2.1"
+#endif
+
#define SLAPD_OCTETSTRING_SYNTAX "1.3.6.1.4.1.1466.115.121.1.40"
/* change this to "OpenLDAPset" */
} AttributeName;
#define slap_ad_is_lang(ad) ( (ad)->ad_lang.bv_len != 0 )
-#define slap_ad_is_binary(ad) \
- ( ((ad)->ad_flags & SLAP_DESC_LANG_RANGE) ? 1 : 0 )
#define slap_ad_is_lang_range(ad) \
+ ( ((ad)->ad_flags & SLAP_DESC_LANG_RANGE) ? 1 : 0 )
+#define slap_ad_is_binary(ad) \
( ((ad)->ad_flags & SLAP_DESC_BINARY) ? 1 : 0 )
/*
MatchingRule *si_mr_integerMatch;
/* Syntaxes */
+ Syntax *si_syn_octetString;
Syntax *si_syn_distinguishedName;
Syntax *si_syn_integer;
};
slap_style_t a_dn_style;
AttributeDescription *a_dn_at;
int a_dn_self;
+ int a_dn_expand;
slap_style_t a_peername_style;
struct berval a_peername_pat;
slap_style_t a_domain_style;
struct berval a_domain_pat;
+ int a_domain_expand;
+
slap_style_t a_sockurl_style;
struct berval a_sockurl_pat;
slap_style_t a_set_style;
struct slap_acl *acl_next;
} AccessControl;
+typedef struct slap_acl_state {
+ unsigned as_recorded;
+#define ACL_STATE_NOT_RECORDED 0x0
+#define ACL_STATE_RECORDED_VD 0x1
+#define ACL_STATE_RECORDED_NV 0x2
+#define ACL_STATE_RECORDED 0x3
+
+ /* Access state */
+ AccessControl *as_vd_acl;
+ slap_mask_t as_vd_acl_mask;
+ regmatch_t as_vd_acl_matches[MAXREMATCHES];
+ int as_vd_acl_count;
+
+ Access *as_vd_access;
+ int as_vd_access_count;
+
+ int as_result;
+} AccessControlState;
+#define ACL_STATE_INIT { ACL_STATE_NOT_RECORDED, NULL, 0UL, { { 0, 0 } }, 0, NULL, 0, 0 }
+
/*
* replog moddn param structure
*/
struct slap_replica_info {
char *ri_host; /* supersedes be_replica */
struct berval **ri_nsuffix; /* array of suffixes this replica accepts */
+ AttributeName *ri_attrs; /* attrs to replicate, NULL=all */
+ int ri_exclude; /* 1 => exclude ri_attrs */
};
struct slap_limits_set {
struct berval be_update_ndn; /* allowed to make changes (in replicas) */
BerVarray be_update_refs; /* where to refer modifying clients to */
char *be_realm;
-
void *be_private; /* anything the backend database needs */
};
void *sc_private;
} slap_callback;
+/*
+ * Paged Results state
+ */
+typedef unsigned long PagedResultsCookie;
+typedef struct slap_paged_state {
+ Backend *ps_be;
+ PagedResultsCookie ps_cookie;
+ ID ps_id;
+} PagedResultsState;
+
/*
* represents an operation pending from an ldap client
*/
typedef struct slap_op {
- ber_int_t o_opid; /* id of this operation */
- ber_int_t o_msgid; /* msgid of the request */
+ unsigned long o_opid; /* id of this operation */
+ unsigned long o_connid; /* id of conn initiating this op */
+
+ ber_int_t o_msgid; /* msgid of the request */
ber_int_t o_protocol; /* version of the LDAP protocol used by client */
- ber_tag_t o_tag; /* tag of the request */
- time_t o_time; /* time op was initiated */
- unsigned long o_connid; /* id of conn initiating this op */
- ldap_pvt_thread_t o_tid; /* thread handling this op */
+ ber_tag_t o_tag; /* tag of the request */
+ time_t o_time; /* time op was initiated */
+
+ ldap_pvt_thread_t o_tid; /* thread handling this op */
+
+ ldap_pvt_thread_mutex_t o_abandonmutex; /* protects o_abandon */
+ char o_abandon; /* abandon flag */
#define SLAP_NO_CONTROL 0
#define SLAP_NONCRITICAL_CONTROL 1
#define SLAP_CRITICAL_CONTROL 2
char o_managedsait;
+ char o_noop;
char o_subentries;
char o_subentries_visibility;
- char o_noop;
- char o_abandon; /* abandon flag */
- ldap_pvt_thread_mutex_t o_abandonmutex; /* protects o_abandon */
+ char o_pagedresults;
+ ber_int_t o_pagedresults_size;
+ PagedResultsState o_pagedresults_state;
#ifdef LDAP_CONNECTIONLESS
Sockaddr o_peeraddr; /* UDP peer address */
void *c_sasl_context; /* SASL session context */
void *c_sasl_extra; /* SASL session extra stuff */
+ PagedResultsState c_pagedresults_state; /* paged result state */
+
long c_n_ops_received; /* num of ops received (next op_id) */
long c_n_ops_executing; /* num of ops currently executing */
long c_n_ops_pending; /* num of ops pending execution */