python: models: rename argument ldb to samdb
[samba.git] / source3 / libads / ldap_schema.h
blobf36d3e02900e4d1f60075c2282621a2ab22b6dd0
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 enum wb_posix_mapping {
37 WB_POSIX_MAP_UNKNOWN = -1,
38 WB_POSIX_MAP_TEMPLATE = 0,
39 WB_POSIX_MAP_SFU = 1,
40 WB_POSIX_MAP_SFU20 = 2,
41 WB_POSIX_MAP_RFC2307 = 3,
42 WB_POSIX_MAP_UNIXINFO = 4
45 /* The following definitions come from libads/ldap_schema.c */
47 const char *ads_get_attrname_by_guid(ADS_STRUCT *ads,
48 const char *schema_path,
49 TALLOC_CTX *mem_ctx,
50 const struct GUID *schema_guid);
51 ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **schema_path);
52 ADS_STATUS ads_check_posix_schema_mapping(TALLOC_CTX *mem_ctx,
53 ADS_STRUCT *ads,
54 enum wb_posix_mapping map_type,
55 struct posix_schema **s ) ;
57 #endif /* _LIBADS_LDAP_SCHEMA_H_ */