]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
don't segfault if a database doesn't have the suffix
[openldap] / servers / slapd / slap.h
index d67b3ee8d2149043bd39f97b2504efeb683eb32f..56a36e3ef98201bd122a08672498b209854fc203 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
@@ -103,13 +103,13 @@ LDAP_BEGIN_DECL
 #define SLAP_TEXT_BUFLEN (256)
 
 /* psuedo error code indicating abandoned operation */
-#define SLAPD_ABANDON (-1)
+#define SLAPD_ABANDON (-1024)
 
 /* psuedo error code indicating disconnect */
-#define SLAPD_DISCONNECT (-2)
+#define SLAPD_DISCONNECT (-1025)
 
 /* unknown config file directive */
-#define SLAP_CONF_UNKNOWN (-2)
+#define SLAP_CONF_UNKNOWN (-1026)
 
 /* We assume "C" locale, that is US-ASCII */
 #define ASCII_SPACE(c) ( (c) == ' ' )
@@ -720,6 +720,7 @@ typedef struct slap_attr_desc {
 typedef struct slap_attr_name {
        struct berval an_name;
        AttributeDescription *an_desc;
+       int an_oc_exclude;
        ObjectClass *an_oc;
 } AttributeName;
 
@@ -768,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 */
@@ -870,9 +872,10 @@ typedef struct slap_mr_assertion {
  */
 typedef struct slap_filter {
        ber_tag_t       f_choice;       /* values taken from ldap.h, plus: */
-#define SLAPD_FILTER_COMPUTED  ((ber_tag_t) -1)
-#define SLAPD_FILTER_DN_ONE            ((ber_tag_t) -2)
-#define SLAPD_FILTER_DN_SUBTREE        ((ber_tag_t) -3)
+#define SLAPD_FILTER_COMPUTED          ((ber_tag_t) -1)
+#define SLAPD_FILTER_DN_ONE                    ((ber_tag_t) -2)
+#define SLAPD_FILTER_DN_SUBTREE                ((ber_tag_t) -3)
+#define SLAPD_FILTER_DN_CHILDREN       ((ber_tag_t) -4)
 
        union f_un_u {
                /* precomputed result */
@@ -1083,7 +1086,7 @@ typedef enum slap_style_e {
 } slap_style_t;
 
 typedef struct slap_authz_info {
-       ber_tag_t       sai_method;             /* LDAP_AUTH_* from <ldap.h> */
+       ber_tag_t       sai_method;                     /* LDAP_AUTH_* from <ldap.h> */
        struct berval   sai_mech;               /* SASL Mechanism */
        struct berval   sai_dn;                 /* DN for reporting purposes */
        struct berval   sai_ndn;                /* Normalized DN */
@@ -1280,15 +1283,15 @@ struct slap_limits_set {
 struct slap_limits {
        int     lm_type;        /* type of pattern */
 #define SLAP_LIMITS_UNDEFINED  0x0000
-#define SLAP_LIMITS_EXACT      0x0001
-#define SLAP_LIMITS_BASE       SLAP_LIMITS_EXACT
-#define SLAP_LIMITS_ONE                0x0002
-#define SLAP_LIMITS_SUBTREE    0x0003
+#define SLAP_LIMITS_EXACT              0x0001
+#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_REGEX              0x0005
 #define SLAP_LIMITS_ANONYMOUS  0x0006
-#define SLAP_LIMITS_USERS      0x0007
-#define SLAP_LIMITS_ANY                0x0008
+#define SLAP_LIMITS_USERS              0x0007
+#define SLAP_LIMITS_ANY                        0x0008
        regex_t lm_dn_regex;            /* regex data for REGEX */
 
        /*
@@ -2016,10 +2019,10 @@ typedef struct slap_op {
 
        char o_sync;
        char o_sync_mode;
-#define SLAP_SYNC_NONE                                 (0x0)
-#define SLAP_SYNC_REFRESH                              (0x1)
-#define SLAP_SYNC_PERSIST                              (0x2)
-#define SLAP_SYNC_REFRESH_AND_PERSIST  (0x3)
+#define SLAP_SYNC_NONE                                 LDAP_SYNC_NONE
+#define SLAP_SYNC_REFRESH                              LDAP_SYNC_REFRESH_ONLY
+#define SLAP_SYNC_PERSIST                              LDAP_SYNC_RESERVED
+#define SLAP_SYNC_REFRESH_AND_PERSIST  LDAP_SYNC_REFRESH_AND_PERSIST
        struct sync_cookie      o_sync_state;
        int                                     o_sync_rhint;
        struct berval           o_sync_cid;
@@ -2292,7 +2295,7 @@ typedef int (SLAP_CTRL_PARSE_FN) LDAP_P((
        SlapReply *rs,
        LDAPControl *ctrl ));
 
-#define SLMALLOC_SLAB_SIZE     1048576
+#define SLMALLOC_SLAB_SIZE     (1024*1024)
 
 LDAP_END_DECL