]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
ITS#1716 is_entry_subentr/ies/y/
[openldap] / servers / slapd / slap.h
index 12d91995ab216ad21b63cf4e3d8340c30e87eaca..3ff6e17f10e4f6afebda4f60bffb059711a296ca 100644 (file)
@@ -69,7 +69,7 @@ LDAP_BEGIN_DECL
  */
 #define SLAP_MOD_SOFTADD       0x1000
 
-#define MAXREMATCHES (10)
+#define MAXREMATCHES (100)
 
 #define SLAP_MAX_WORKER_THREADS                (32)
 
@@ -136,7 +136,10 @@ LDAP_BEGIN_DECL
 #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" */
@@ -633,6 +636,7 @@ struct slap_internal_schema {
        MatchingRule    *si_mr_integerMatch;
 
        /* Syntaxes */
+       Syntax          *si_syn_octetString;
        Syntax          *si_syn_distinguishedName;
        Syntax          *si_syn_integer;
 };
@@ -907,6 +911,7 @@ typedef struct slap_access {
        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;
@@ -915,6 +920,8 @@ typedef struct slap_access {
 
        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;
@@ -948,6 +955,26 @@ typedef struct slap_acl {
        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
  */
@@ -982,6 +1009,7 @@ 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 {
@@ -1138,7 +1166,6 @@ struct slap_backend_db {
        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     */
 };
 
@@ -1391,28 +1418,44 @@ typedef struct slap_callback {
        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               */
@@ -1501,6 +1544,8 @@ typedef struct slap_conn {
        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 */