]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
NVALUES: fix a couple of value_find_ex() calls
[openldap] / servers / slapd / slap.h
index 9dea20e0aacbf203ddce887ed69de49a0a32f87d..9e747fa5a383c921fb9f941057625a1c47e6eb1d 100644 (file)
@@ -730,6 +730,11 @@ struct slap_internal_schema {
        AttributeDescription *si_ad_entryCSN;
        AttributeDescription *si_ad_superiorUUID;
 
+#ifdef LDAP_CACHING
+       /* LDAP cache specific operational attribute */
+       AttributeDescription *si_ad_queryid;
+#endif /* LDAP_CACHING */
+
        /* root DSE attribute descriptions */
        AttributeDescription *si_ad_altServer;
        AttributeDescription *si_ad_namingContexts;
@@ -790,12 +795,17 @@ struct slap_internal_schema {
 
        /* Matching Rules */
        MatchingRule    *si_mr_distinguishedNameMatch;
+       MatchingRule    *si_mr_caseExactMatch;
+       MatchingRule    *si_mr_caseExactSubstringsMatch;
+       MatchingRule    *si_mr_caseExactIA5Match;
        MatchingRule    *si_mr_integerMatch;
+       MatchingRule    *si_mr_integerFirstComponentMatch;
 
        /* Syntaxes */
-       Syntax          *si_syn_octetString;
+       Syntax          *si_syn_directoryString;
        Syntax          *si_syn_distinguishedName;
        Syntax          *si_syn_integer;
+       Syntax          *si_syn_octetString;
 };
 
 typedef struct slap_attr_assertion {
@@ -1329,6 +1339,10 @@ struct slap_backend_db {
 #define SLAP_BFLAG_DYNAMIC             0x2000U
        slap_mask_t     be_flags;
 #define SLAP_LASTMOD(be)       (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD))
+#define        SLAP_GLUE_INSTANCE(be)  ((be)->be_flags & SLAP_BFLAG_GLUE_INSTANCE)
+#define        SLAP_GLUE_SUBORDINATE(be) \
+       ((be)->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE)
+#define        SLAP_GLUE_LINKED(be)    ((be)->be_flags & SLAP_BFLAG_GLUE_LINKED)
 #define SLAP_ALIASES(be)       ((be)->be_flags & SLAP_BFLAG_ALIASES)
 #define SLAP_REFERRALS(be)     ((be)->be_flags & SLAP_BFLAG_REFERRALS)
 #define SLAP_SUBENTRIES(be)    ((be)->be_flags & SLAP_BFLAG_SUBENTRIES)
@@ -1426,6 +1440,54 @@ typedef int (BI_db_open) LDAP_P((Backend *bd));
 typedef int (BI_db_close) LDAP_P((Backend *bd));
 typedef int (BI_db_destroy) LDAP_P((Backend *bd));
 
+#ifdef SLAP_OP_BLOCKS
+typedef struct req_bind_s {
+       int rb_method;
+       struct berval rb_cred;
+       struct berval rb_edn;
+} req_bind_s;
+
+typedef struct req_search_s {
+       int rs_scope;
+       int rs_deref;
+       int rs_slimit;
+       int rs_tlimit;
+       int rs_attrsonly;
+       AttributeName *rs_attrs;
+       Filter *rs_f;
+       struct berval rs_filterstr;
+} req_search_s;
+
+typedef struct req_compare_s {
+       AttributeAssertion *rs_ava;
+} req_compare_s;
+
+typedef struct req_modrdn_s {
+       struct berval rs_newrdn;
+       struct berval rs_nnewrdn;
+       struct berval rs_newSup;
+       struct berval rs_nnewSup;
+       int rs_deleteoldrdn;
+} req_modrdn_s;
+
+typedef struct req_add_s {
+       Entry *rs_e;
+} req_add_s;
+
+typedef struct req_abandon_s {
+       ber_int_t rs_msgid;
+} req_abandon_s;
+
+typedef struct req_extended_s {
+       struct berval rs_reqoid;
+       char *rs_rspoid;
+       struct berval *rs_rspdata;
+       LDAPControl **rs_rspctrls;
+       const char *rs_text;
+       BerVarray rs_refs;
+} req_extended_s;
+#endif /* SLAP_OP_BLOCKS */
+
 typedef int (BI_op_bind)  LDAP_P(( BackendDB *bd,
                struct slap_conn *c, struct slap_op *o,
                struct berval *dn, struct berval *ndn, int method,
@@ -1717,13 +1779,41 @@ typedef struct slap_op {
        unsigned long o_opid;   /* id of this operation */
        unsigned long o_connid; /* id of conn initiating this op */
        struct slap_conn *o_conn;       /* connection spawning this op */
+#ifdef SLAP_OP_BLOCKS
+       BackendDB       *o_bd;  /* backend DB processing this op */
+#endif
 
        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 */
 
+#ifdef SLAP_OP_BLOCKS
+       struct berval   o_req_dn;       /* DN of target of request */
+       struct berval   o_req_ndn;
+
+       union o_req_u {
+               req_bind_s or_bind;
+               req_search_s or_search;
+               req_compare_s or_compare;
+               req_modrdn_s or_modrdn;
+               req_add_s or_add;
+               req_abandon_s or_abandon;
+               req_abandon_s or_cancel;
+               req_extended_s or_extended;
+       } o_request;
+
+/* short hands for union members */
+#define o_bind o_request.or_bind
+/* ... */
+
+/* short hands for inner request members */
+#define o_bind_edn o_bind.rb_edn
+/* ... */
+
+#else
        char *          o_extendedop;   /* extended operation OID */
+#endif
 
        ldap_pvt_thread_t       o_tid;  /* thread handling this op */
 
@@ -1735,6 +1825,7 @@ typedef struct slap_op {
 #define SLAP_CANCEL_DONE                               0x03
 
        char o_do_not_cache;    /* don't cache from this op */
+       char o_is_auth_check;   /* authorization in progress */
 
 #define SLAP_NO_CONTROL 0
 #define SLAP_NONCRITICAL_CONTROL 1
@@ -1802,9 +1893,6 @@ typedef struct slap_op {
        LDAP_LIST_ENTRY(slap_op) link;
 #endif
 
-#ifdef LDAP_CONNECTIONLESS
-       Sockaddr        o_peeraddr;     /* UDP peer address               */
-#endif
        AuthorizationInformation o_authz;
 
        BerElement      *o_ber;         /* ber of the request             */
@@ -1820,6 +1908,10 @@ typedef struct slap_op {
        LDAP_STAILQ_ENTRY(slap_op)      o_next; /* next operation in list         */
        ValuesReturnFilter *vrFilter; /* Structure represents ValuesReturnFilter */
 
+#ifdef LDAP_CACHING 
+       char            o_caching_on; 
+#endif /*LDAP_CACHING */ 
+
 #ifdef LDAP_SLAPI
        void    *o_pb;                  /* NS-SLAPI plugin */
 #endif
@@ -2030,14 +2122,6 @@ typedef struct slap_conn {
                        fprintf( stderr, (fmt), (connid), (opid), (arg1), (arg2), (arg3) );\
        } while (0)
 #define StatslogTest( level ) (ldap_debug & (level))
-#elif defined(LDAP_SYSLOG)
-#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \
-       do { \
-               if ( ldap_syslog & (level) ) \
-                       syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \
-                               (arg2), (arg3) ); \
-       } while (0)
-#define StatslogTest( level ) (ldap_syslog & (level))
 #else
 #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 )
 #define StatslogTest( level ) (0)
@@ -2100,6 +2184,31 @@ enum {
 #define SLAP_SEARCH_MAX_CTRLS   10
 #endif
 
+#define SLAP_CTRL_FRONTEND                     0x80000000U
+#define SLAP_CTRL_FRONTEND_SEARCH      0x01000000U     /* for NOOP */
+
+#define SLAP_CTRL_OPFLAGS                      0x0000FFFFU
+#define SLAP_CTRL_ABANDON                      0x00000001U
+#define SLAP_CTRL_ADD                          0x00002002U
+#define SLAP_CTRL_BIND                         0x00000004U
+#define SLAP_CTRL_COMPARE                      0x00001008U
+#define SLAP_CTRL_DELETE                       0x00002010U
+#define SLAP_CTRL_MODIFY                       0x00002020U
+#define SLAP_CTRL_RENAME                       0x00002040U
+#define SLAP_CTRL_SEARCH                       0x00001080U
+#define SLAP_CTRL_UNBIND                       0x00000100U
+
+#define SLAP_CTRL_INTROGATE    (SLAP_CTRL_COMPARE|SLAP_CTRL_SEARCH)
+#define SLAP_CTRL_UPDATE \
+       (SLAP_CTRL_ADD|SLAP_CTRL_DELETE|SLAP_CTRL_MODIFY|SLAP_CTRL_RENAME)
+#define SLAP_CTRL_ACCESS       (SLAP_CTRL_INTROGATE|SLAP_CTRL_UPDATE)
+
+typedef int (SLAP_CTRL_PARSE_FN) LDAP_P((
+       Connection *conn,
+       Operation *op,
+       LDAPControl *ctrl,
+       const char **text ));
+
 LDAP_END_DECL
 
 #include "proto-slap.h"