]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
Cleanup result handling
[openldap] / servers / slapd / slap.h
index 357858ddfa98d727252e1f5eaaa803048c2fa4ac..0112072d57e529a7536c099f32c38d6e38956cf7 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2004 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -769,6 +769,7 @@ struct slap_internal_schema {
 
        AttributeDescription *si_ad_dseType;
        AttributeDescription *si_ad_syncreplCookie;
+       AttributeDescription *si_ad_syncTimestamp;
        AttributeDescription *si_ad_contextCSN;
 
        /* root DSE attribute descriptions */
@@ -1077,11 +1078,14 @@ typedef enum slap_control_e {
 
 typedef enum slap_style_e {
        ACL_STYLE_REGEX = 0,
+       ACL_STYLE_EXPAND,
        ACL_STYLE_BASE,
        ACL_STYLE_ONE,
        ACL_STYLE_SUBTREE,
        ACL_STYLE_CHILDREN,
-       ACL_STYLE_ATTROF
+       ACL_STYLE_ATTROF,
+       ACL_STYLE_IP,
+       ACL_STYLE_PATH
 } slap_style_t;
 
 typedef struct slap_authz_info {
@@ -1170,6 +1174,10 @@ typedef struct slap_access {
 
        slap_style_t a_peername_style;
        struct berval   a_peername_pat;
+       unsigned long   a_peername_addr,
+                       a_peername_mask;
+       int             a_peername_port;
+
        slap_style_t a_sockname_style;
        struct berval   a_sockname_pat;
 
@@ -1280,24 +1288,37 @@ struct slap_limits_set {
 };
 
 struct slap_limits {
-       int     lm_type;        /* type of pattern */
-#define SLAP_LIMITS_UNDEFINED  0x0000
-#define SLAP_LIMITS_EXACT              0x0001
+       unsigned                lm_flags;       /* type of pattern */
+#define SLAP_LIMITS_UNDEFINED          0x0000U
+#define SLAP_LIMITS_EXACT              0x0001U
 #define SLAP_LIMITS_BASE               SLAP_LIMITS_EXACT
-#define SLAP_LIMITS_ONE                        0x0002
-#define SLAP_LIMITS_SUBTREE            0x0003
-#define SLAP_LIMITS_CHILDREN   0x0004
-#define SLAP_LIMITS_REGEX              0x0005
-#define SLAP_LIMITS_ANONYMOUS  0x0006
-#define SLAP_LIMITS_USERS              0x0007
-#define SLAP_LIMITS_ANY                        0x0008
-       regex_t lm_dn_regex;            /* regex data for REGEX */
+#define SLAP_LIMITS_ONE                        0x0002U
+#define SLAP_LIMITS_SUBTREE            0x0003U
+#define SLAP_LIMITS_CHILDREN           0x0004U
+#define SLAP_LIMITS_REGEX              0x0005U
+#define SLAP_LIMITS_ANONYMOUS          0x0006U
+#define SLAP_LIMITS_USERS              0x0007U
+#define SLAP_LIMITS_ANY                        0x0008U
+#define SLAP_LIMITS_MASK               0x000FU
+
+#define SLAP_LIMITS_TYPE_DN            0x0000U
+#define SLAP_LIMITS_TYPE_GROUP         0x0010U
+#define SLAP_LIMITS_TYPE_MASK          0x00F0U
+
+       regex_t                 lm_regex;       /* regex data for REGEX */
 
        /*
         * normalized DN for EXACT, BASE, ONE, SUBTREE, CHILDREN;
         * pattern for REGEX; NULL for ANONYMOUS, USERS
         */
-       struct berval lm_dn_pat;
+       struct berval           lm_pat;
+
+       /* if lm_flags & SLAP_LIMITS_TYPE_MASK == SLAP_LIMITS_GROUP,
+        * lm_group_oc is objectClass and lm_group_at is attributeType
+        * of member in oc for match; then lm_flags & SLAP_LIMITS_MASK
+        * can only be SLAP_LIMITS_EXACT */
+       ObjectClass             *lm_group_oc;
+       AttributeDescription    *lm_group_ad;
 
        struct slap_limits_set  lm_limits;
 };
@@ -1517,7 +1538,7 @@ struct slap_backend_db {
        void    *be_private;    /* anything the backend database needs     */
 
        void    *be_pb;         /* Netscape plugin */
-       LDAP_TAILQ_HEAD( pcl, slap_csn_entry )  be_pending_csn_list;
+       LDAP_TAILQ_HEAD( be_pcl, slap_csn_entry )       be_pending_csn_list;
        ldap_pvt_thread_mutex_t                                 be_pcl_mutex;
        struct berval                                                   be_context_csn;
        ldap_pvt_thread_mutex_t                                 be_context_csn_mutex;
@@ -1556,6 +1577,8 @@ typedef struct req_search_s {
        int rs_deref;
        int rs_slimit;
        int rs_tlimit;
+       /* NULL means be_isroot evaluated to TRUE */
+       struct slap_limits_set *rs_limit;
        int rs_attrsonly;
        AttributeName *rs_attrs;
        Filter *rs_filter;
@@ -1591,6 +1614,14 @@ typedef struct req_extended_s {
        struct berval *rs_reqdata;
 } req_extended_s;
 
+typedef struct req_pwdexop_s {
+       struct berval rs_reqoid;
+       struct berval rs_old;
+       struct berval rs_new;
+       Modifications *rs_mods;
+       Modifications **rs_modtail;
+} req_pwdexop_s;
+
 typedef enum slap_reply_e {
        REP_RESULT,
        REP_SASL,
@@ -1918,6 +1949,7 @@ typedef struct slap_op {
                req_abandon_s oq_abandon;
                req_abandon_s oq_cancel;
                req_extended_s oq_extended;
+               req_pwdexop_s oq_pwdexop;
        } o_request;
 
 /* short hands for union members */
@@ -1930,6 +1962,7 @@ typedef struct slap_op {
 #define oq_abandon o_request.oq_abandon
 #define oq_cancel o_request.oq_cancel
 #define oq_extended o_request.oq_extended
+#define oq_pwdexop o_request.oq_pwdexop
 
 /* short hands for inner request members */
 #define orb_method oq_bind.rb_method
@@ -1941,6 +1974,7 @@ typedef struct slap_op {
 #define ors_deref oq_search.rs_deref
 #define ors_slimit oq_search.rs_slimit
 #define ors_tlimit oq_search.rs_tlimit
+#define ors_limit oq_search.rs_limit
 #define ors_attrsonly oq_search.rs_attrsonly
 #define ors_attrs oq_search.rs_attrs
 #define ors_filter oq_search.rs_filter
@@ -2004,6 +2038,13 @@ typedef struct slap_op {
 #define get_domainScope(op)                            ((int)(op)->o_domain_scope)
 #else
 #define get_domainScope(op)                            (0)
+#endif
+
+#ifdef LDAP_CONTROL_X_TREE_DELETE
+       char o_tree_delete;
+#define get_treeDelete(op)                             ((int)(op)->o_tree_delete)
+#else
+#define get_treeDelete(op)                             (0)
 #endif
 
        char o_preread;
@@ -2060,6 +2101,7 @@ typedef struct slap_op {
        ValuesReturnFilter *o_vrFilter; /* ValuesReturnFilter */
 
        int o_nocaching;
+       int     o_delete_glue_parent;
 
 #ifdef LDAP_SLAPI
        void    *o_pb;                  /* NS-SLAPI plugin */
@@ -2106,6 +2148,7 @@ typedef struct slap_listener Listener;
 typedef struct slap_conn {
        int                     c_struct_state; /* structure management state */
        int                     c_conn_state;   /* connection state */
+       int                     c_conn_idx;             /* slot in connections array */
 
        ldap_pvt_thread_mutex_t c_mutex; /* protect the connection */
        Sockbuf         *c_sb;                  /* ber connection stuff           */