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)(const struct dsdb_schema *schema,
41 const struct dsdb_attribute *attr,
42 const struct drsuapi_DsReplicaAttribute *in,
44 struct ldb_message_element *out);
45 WERROR (*ldb_to_drsuapi)(const struct dsdb_schema *schema,
46 const struct dsdb_attribute *attr,
47 const struct ldb_message_element *in,
49 struct drsuapi_DsReplicaAttribute *out);
52 struct dsdb_attribute {
53 struct dsdb_attribute *prev, *next;
56 const char *lDAPDisplayName;
57 const char *attributeID_oid;
58 uint32_t attributeID_id;
59 struct GUID schemaIDGUID;
62 struct GUID attributeSecurityGUID;
66 bool isMemberOfPartialAttributeSet;
69 const char *attributeSyntax_oid;
70 uint32_t attributeSyntax_id;
72 struct ldb_val oMObjectClass;
77 bool extendedCharsAllowed;
79 uint32_t schemaFlagsEx;
80 struct ldb_val msDs_Schema_Extensions;
82 bool showInAdvancedViewOnly;
83 const char *adminDisplayName;
84 const char *adminDescription;
85 const char *classDisplayName;
91 const struct dsdb_syntax *syntax;
95 struct dsdb_class *prev, *next;
98 const char *lDAPDisplayName;
99 const char *governsID_oid;
100 uint32_t governsID_id;
101 struct GUID schemaIDGUID;
103 uint32_t objectClassCategory;
104 const char *rDNAttID;
105 const char *defaultObjectCategory;
107 const char *subClassOf;
109 const char **systemAuxiliaryClass;
110 const char **systemPossSuperiors;
111 const char **systemMustContain;
112 const char **systemMayContain;
114 const char **auxiliaryClass;
115 const char **possSuperiors;
116 const char **mustContain;
117 const char **mayContain;
118 const char **possibleInferiors;
120 const char *defaultSecurityDescriptor;
122 uint32_t schemaFlagsEx;
123 struct ldb_val msDs_Schema_Extensions;
125 bool showInAdvancedViewOnly;
126 const char *adminDisplayName;
127 const char *adminDescription;
128 const char *classDisplayName;
129 bool defaultHidingValue;
134 struct dsdb_schema_oid_prefix {
141 uint32_t num_prefixes;
142 struct dsdb_schema_oid_prefix *prefixes;
145 * the last element of the prefix mapping table isn't a oid,
146 * it starts with 0xFF and has 21 bytes and is maybe a schema
149 * this is the content of the schemaInfo attribute of the
150 * Schema-Partition head object.
152 const char *schema_info;
154 struct dsdb_attribute *attributes;
155 struct dsdb_class *classes;
159 struct ldb_dn *master_dn;
162 struct smb_iconv_convenience *iconv_convenience;
165 enum dsdb_attr_list_query {
167 DSDB_SCHEMA_ALL_MUST,
169 DSDB_SCHEMA_SYS_MUST,
175 enum dsdb_schema_convert_target {
178 TARGET_AD_SCHEMA_SUBENTRY
181 #include "dsdb/schema/proto.h"
183 #endif /* _DSDB_SCHEMA_H */