"Fossies" - the Fresh Open Source Software Archive 
Member "nss_ldap-265/ldap-schema.h" (6 Nov 2009, 10867 Bytes) of package /linux/privat/old/nss_ldap-265.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 /* Copyright (C) 1997-2005 Luke Howard.
2 This file is part of the nss_ldap library.
3 Contributed by Luke Howard, <lukeh@padl.com>, 1999.
4
5 The nss_ldap library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The nss_ldap library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the nss_ldap library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19
20 $Id: ldap-schema.h,v 1.38 2007/10/01 00:25:33 lukeh Exp $
21 */
22
23 #ifndef _LDAP_NSS_LDAP_LDAP_SCHEMA_H
24 #define _LDAP_NSS_LDAP_LDAP_SCHEMA_H
25
26 /* max number of attributes per object class */
27 #define ATTRTAB_SIZE 15
28
29 /**
30 * function to initialize global lookup filters.
31 */
32 void _nss_ldap_init_filters ();
33 void _nss_ldap_init_attributes (const char ***attrtab, int skipmembers);
34
35 /**
36 * make filters formerly declared in ldap-*.h globally available.
37 */
38
39 /* rfc822 mail aliases */
40 extern char _nss_ldap_filt_getaliasbyname[];
41 extern char _nss_ldap_filt_getaliasent[];
42
43 /* boot parameters */
44 extern char _nss_ldap_filt_getbootparamsbyname[];
45
46 /* MAC address mappings */
47 extern char _nss_ldap_filt_gethostton[];
48 extern char _nss_ldap_filt_getntohost[];
49 extern char _nss_ldap_filt_getetherent[];
50
51 /* groups */
52 extern char _nss_ldap_filt_getgrnam[];
53 extern char _nss_ldap_filt_getgrgid[];
54 extern char _nss_ldap_filt_getgrent[];
55 extern char _nss_ldap_filt_getgroupsbymemberanddn[];
56 extern char _nss_ldap_filt_getgroupsbydn[];
57 extern char _nss_ldap_filt_getpwnam_groupsbymember[];
58 extern char _nss_ldap_filt_getgroupsbymember[];
59
60 /* IP hosts */
61 extern char _nss_ldap_filt_gethostbyname[];
62 extern char _nss_ldap_filt_gethostbyaddr[];
63 extern char _nss_ldap_filt_gethostent[];
64
65 /* IP networks */
66 extern char _nss_ldap_filt_getnetbyname[];
67 extern char _nss_ldap_filt_getnetbyaddr[];
68 extern char _nss_ldap_filt_getnetent[];
69
70 /* IP protocols */
71 extern char _nss_ldap_filt_getprotobyname[];
72 extern char _nss_ldap_filt_getprotobynumber[];
73 extern char _nss_ldap_filt_getprotoent[];
74
75 /* users */
76 extern char _nss_ldap_filt_getpwnam[];
77 extern char _nss_ldap_filt_getpwuid[];
78 extern char _nss_ldap_filt_getpwent[];
79
80 /* RPCs */
81 extern char _nss_ldap_filt_getrpcbyname[];
82 extern char _nss_ldap_filt_getrpcbynumber[];
83 extern char _nss_ldap_filt_getrpcent[];
84
85 /* IP services */
86 extern char _nss_ldap_filt_getservbyname[];
87 extern char _nss_ldap_filt_getservbynameproto[];
88 extern char _nss_ldap_filt_getservbyport[];
89 extern char _nss_ldap_filt_getservbyportproto[];
90 extern char _nss_ldap_filt_getservent[];
91
92 /* shadow users */
93 extern char _nss_ldap_filt_getspnam[];
94 extern char _nss_ldap_filt_getspent[];
95
96 /* netgroups */
97 extern char _nss_ldap_filt_getnetgrent[];
98 extern char _nss_ldap_filt_innetgr[];
99
100 /* automounts */
101 extern char _nss_ldap_filt_setautomntent[];
102 extern char _nss_ldap_filt_getautomntent[];
103 extern char _nss_ldap_filt_getautomntbyname[];
104
105 /**
106 * Initialize attribute vector table indexed by map
107 * selector (eg. LM_PASSWD) relative to an "ldap_config"
108 */
109
110 /**
111 * Lookup (potentially mapped)
112 * objectclass/attribute.
113 */
114 #define OC(oc) _nss_ldap_map_oc(LM_NONE, OC##_##oc)
115 #define OCM(map, at) _nss_ldap_map_oc(map, AT##_##at)
116 #define AT(at) _nss_ldap_map_at(LM_NONE, AT##_##at)
117 #define ATM(map, at) _nss_ldap_map_at(map, AT##_##at)
118 #define DF(at) _nss_ldap_map_df(at)
119 #define OV(at) _nss_ldap_map_ov(at)
120
121 /**
122 * Common attributes, not from RFC 2307.
123 */
124 #define AT_objectClass "objectClass"
125 #define AT_cn "cn"
126 #define AT_description "description"
127 #define AT_l "l"
128 #define AT_manager "manager"
129
130 /**
131 * Vendor-specific attributes and object classes.
132 * (Mainly from Sun.)
133 */
134 #define OC_nisMailAlias "nisMailAlias"
135 #define AT_rfc822MailMember "rfc822MailMember"
136
137 /**
138 * RFC 2307 attributes and object classes.
139 */
140
141 /*
142 * ( nisSchema.2.0 NAME 'posixAccount' SUP top AUXILIARY
143 * DESC 'Abstraction of an account with POSIX attributes'
144 * MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
145 * MAY ( userPassword $ loginShell $ gecos $ description ) )
146 */
147 #define OC_posixAccount "posixAccount"
148 #define AT_uid "uid"
149 #define AT_userPassword "userPassword"
150 #define AT_uidNumber "uidNumber"
151 #define AT_gidNumber "gidNumber"
152 #define AT_loginShell "loginShell"
153 #define AT_gecos "gecos"
154 #define AT_homeDirectory "homeDirectory"
155
156 /*
157 * ( nisSchema.2.1 NAME 'shadowAccount' SUP top AUXILIARY
158 * DESC 'Additional attributes for shadow passwords'
159 * MUST uid
160 * MAY ( userPassword $ shadowLastChange $ shadowMin
161 * shadowMax $ shadowWarning $ shadowInactive $
162 * shadowExpire $ shadowFlag $ description ) )
163 */
164 #define OC_shadowAccount "shadowAccount"
165 #define AT_shadowLastChange "shadowLastChange"
166 #define AT_shadowMin "shadowMin"
167 #define AT_shadowMax "shadowMax"
168 #define AT_shadowWarning "shadowWarning"
169 #define AT_shadowInactive "shadowInactive"
170 #define AT_shadowExpire "shadowExpire"
171 #define AT_shadowFlag "shadowFlag"
172
173 /*
174 * ( nisSchema.2.2 NAME 'posixGroup' SUP top STRUCTURAL
175 * DESC 'Abstraction of a group of accounts'
176 * MUST ( cn $ gidNumber )
177 * MAY ( userPassword $ uidMember $ description ) )
178 */
179 #define OC_posixGroup "posixGroup"
180 #define AT_gidNumber "gidNumber"
181 #define AT_memberUid "memberUid"
182 #define AT_uniqueMember "uniqueMember"
183 #define AT_memberOf "memberOf"
184
185 /*
186 * ( nisSchema.2.3 NAME 'ipService' SUP top STRUCTURAL
187 * DESC 'Abstraction an Internet Protocol service.
188 * Maps an IP port and protocol (such as tcp or udp)
189 * to one or more names; the distinguished value of
190 * the cn attribute denotes the service's canonical
191 * name'
192 * MUST ( cn $ ipServicePort $ ipServiceProtocol )
193 * MAY ( description ) )
194 */
195 #define OC_ipService "ipService"
196 #define AT_ipServicePort "ipServicePort"
197 #define AT_ipServiceProtocol "ipServiceProtocol"
198
199 /*
200 * ( nisSchema.2.4 NAME 'ipProtocol' SUP top STRUCTURAL
201 * DESC 'Abstraction of an IP protocol. Maps a protocol number
202 * to one or more names. The distinguished value of the cn
203 * attribute denotes the protocol's canonical name'
204 * MUST ( cn $ ipProtocolNumber )
205 * MAY description )
206 */
207 #define OC_ipProtocol "ipProtocol"
208 #define AT_ipProtocolNumber "ipProtocolNumber"
209
210 /*
211 * ( nisSchema.2.5 NAME 'oncRpc' SUP top STRUCTURAL
212 * DESC 'Abstraction of an Open Network Computing (ONC)
213 * [RFC1057] Remote Procedure Call (RPC) binding.
214 * This class maps an ONC RPC number to a name.
215 * The distinguished value of the cn attribute denotes
216 * the RPC service's canonical name'
217 * MUST ( cn $ oncRpcNumber )
218 * MAY description )
219 */
220 #define OC_oncRpc "oncRpc"
221 #define AT_oncRpcNumber "oncRpcNumber"
222
223 /*
224 * ( nisSchema.2.6 NAME 'ipHost' SUP top AUXILIARY
225 * DESC 'Abstraction of a host, an IP device. The distinguished
226 * value of the cn attribute denotes the host's canonical
227 * name. Device SHOULD be used as a structural class'
228 * MUST ( cn $ ipHostNumber )
229 * MAY ( l $ description $ manager ) )
230 */
231 #define OC_ipHost "ipHost"
232 #define AT_ipHostNumber "ipHostNumber"
233
234 /*
235 * ( nisSchema.2.7 NAME 'ipNetwork' SUP top STRUCTURAL
236 * DESC 'Abstraction of a network. The distinguished value of
237 * MUST ( cn $ ipNetworkNumber )
238 * MAY ( ipNetmaskNumber $ l $ description $ manager ) )
239 */
240 #define OC_ipNetwork "ipNetwork"
241 #define AT_ipNetworkNumber "ipNetworkNumber"
242 #define AT_ipNetmaskNumber "ipNetmaskNumber"
243
244 /*
245 * ( nisSchema.2.8 NAME 'nisNetgroup' SUP top STRUCTURAL
246 * DESC 'Abstraction of a netgroup. May refer to other netgroups'
247 * MUST cn
248 * MAY ( nisNetgroupTriple $ memberNisNetgroup $ description ) )
249 */
250 #define OC_nisNetgroup "nisNetgroup"
251 #define AT_nisNetgroupTriple "nisNetgroupTriple"
252 #define AT_memberNisNetgroup "memberNisNetgroup"
253
254 /*
255 * ( nisSchema.2.09 NAME 'nisMap' SUP top STRUCTURAL
256 * DESC 'A generic abstraction of a NIS map'
257 * MUST nisMapName
258 * MAY description )
259 */
260 #define OC_nisMap "nisMap"
261 #define AT_nisMapName "nisNapName"
262
263 /*
264 * ( nisSchema.2.10 NAME 'nisObject' SUP top STRUCTURAL
265 * DESC 'An entry in a NIS map'
266 * MUST ( cn $ nisMapEntry $ nisMapName )
267 * MAY description )
268 */
269 #define OC_nisObject "nisObject"
270 #define AT_nisMapEntry "nisMapEntry"
271
272 /*
273 * ( nisSchema.2.11 NAME 'ieee802Device' SUP top AUXILIARY
274 * DESC 'A device with a MAC address; device SHOULD be
275 * used as a structural class'
276 * MAY macAddress )
277 */
278 #define OC_ieee802Device "ieee802Device"
279 #define AT_macAddress "macAddress"
280
281 /*
282 * ( nisSchema.2.12 NAME 'bootableDevice' SUP top AUXILIARY
283 * DESC 'A device with boot parameters; device SHOULD be
284 * used as a structural class'
285 * MAY ( bootFile $ bootParameter ) )
286 */
287 #define OC_bootableDevice "bootableDevice"
288 #define AT_bootFile "bootFile"
289 #define AT_bootParameter "bootParameter"
290
291 #define OC_automountMap "automountMap"
292 #define AT_automountMapName "automountMapName"
293
294 #define OC_automount "automount"
295 #define AT_automountKey "automountKey"
296 #define AT_automountInformation "automountInformation"
297
298 /*
299 * Map names
300 */
301
302 #define MP_passwd "passwd"
303 #define MP_shadow "shadow"
304 #define MP_group "group"
305 #define MP_hosts "hosts"
306 #define MP_services "services"
307 #define MP_networks "networks"
308 #define MP_protocols "protocols"
309 #define MP_rpc "rpc"
310 #define MP_ethers "ethers"
311 #define MP_netmasks "netmasks"
312 #define MP_bootparams "bootparams"
313 #define MP_aliases "aliases"
314 #define MP_netgroup "netgroup"
315 #define MP_automount "automount"
316
317 #endif /* _LDAP_NSS_LDAP_LDAP_SCHEMA_H */