autobuild: Add options to set mail host and send e-mail with logs
[Samba.git] / source3 / libads / ldap_schema.h
blobfc4ed078085e58c3e673869a7234d8c58d868267
1 /*
2 Unix SMB/CIFS implementation.
3 ads (active directory) utility library
4 Copyright (C) Guenther Deschner 2005-2007
5 Copyright (C) Gerald (Jerry) Carter 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/>.
21 #ifndef _LIBADS_LDAP_SCHEMA_H_
22 #define _LIBADS_LDAP_SCHEMA_H_
24 /* used to remember the names of the posix attributes in AD */
25 /* see the rfc2307 & sfu nss backends */
27 struct posix_schema {
28 char *posix_homedir_attr;
29 char *posix_shell_attr;
30 char *posix_uidnumber_attr;
31 char *posix_gidnumber_attr;
32 char *posix_gecos_attr;
33 char *posix_uid_attr;
36 /* ldap attribute oids (Services for Unix 3.0, 3.5) */
37 #define ADS_ATTR_SFU_UIDNUMBER_OID "1.2.840.113556.1.6.18.1.310"
38 #define ADS_ATTR_SFU_GIDNUMBER_OID "1.2.840.113556.1.6.18.1.311"
39 #define ADS_ATTR_SFU_HOMEDIR_OID "1.2.840.113556.1.6.18.1.344"
40 #define ADS_ATTR_SFU_SHELL_OID "1.2.840.113556.1.6.18.1.312"
41 #define ADS_ATTR_SFU_GECOS_OID "1.2.840.113556.1.6.18.1.337"
42 #define ADS_ATTR_SFU_UID_OID "1.2.840.113556.1.6.18.1.309"
44 /* ldap attribute oids (Services for Unix 2.0) */
45 #define ADS_ATTR_SFU20_UIDNUMBER_OID "1.2.840.113556.1.4.7000.187.70"
46 #define ADS_ATTR_SFU20_GIDNUMBER_OID "1.2.840.113556.1.4.7000.187.71"
47 #define ADS_ATTR_SFU20_HOMEDIR_OID "1.2.840.113556.1.4.7000.187.106"
48 #define ADS_ATTR_SFU20_SHELL_OID "1.2.840.113556.1.4.7000.187.72"
49 #define ADS_ATTR_SFU20_GECOS_OID "1.2.840.113556.1.4.7000.187.97"
50 #define ADS_ATTR_SFU20_UID_OID "1.2.840.113556.1.4.7000.187.102"
53 /* ldap attribute oids (RFC2307) */
54 #define ADS_ATTR_RFC2307_UIDNUMBER_OID "1.3.6.1.1.1.1.0"
55 #define ADS_ATTR_RFC2307_GIDNUMBER_OID "1.3.6.1.1.1.1.1"
56 #define ADS_ATTR_RFC2307_HOMEDIR_OID "1.3.6.1.1.1.1.3"
57 #define ADS_ATTR_RFC2307_SHELL_OID "1.3.6.1.1.1.1.4"
58 #define ADS_ATTR_RFC2307_GECOS_OID "1.3.6.1.1.1.1.2"
59 #define ADS_ATTR_RFC2307_UID_OID "0.9.2342.19200300.100.1.1"
61 enum wb_posix_mapping {
62 WB_POSIX_MAP_UNKNOWN = -1,
63 WB_POSIX_MAP_TEMPLATE = 0,
64 WB_POSIX_MAP_SFU = 1,
65 WB_POSIX_MAP_SFU20 = 2,
66 WB_POSIX_MAP_RFC2307 = 3,
67 WB_POSIX_MAP_UNIXINFO = 4
70 /* The following definitions come from libads/ldap_schema.c */
72 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads,
73 const char *schema_path,
74 TALLOC_CTX *mem_ctx,
75 const struct GUID *schema_guid);
76 ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_path);
77 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
78 ADS_STRUCT *ads,
79 enum wb_posix_mapping map_type,
80 struct posix_schema **s ) ;
82 #endif /* _LIBADS_LDAP_SCHEMA_H_ */