4 Copyright (C) Simo Sorce 2004-2006
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 * Component: ldb schema module
26 * Description: add schema syntax functionality
30 * License: GNU GPL v2 or Later
36 see ldap_server/devdocs/AD-syntaxes.txt
39 enum schema_internal_syntax {
40 SCHEMA_AS_BOOLEAN = 1,
41 SCHEMA_AS_INTEGER = 2,
42 SCHEMA_AS_OCTET_STRING = 3,
45 SCHEMA_AS_ENUMERATION = 6,
46 SCHEMA_AS_NUMERIC_STRING = 7,
47 SCHEMA_AS_PRINTABLE_STRING = 8,
48 SCHEMA_AS_CASE_IGNORE_STRING = 9,
49 SCHEMA_AS_IA5_STRING = 10,
50 SCHEMA_AS_UTC_TIME = 11,
51 SCHEMA_AS_GENERALIZED_TIME = 12,
52 SCHEMA_AS_CASE_SENSITIVE_STRING = 13,
53 SCHEMA_AS_DIRECTORY_STRING = 14,
54 SCHEMA_AS_LARGE_INTEGER = 15,
55 SCHEMA_AS_OBJECT_SECURITY_DESCRIPTOR = 16,
57 SCHEMA_AS_DN_BINARY = 18,
58 SCHEMA_AS_OR_NAME = 19,
59 SCHEMA_AS_REPLICA_LINK = 20,
60 SCHEMA_AS_PRESENTATION_ADDRESS = 21,
61 SCHEMA_AS_ACCESS_POINT = 22,
62 SCHEMA_AS_DN_STRING = 23
65 int map_schema_syntax(uint32_t om_syntax,
66 const char *attr_syntax,
67 const struct ldb_val *om_class,
68 enum schema_internal_syntax *syntax);
70 int schema_validate(struct ldb_context *ldb,
71 struct ldb_message_element *el,
72 enum schema_internal_syntax type,
73 bool single, int min, int max);