]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
cleanup bind
[openldap] / servers / slapd / slap.h
index 217d7c44afde0b29e635e6c09a110032b07e403e..074b3bae2aa091f7eaa0ed375428cde0edccddf1 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;
@@ -1435,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 method;
+       struct berval cred;
+       struct berval edn;
+} req_bind_s;
+
+typedef struct req_search_s {
+       int scope;
+       int deref;
+       int slimit;
+       int tlimit;
+       int attrsonly;
+       AttributeName *attrs;
+       Filter *f;
+       struct berval filterstr;
+} req_search_s;
+
+typedef struct req_compare_s {
+       AttributeAssertion *ava;
+} req_compare_s;
+
+typedef struct req_modrdn_s {
+       struct berval newrdn;
+       struct berval nnewrdn;
+       struct berval newSup;
+       struct berval nnewSup;
+       int deleteoldrdn;
+} req_modrdn_s;
+
+typedef struct req_add_s {
+       Entry *e;
+} req_add_s;
+
+typedef struct req_abandon_s {
+       ber_int_t msgid;
+} req_abandon_s;
+
+typedef struct req_extended_s {
+       struct berval reqoid;
+       char *rspoid;
+       struct berval *rspdata;
+       LDAPControl **rspctrls;
+       const char *text;
+       BerVarray 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,
@@ -1726,12 +1779,31 @@ 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 {
+               req_bind_s bind;
+               req_search_s srch;
+               req_compare_s comp;
+               req_modrdn_s mrdn;
+               req_add_s add;
+               req_abandon_s aban;
+               req_abandon_s cncl;
+               req_extended_s xtnd;
+       } o_req;
+#endif
+
        char *          o_extendedop;   /* extended operation OID */
 
        ldap_pvt_thread_t       o_tid;  /* thread handling this op */
@@ -1744,6 +1816,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
@@ -1826,6 +1899,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
@@ -2036,14 +2113,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)