X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fslap.h;h=29755901fea50c993e6d9202bf872225615442a9;hb=af866c3b44ba37577671f2bffd482499f4b8bc00;hp=da0d71040eba205be8ed9e0ac157e3a79e43efd2;hpb=85bc7ccd2c9f9dafbe126125a9af0d9a127d233e;p=openldap diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index da0d71040e..29755901fe 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -58,9 +58,10 @@ LDAP_BEGIN_DECL -#define SLAP_ACL_HONOR_DISCLOSE /* partially implemented */ #ifdef LDAP_DEVEL +#define SLAP_ACL_HONOR_DISCLOSE /* partially implemented */ +#define SLAP_ACL_HONOR_MANAGE /* not yet implemented */ #define SLAP_DYNACL #define LDAP_COMP_MATCH #define LDAP_DYNAMIC_OBJECTS @@ -68,6 +69,8 @@ LDAP_BEGIN_DECL #define LDAP_COLLECTIVE_ATTRIBUTES #define SLAP_CONTROL_X_TREE_DELETE LDAP_CONTROL_X_TREE_DELETE +#define SLAP_USE_CONFDIR /* partially implemented */ + #ifdef ENABLE_REWRITE #define SLAP_AUTH_REWRITE 1 /* use librewrite for sasl-regexp */ #endif @@ -322,7 +325,9 @@ typedef struct slap_oid_macro { struct berval som_oid; BerVarray som_names; BerVarray som_subs; - LDAP_SLIST_ENTRY(slap_oid_macro) som_next; +#define SLAP_OM_HARDCODE 0x10000U /* This is hardcoded schema */ + int som_flags; + LDAP_STAILQ_ENTRY(slap_oid_macro) som_next; } OidMacro; /* forward declarations */ @@ -647,9 +652,12 @@ typedef struct slap_attribute_type { #endif #define SLAP_AT_DYNAMIC 0x0400U /* dynamically generated */ +#define SLAP_AT_ORDERED 0x0001U /* values are ordered */ +#define SLAP_AT_HARDCODE 0x10000U /* This is hardcoded schema */ + slap_mask_t sat_flags; - LDAP_SLIST_ENTRY(slap_attribute_type) sat_next; + LDAP_STAILQ_ENTRY(slap_attribute_type) sat_next; #define sat_oid sat_atype.at_oid #define sat_names sat_atype.at_names @@ -703,7 +711,7 @@ typedef struct slap_object_class { #define soc_at_oids_may soc_oclass.oc_at_oids_may #define soc_extensions soc_oclass.oc_extensions - LDAP_SLIST_ENTRY(slap_object_class) soc_next; + LDAP_STAILQ_ENTRY(slap_object_class) soc_next; } ObjectClass; #define SLAP_OC_ALIAS 0x0001 @@ -722,6 +730,7 @@ typedef struct slap_object_class { #else #define SLAP_OC_HIDE 0x8000 #endif +#define SLAP_OC_HARDCODE 0x10000U /* This is hardcoded schema */ /* * DIT content rule @@ -742,7 +751,10 @@ typedef struct slap_content_rule { #define scr_at_oids_may scr_crule.cr_at_oids_may #define scr_at_oids_not scr_crule.cr_at_oids_not - LDAP_SLIST_ENTRY( slap_content_rule ) scr_next; +#define SLAP_CR_HARDCODE 0x10000U + int scr_flags; + + LDAP_STAILQ_ENTRY( slap_content_rule ) scr_next; } ContentRule; /* Represents a recognized attribute description ( type + options ). */ @@ -1161,6 +1173,7 @@ typedef enum slap_style_e { ACL_STYLE_ONE, ACL_STYLE_SUBTREE, ACL_STYLE_CHILDREN, + ACL_STYLE_LEVEL, ACL_STYLE_ATTROF, ACL_STYLE_ANONYMOUS, ACL_STYLE_USERS, @@ -1290,6 +1303,8 @@ typedef struct slap_access { #define a_dn_pat a_authz.sai_dn slap_style_t a_dn_style; + int a_dn_level; + int a_dn_self_level; AttributeDescription *a_dn_at; int a_dn_self; int a_dn_expand; @@ -1377,11 +1392,13 @@ typedef struct slap_acl_state { typedef struct slap_backend_info BackendInfo; /* per backend type */ typedef struct slap_backend_db BackendDB; /* per backend database */ +typedef LDAP_STAILQ_HEAD(BeI, slap_backend_info) slap_bi_head; +typedef LDAP_STAILQ_HEAD(BeDB, slap_backend_db) slap_be_head; LDAP_SLAPD_V (int) nBackendInfo; LDAP_SLAPD_V (int) nBackendDB; -LDAP_SLAPD_V (BackendInfo *) backendInfo; -LDAP_SLAPD_V (BackendDB *) backendDB; +LDAP_SLAPD_V (slap_bi_head) backendInfo; +LDAP_SLAPD_V (slap_be_head) backendDB; LDAP_SLAPD_V (BackendDB *) frontendDB; LDAP_SLAPD_V (int) slapMode; @@ -1724,6 +1741,7 @@ struct slap_backend_db { struct ConfigTable *be_cf_table; void *be_private; /* anything the backend database needs */ + LDAP_STAILQ_ENTRY(slap_backend_db) be_next; }; struct slap_conn; @@ -2056,6 +2074,7 @@ struct slap_backend_info { unsigned int bi_nDB; /* number of databases of this type */ struct ConfigTable *bi_cf_table; void *bi_private; /* anything the backend type needs */ + LDAP_STAILQ_ENTRY(slap_backend_info) bi_next ; }; #define c_authtype c_authz.sai_method @@ -2147,6 +2166,9 @@ struct slap_control_ids { int sc_modifyIncrement; int sc_noOp; int sc_pagedResults; +#ifdef LDAP_DEVEL + int sc_sortedResults; +#endif int sc_valuesReturnFilter; int sc_permissiveModify; int sc_domainScope; @@ -2351,10 +2373,13 @@ typedef struct slap_op { #define o_pagedresults o_ctrlflag[slap_cids.sc_pagedResults] #define o_pagedresults_state o_controls[slap_cids.sc_pagedResults] +#define get_pagedresults(op) ((int)(op)->o_pagedresults) -#define o_sync o_ctrlflag[slap_cids.sc_LDAPsync] +#ifdef LDAP_DEVEL +#define o_sortedresults o_ctrlflag[slap_cids.sc_sortedResults] +#endif -#define get_pagedresults(op) ((int)(op)->o_pagedresults) +#define o_sync o_ctrlflag[slap_cids.sc_LDAPsync] AuthorizationInformation o_authz; @@ -2909,11 +2934,10 @@ struct zone_heap { #endif #define SLAP_BACKEND_INIT_MODULE(b) \ + static BackendInfo bi; \ int \ init_module( int argc, char *argv[] ) \ { \ - BackendInfo bi; \ - memset( &bi, '\0', sizeof( bi ) ); \ bi.bi_type = #b ; \ bi.bi_init = b ## _back_initialize; \ backend_add( &bi ); \