2 Unix SMB/CIFS mplementation.
5 Copyright (C) Stefan Metzmacher <metze@samba.org> 2006
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _DSDB_SCHEMA_H
23 #define _DSDB_SCHEMA_H
25 struct dsdb_attribute;
33 struct ldb_val oMObjectClass;
34 const char *attributeSyntax_oid;
36 const char *substring;
38 const char *ldb_syntax;
40 WERROR (*drsuapi_to_ldb)(struct ldb_context *ldb,
41 const struct dsdb_schema *schema,
42 const struct dsdb_attribute *attr,
43 const struct drsuapi_DsReplicaAttribute *in,
45 struct ldb_message_element *out);
46 WERROR (*ldb_to_drsuapi)(struct ldb_context *ldb,
47 const struct dsdb_schema *schema,
48 const struct dsdb_attribute *attr,
49 const struct ldb_message_element *in,
51 struct drsuapi_DsReplicaAttribute *out);
54 struct dsdb_attribute {
55 struct dsdb_attribute *prev, *next;
58 const char *lDAPDisplayName;
59 const char *attributeID_oid;
60 uint32_t attributeID_id;
61 struct GUID schemaIDGUID;
64 struct GUID attributeSecurityGUID;
68 bool isMemberOfPartialAttributeSet;
71 const char *attributeSyntax_oid;
72 uint32_t attributeSyntax_id;
74 struct ldb_val oMObjectClass;
79 bool extendedCharsAllowed;
81 uint32_t schemaFlagsEx;
82 struct ldb_val msDs_Schema_Extensions;
84 bool showInAdvancedViewOnly;
85 const char *adminDisplayName;
86 const char *adminDescription;
87 const char *classDisplayName;
93 const struct dsdb_syntax *syntax;
97 struct dsdb_class *prev, *next;
100 const char *lDAPDisplayName;
101 const char *governsID_oid;
102 uint32_t governsID_id;
103 struct GUID schemaIDGUID;
105 uint32_t objectClassCategory;
106 const char *rDNAttID;
107 const char *defaultObjectCategory;
109 const char *subClassOf;
111 const char **systemAuxiliaryClass;
112 const char **systemPossSuperiors;
113 const char **systemMustContain;
114 const char **systemMayContain;
116 const char **auxiliaryClass;
117 const char **possSuperiors;
118 const char **mustContain;
119 const char **mayContain;
120 const char **possibleInferiors;
122 const char *defaultSecurityDescriptor;
124 uint32_t schemaFlagsEx;
125 struct ldb_val msDs_Schema_Extensions;
127 bool showInAdvancedViewOnly;
128 const char *adminDisplayName;
129 const char *adminDescription;
130 const char *classDisplayName;
131 bool defaultHidingValue;
136 struct dsdb_schema_oid_prefix {
143 uint32_t num_prefixes;
144 struct dsdb_schema_oid_prefix *prefixes;
147 * the last element of the prefix mapping table isn't a oid,
148 * it starts with 0xFF and has 21 bytes and is maybe a schema
151 * this is the content of the schemaInfo attribute of the
152 * Schema-Partition head object.
154 const char *schema_info;
156 struct dsdb_attribute *attributes;
157 struct dsdb_class *classes;
161 struct ldb_dn *master_dn;
164 struct smb_iconv_convenience *iconv_convenience;
167 enum dsdb_attr_list_query {
169 DSDB_SCHEMA_ALL_MUST,
171 DSDB_SCHEMA_SYS_MUST,
177 enum dsdb_schema_convert_target {
180 TARGET_AD_SCHEMA_SUBENTRY
183 #include "dsdb/schema/proto.h"
185 #endif /* _DSDB_SCHEMA_H */