tevent: expose tevent_context_init_ops
[Samba/gebeck_regimport.git] / source3 / passdb / pdb_ldap_schema.h
blob07f357006bbab8862c024153ebbd0fbecbe27c2a
1 /*
2 Unix SMB/CIFS mplementation.
3 LDAP protocol helper functions for SAMBA
4 Copyright (C) Gerald Carter 2001-2003
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 3 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, see <http://www.gnu.org/licenses/>.
21 #ifndef _PASSDB_PDB_LDAP_SCHEMA_H_
22 #define _PASSDB_PDB_LDAP_SCHEMA_H_
24 /* specify schema versions between 2.2. and 3.0 */
26 #define SCHEMAVER_SAMBAACCOUNT 1
27 #define SCHEMAVER_SAMBASAMACCOUNT 2
29 /* objectclass names */
31 #define LDAP_OBJ_SAMBASAMACCOUNT "sambaSamAccount"
32 #define LDAP_OBJ_SAMBAACCOUNT "sambaAccount"
33 #define LDAP_OBJ_GROUPMAP "sambaGroupMapping"
34 #define LDAP_OBJ_DOMINFO "sambaDomain"
35 #define LDAP_OBJ_IDPOOL "sambaUnixIdPool"
36 #define LDAP_OBJ_IDMAP_ENTRY "sambaIdmapEntry"
37 #define LDAP_OBJ_SID_ENTRY "sambaSidEntry"
38 #define LDAP_OBJ_TRUST_PASSWORD "sambaTrustPassword"
39 #define LDAP_OBJ_TRUSTDOM_PASSWORD "sambaTrustedDomainPassword"
40 #define LDAP_OBJ_TRUSTED_DOMAIN "sambaTrustedDomain"
42 #define LDAP_OBJ_ACCOUNT "account"
43 #define LDAP_OBJ_POSIXACCOUNT "posixAccount"
44 #define LDAP_OBJ_POSIXGROUP "posixGroup"
45 #define LDAP_OBJ_OU "organizationalUnit"
47 /* some generic attributes that get reused a lot */
49 #define LDAP_ATTRIBUTE_SID "sambaSID"
50 #define LDAP_ATTRIBUTE_UIDNUMBER "uidNumber"
51 #define LDAP_ATTRIBUTE_GIDNUMBER "gidNumber"
52 #define LDAP_ATTRIBUTE_SID_LIST "sambaSIDList"
54 /* attribute map table indexes */
56 #define LDAP_ATTR_LIST_END 0
57 #define LDAP_ATTR_UID 1
58 #define LDAP_ATTR_UIDNUMBER 2
59 #define LDAP_ATTR_GIDNUMBER 3
60 #define LDAP_ATTR_UNIX_HOME 4
61 #define LDAP_ATTR_PWD_LAST_SET 5
62 #define LDAP_ATTR_PWD_CAN_CHANGE 6
63 #define LDAP_ATTR_PWD_MUST_CHANGE 7
64 #define LDAP_ATTR_LOGON_TIME 8
65 #define LDAP_ATTR_LOGOFF_TIME 9
66 #define LDAP_ATTR_KICKOFF_TIME 10
67 #define LDAP_ATTR_CN 11
68 #define LDAP_ATTR_DISPLAY_NAME 12
69 #define LDAP_ATTR_HOME_PATH 13
70 #define LDAP_ATTR_LOGON_SCRIPT 14
71 #define LDAP_ATTR_PROFILE_PATH 15
72 #define LDAP_ATTR_DESC 16
73 #define LDAP_ATTR_USER_WKS 17
74 #define LDAP_ATTR_USER_SID 18
75 #define LDAP_ATTR_USER_RID 18
76 #define LDAP_ATTR_PRIMARY_GROUP_SID 19
77 #define LDAP_ATTR_PRIMARY_GROUP_RID 20
78 #define LDAP_ATTR_LMPW 21
79 #define LDAP_ATTR_NTPW 22
80 #define LDAP_ATTR_DOMAIN 23
81 #define LDAP_ATTR_OBJCLASS 24
82 #define LDAP_ATTR_ACB_INFO 25
83 #define LDAP_ATTR_NEXT_USERRID 26
84 #define LDAP_ATTR_NEXT_GROUPRID 27
85 #define LDAP_ATTR_DOM_SID 28
86 #define LDAP_ATTR_HOME_DRIVE 29
87 #define LDAP_ATTR_GROUP_SID 30
88 #define LDAP_ATTR_GROUP_TYPE 31
89 #define LDAP_ATTR_SID 32
90 #define LDAP_ATTR_ALGORITHMIC_RID_BASE 33
91 #define LDAP_ATTR_NEXT_RID 34
92 #define LDAP_ATTR_BAD_PASSWORD_COUNT 35
93 #define LDAP_ATTR_LOGON_COUNT 36
94 #define LDAP_ATTR_MUNGED_DIAL 37
95 #define LDAP_ATTR_BAD_PASSWORD_TIME 38
96 #define LDAP_ATTR_PWD_HISTORY 39
97 #define LDAP_ATTR_SID_LIST 40
98 #define LDAP_ATTR_MOD_TIMESTAMP 41
99 #define LDAP_ATTR_LOGON_HOURS 42
100 #define LDAP_ATTR_TRUST_PASSWD_FLAGS 43
101 #define LDAP_ATTR_SN 44
104 typedef struct _attrib_map_entry {
105 int attrib;
106 const char *name;
107 } ATTRIB_MAP_ENTRY;
110 /* structures */
112 extern ATTRIB_MAP_ENTRY attrib_map_v22[];
113 extern ATTRIB_MAP_ENTRY attrib_map_to_delete_v22[];
114 extern ATTRIB_MAP_ENTRY attrib_map_v30[];
115 extern ATTRIB_MAP_ENTRY attrib_map_to_delete_v30[];
116 extern ATTRIB_MAP_ENTRY dominfo_attr_list[];
117 extern ATTRIB_MAP_ENTRY groupmap_attr_list[];
118 extern ATTRIB_MAP_ENTRY groupmap_attr_list_to_delete[];
119 extern ATTRIB_MAP_ENTRY idpool_attr_list[];
120 extern ATTRIB_MAP_ENTRY sidmap_attr_list[];
121 extern ATTRIB_MAP_ENTRY trustpw_attr_list[];
123 /* The following definitions come from passdb/pdb_ldap_schema.c */
125 const char* get_attr_key2string( ATTRIB_MAP_ENTRY table[], int key );
126 const char** get_attr_list( TALLOC_CTX *mem_ctx, ATTRIB_MAP_ENTRY table[] );
128 #endif /* _PASSDB_PDB_LDAP_SCHEMA_H_ */