Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/dsdb/schema/schema.h

    r414 r745  
    2323#define _DSDB_SCHEMA_H
    2424
     25#include "prefixmap.h"
     26
    2527struct dsdb_attribute;
    2628struct dsdb_class;
    2729struct dsdb_schema;
     30struct dsdb_dn;
     31
     32struct dsdb_syntax_ctx {
     33        struct ldb_context *ldb;
     34        const struct dsdb_schema *schema;
     35
     36        /* set when converting objects under Schema NC */
     37        bool is_schema_nc;
     38
     39        /* remote prefixMap to be used for drsuapi_to_ldb conversions */
     40        const struct dsdb_schema_prefixmap *pfm_remote;
     41};
     42
    2843
    2944struct dsdb_syntax {
     
    3853        const char *ldb_syntax;
    3954
    40         WERROR (*drsuapi_to_ldb)(struct ldb_context *ldb,
    41                                  const struct dsdb_schema *schema,
     55        WERROR (*drsuapi_to_ldb)(const struct dsdb_syntax_ctx *ctx,
    4256                                 const struct dsdb_attribute *attr,
    4357                                 const struct drsuapi_DsReplicaAttribute *in,
    4458                                 TALLOC_CTX *mem_ctx,
    4559                                 struct ldb_message_element *out);
    46         WERROR (*ldb_to_drsuapi)(struct ldb_context *ldb,
    47                                  const struct dsdb_schema *schema,
     60        WERROR (*ldb_to_drsuapi)(const struct dsdb_syntax_ctx *ctx,
    4861                                 const struct dsdb_attribute *attr,
    4962                                 const struct ldb_message_element *in,
    5063                                 TALLOC_CTX *mem_ctx,
    5164                                 struct drsuapi_DsReplicaAttribute *out);
     65        WERROR (*validate_ldb)(const struct dsdb_syntax_ctx *ctx,
     66                               const struct dsdb_attribute *attr,
     67                               const struct ldb_message_element *in);
    5268};
    5369
     
    6177        struct GUID schemaIDGUID;
    6278        uint32_t mAPIID;
     79        uint32_t msDS_IntId;
    6380
    6481        struct GUID attributeSecurityGUID;
     82        struct GUID objectGUID;
    6583
    6684        uint32_t searchFlags;
     
    103121        uint32_t governsID_id;
    104122        struct GUID schemaIDGUID;
     123        struct GUID objectGUID;
    105124
    106125        uint32_t objectClassCategory;
     
    120139        const char **mayContain;
    121140        const char **possibleInferiors;
     141        const char **systemPossibleInferiors;
    122142
    123143        const char *defaultSecurityDescriptor;
     
    134154        bool systemOnly;
    135155
    136         char **supclasses;
    137         char **subclasses;
    138         char **subclasses_direct;
    139         char **posssuperiors;
     156        const char **supclasses;
     157        const char **subclasses;
     158        const char **subclasses_direct;
     159        const char **posssuperiors;
    140160        uint32_t subClassOf_id;
    141161        uint32_t *systemAuxiliaryClass_ids;
     
    156176};
    157177
    158 struct dsdb_schema_oid_prefix {
    159         uint32_t id;
    160         const char *oid;
    161         size_t oid_len;
    162 };
     178/**
     179 * data stored in schemaInfo attribute
     180 */
     181struct dsdb_schema_info {
     182        uint32_t        revision;
     183        struct GUID     invocation_id;
     184};
     185
    163186
    164187struct dsdb_schema {
    165         uint32_t num_prefixes;
    166         struct dsdb_schema_oid_prefix *prefixes;
     188        struct ldb_dn *base_dn;
     189
     190        struct dsdb_schema_prefixmap *prefixmap;
    167191
    168192        /*
     
    176200        const char *schema_info;
    177201
     202        /* We can also tell the schema version from the USN on the partition */
     203        uint64_t loaded_usn;
     204
    178205        struct dsdb_attribute *attributes;
    179206        struct dsdb_class *classes;
     
    193220        struct dsdb_attribute **attributes_by_attributeID_oid;
    194221        struct dsdb_attribute **attributes_by_linkID;
     222        uint32_t num_int_id_attr;
     223        struct dsdb_attribute **attributes_by_msDS_IntId;
    195224
    196225        struct {
     
    199228        } fsmo;
    200229
    201         struct smb_iconv_convenience *iconv_convenience;
     230        /* Was this schema loaded from ldb (if so, then we will reload it when we detect a change in ldb) */
     231        struct ldb_module *loaded_from_module;
     232        struct dsdb_schema *(*refresh_fn)(struct ldb_module *module, struct dsdb_schema *schema, bool is_global_schema);
     233        bool refresh_in_progress;
     234        /* an 'opaque' sequence number that the reload function may also wish to use */
     235        uint64_t reload_seq_number;
     236
     237        /* Should the syntax handlers in this case handle all incoming OIDs automatically, assigning them as an OID if no text name is known? */
     238        bool relax_OID_conversions;
    202239};
    203240
Note: See TracChangeset for help on using the changeset viewer.