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;
39 WERROR (*drsuapi_to_ldb)(const struct dsdb_schema *schema,
40 const struct dsdb_attribute *attr,
41 const struct drsuapi_DsReplicaAttribute *in,
43 struct ldb_message_element *out);
44 WERROR (*ldb_to_drsuapi)(const struct dsdb_schema *schema,
45 const struct dsdb_attribute *attr,
46 const struct ldb_message_element *in,
48 struct drsuapi_DsReplicaAttribute *out);
51 struct dsdb_attribute {
52 struct dsdb_attribute *prev, *next;
55 const char *lDAPDisplayName;
56 const char *attributeID_oid;
57 uint32_t attributeID_id;
58 struct GUID schemaIDGUID;
61 struct GUID attributeSecurityGUID;
65 bool isMemberOfPartialAttributeSet;
68 const char *attributeSyntax_oid;
69 uint32_t attributeSyntax_id;
71 struct ldb_val oMObjectClass;
76 bool extendedCharsAllowed;
78 uint32_t schemaFlagsEx;
79 struct ldb_val msDs_Schema_Extensions;
81 bool showInAdvancedViewOnly;
82 const char *adminDisplayName;
83 const char *adminDescription;
84 const char *classDisplayName;
90 const struct dsdb_syntax *syntax;
94 struct dsdb_class *prev, *next;
97 const char *lDAPDisplayName;
98 const char *governsID_oid;
99 uint32_t governsID_id;
100 struct GUID schemaIDGUID;
102 uint32_t objectClassCategory;
103 const char *rDNAttID;
104 const char *defaultObjectCategory;
106 const char *subClassOf;
108 const char **systemAuxiliaryClass;
109 const char **systemPossSuperiors;
110 const char **systemMustContain;
111 const char **systemMayContain;
113 const char **auxiliaryClass;
114 const char **possSuperiors;
115 const char **mustContain;
116 const char **mayContain;
117 const char **possibleInferiors;
119 const char *defaultSecurityDescriptor;
121 uint32_t schemaFlagsEx;
122 struct ldb_val msDs_Schema_Extensions;
124 bool showInAdvancedViewOnly;
125 const char *adminDisplayName;
126 const char *adminDescription;
127 const char *classDisplayName;
128 bool defaultHidingValue;
133 struct dsdb_schema_oid_prefix {
140 uint32_t num_prefixes;
141 struct dsdb_schema_oid_prefix *prefixes;
144 * the last element of the prefix mapping table isn't a oid,
145 * it starts with 0xFF and has 21 bytes and is maybe a schema
148 * this is the content of the schemaInfo attribute of the
149 * Schema-Partition head object.
151 const char *schema_info;
153 struct dsdb_attribute *attributes;
154 struct dsdb_class *classes;
158 struct ldb_dn *master_dn;
161 struct smb_iconv_convenience *iconv_convenience;
164 enum dsdb_attr_list_query {
166 DSDB_SCHEMA_ALL_MUST,
168 DSDB_SCHEMA_SYS_MUST,
174 enum dsdb_schema_convert_target {
177 TARGET_AD_SCHEMA_SUBENTRY
180 #include "dsdb/schema/proto.h"
182 #endif /* _DSDB_SCHEMA_H */