]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
add logs; fix bug in group/dn selection logic
[openldap] / servers / slapd / slap.h
index f56fb0617ed5959a3e23c9218fb2551b3a32449b..2203393f0a74c69f0539cc9ea591d212f73530a4 100644 (file)
@@ -530,8 +530,8 @@ typedef struct slap_matching_rule {
         */
        struct slap_matching_rule       *smr_associated;
 
-#define SLAP_MR_ASSOCIATED(mr,amr)     (((mr) == (amr)) || \
-       ((mr)->smr_associated == (amr)))
+#define SLAP_MR_ASSOCIATED(mr,amr)     \
+       (((mr) == (amr)) || ((mr)->smr_associated == (amr)))
 
        LDAP_SLIST_ENTRY(slap_matching_rule)smr_next;
 
@@ -1034,7 +1034,6 @@ typedef struct slap_mod {
        AttributeDescription *sm_desc;
        struct berval sm_type;
        BerVarray sm_values;
-#define sm_bvalues sm_values
        BerVarray sm_nvalues;
 } Modification;
 
@@ -1043,7 +1042,6 @@ typedef struct slap_mod_list {
 #define sml_op         sml_mod.sm_op
 #define sml_desc       sml_mod.sm_desc
 #define        sml_type        sml_mod.sm_type
-#define sml_bvalues    sml_mod.sm_values
 #define sml_values     sml_mod.sm_values
 #define sml_nvalues    sml_mod.sm_nvalues
        struct slap_mod_list *sml_next;
@@ -1055,7 +1053,6 @@ typedef struct slap_ldap_modlist {
 #define ml_op          ml_mod.mod_op
 #define ml_type                ml_mod.mod_type
 #define ml_values      ml_mod.mod_values
-#define ml_bvalues     ml_mod.mod_values
 } LDAPModList;
 
 /*
@@ -1287,6 +1284,7 @@ struct slap_limits_set {
        int     lms_s_unchecked;
        int     lms_s_pr;
        int     lms_s_pr_hide;
+       int     lms_s_pr_total;
 };
 
 struct slap_limits {
@@ -1452,9 +1450,11 @@ struct slap_backend_db {
 #define SLAP_DBFLAG_NOLASTMOD          0x0001U
 #define SLAP_DBFLAG_NO_SCHEMA_CHECK    0x0002U
 #define        SLAP_DBFLAG_GLUE_INSTANCE       0x0010U /* a glue backend */
-#define        SLAP_DBFLAG_GLUE_SUBORDINATE 0x0020U    /* child of a glue hierarchy */
+#define        SLAP_DBFLAG_GLUE_SUBORDINATE    0x0020U /* child of a glue hierarchy */
 #define        SLAP_DBFLAG_GLUE_LINKED         0x0040U /* child is connected to parent */
-#define SLAP_DBFLAG_SHADOW                     0x8000U /* a shadow */
+#define SLAP_DBFLAG_SHADOW             0x8000U /* a shadow */
+#define SLAP_DBFLAG_SYNC_SHADOW                0x1000U /* a sync shadow */
+#define SLAP_DBFLAG_SLURP_SHADOW       0x2000U /* a slurp shadow */
        slap_mask_t     be_flags;
 #define SLAP_DBFLAGS(be)                       ((be)->be_flags)
 #define SLAP_NOLASTMOD(be)                     (SLAP_DBFLAGS(be) & SLAP_DBFLAG_NOLASTMOD)
@@ -1468,6 +1468,8 @@ struct slap_backend_db {
 #define        SLAP_GLUE_LINKED(be)            \
        (SLAP_DBFLAGS(be) & SLAP_DBFLAG_GLUE_LINKED)
 #define SLAP_SHADOW(be)                                (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SHADOW)
+#define SLAP_SYNC_SHADOW(be)                   (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SYNC_SHADOW)
+#define SLAP_SLURP_SHADOW(be)                  (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SLURP_SHADOW)
 
        slap_mask_t     be_restrictops;         /* restriction operations */
 #define SLAP_RESTRICT_OP_ADD           0x0001U
@@ -1687,18 +1689,23 @@ typedef int (BI_op_add) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
 typedef int (BI_op_delete) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
 typedef int (BI_op_abandon) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
 typedef int (BI_op_cancel) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
-typedef int (BI_op_extended) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
-typedef int (BI_chk_referrals) LDAP_P(( struct slap_op *op, struct slap_rep *rs ));
-typedef int (BI_entry_release_rw) LDAP_P(( struct slap_op *op, Entry *e, int rw ));
+typedef int (BI_op_extended) LDAP_P((
+       struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_chk_referrals) LDAP_P((
+       struct slap_op *op, struct slap_rep *rs ));
+typedef int (BI_entry_release_rw)
+       LDAP_P(( struct slap_op *op, Entry *e, int rw ));
 typedef int (BI_entry_get_rw) LDAP_P(( struct slap_op *op, struct berval *ndn,
        ObjectClass *oc, AttributeDescription *at, int rw, Entry **e ));
-typedef int (BI_operational) LDAP_P(( struct slap_op *op, struct slap_rep *rs, int opattrs, Attribute **ap ));
-typedef int (BI_has_subordinates) LDAP_P(( struct slap_op *op, Entry *e, int *hasSubs ));
+typedef int (BI_operational) LDAP_P(( struct slap_op *op, struct slap_rep *rs,
+       int opattrs, Attribute **ap ));
+typedef int (BI_has_subordinates) LDAP_P(( struct slap_op *op,
+       Entry *e, int *hasSubs ));
 
-typedef int (BI_connection_init) LDAP_P((BackendDB *bd,
-               struct slap_conn *c));
-typedef int (BI_connection_destroy) LDAP_P((BackendDB *bd,
-               struct slap_conn *c));
+typedef int (BI_connection_init) LDAP_P(( BackendDB *bd,
+       struct slap_conn *c ));
+typedef int (BI_connection_destroy) LDAP_P(( BackendDB *bd,
+       struct slap_conn *c ));
 
 typedef int (BI_tool_entry_open) LDAP_P(( BackendDB *be, int mode ));
 typedef int (BI_tool_entry_close) LDAP_P(( BackendDB *be ));
@@ -1706,13 +1713,13 @@ typedef ID (BI_tool_entry_first) LDAP_P(( BackendDB *be ));
 typedef ID (BI_tool_entry_next) LDAP_P(( BackendDB *be ));
 typedef Entry* (BI_tool_entry_get) LDAP_P(( BackendDB *be, ID id ));
 typedef ID (BI_tool_entry_put) LDAP_P(( BackendDB *be, Entry *e, 
-                       struct berval *text ));
+       struct berval *text ));
 typedef int (BI_tool_entry_reindex) LDAP_P(( BackendDB *be, ID id ));
 typedef int (BI_tool_sync) LDAP_P(( BackendDB *be ));
 typedef ID (BI_tool_dn2id_get) LDAP_P(( BackendDB *be, struct berval *dn ));
 typedef int (BI_tool_id2entry_get) LDAP_P(( BackendDB *be, ID id, Entry **e ));
 typedef ID (BI_tool_entry_modify) LDAP_P(( BackendDB *be, Entry *e, 
-                       struct berval *text ));
+       struct berval *text ));
 
 struct slap_backend_info {
        char    *bi_type; /* type of backend */
@@ -1886,10 +1893,9 @@ typedef unsigned long PagedResultsCookie;
 typedef struct slap_paged_state {
        Backend *ps_be;
        PagedResultsCookie ps_cookie;
-       ID ps_id;
+       int ps_count;
 } PagedResultsState;
 
-
 #define LDAP_PSEARCH_BY_ADD                    0x01
 #define LDAP_PSEARCH_BY_DELETE         0x02
 #define LDAP_PSEARCH_BY_PREMODIFY      0x03
@@ -1917,13 +1923,13 @@ struct slap_session_entry {
 };
 
 struct slap_csn_entry {
-       struct berval *csn;
-       unsigned long opid;
-       unsigned long connid;
+       struct berval *ce_csn;
+       unsigned long ce_opid;
+       unsigned long ce_connid;
 #define SLAP_CSN_PENDING       1
 #define SLAP_CSN_COMMIT                2
-       long state;
-       LDAP_TAILQ_ENTRY (slap_csn_entry) csn_link;
+       long ce_state;
+       LDAP_TAILQ_ENTRY (slap_csn_entry) ce_csn_link;
 };
 
 /*
@@ -2356,6 +2362,11 @@ typedef int (SLAP_CTRL_PARSE_FN) LDAP_P((
 
 #define SLMALLOC_SLAB_SIZE     (1024*1024)
 
+#if defined(LDAP_DEVEL) && defined(ENABLE_REWRITE)
+/* use librewrite for sasl-regexp */
+#define SLAP_SASL_REWRITE      1
+#endif /* LDAP_DEVEL && ENABLE_REWRITE */
+
 LDAP_END_DECL
 
 #include "proto-slap.h"