8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / nscd / nscd_initf.c
blob2a3abdc931b982f2b76993de8d26efb679dd314b
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
26 #include <nss_common.h>
27 #include <nss_dbdefs.h>
28 #include "nscd_common.h"
29 #include "nscd_switch.h"
31 void
32 _nss_initf_passwd(nss_db_params_t *p)
34 p->name = NSS_DBNAM_PASSWD;
35 p->default_config = NSS_DEFCONF_PASSWD;
38 void
39 _nss_initf_hosts(nss_db_params_t *p)
41 p->name = NSS_DBNAM_HOSTS;
42 p->default_config = NSS_DEFCONF_HOSTS;
45 void
46 _nss_initf_group(nss_db_params_t *p)
48 p->name = NSS_DBNAM_GROUP;
49 p->default_config = NSS_DEFCONF_GROUP;
52 void
53 _nss_initf_ipnodes(nss_db_params_t *p)
55 p->name = NSS_DBNAM_IPNODES;
56 p->default_config = NSS_DEFCONF_IPNODES;
59 void
60 _nss_initf_net(nss_db_params_t *p)
62 p->name = NSS_DBNAM_NETWORKS;
63 p->default_config = NSS_DEFCONF_NETWORKS;
66 void
67 _nss_initf_proto(nss_db_params_t *p)
69 p->name = NSS_DBNAM_PROTOCOLS;
70 p->default_config = NSS_DEFCONF_PROTOCOLS;
73 void
74 _nss_initf_rpc(p)
75 nss_db_params_t *p;
77 p->name = NSS_DBNAM_RPC;
78 p->default_config = NSS_DEFCONF_RPC;
81 void
82 _nss_initf_ethers(nss_db_params_t *p)
84 p->name = NSS_DBNAM_ETHERS;
85 p->default_config = NSS_DEFCONF_ETHERS;
88 void
89 _nss_initf_netmasks(nss_db_params_t *p)
91 p->name = NSS_DBNAM_NETMASKS;
92 p->default_config = NSS_DEFCONF_NETMASKS;
95 void
96 _nss_initf_bootparams(nss_db_params_t *p)
98 p->name = NSS_DBNAM_BOOTPARAMS;
99 p->default_config = NSS_DEFCONF_BOOTPARAMS;
102 void
103 _nss_initf_publickey(nss_db_params_t *p)
105 p->name = NSS_DBNAM_PUBLICKEY;
106 p->default_config = NSS_DEFCONF_PUBLICKEY;
109 void
110 _nss_initf_netgroup(nss_db_params_t *p)
112 p->name = NSS_DBNAM_NETGROUP;
113 p->default_config = NSS_DEFCONF_NETGROUP;
116 void
117 _nss_initf_services(nss_db_params_t *p)
119 p->name = NSS_DBNAM_SERVICES;
120 p->default_config = NSS_DEFCONF_SERVICES;
123 void
124 _nss_initf_printers(nss_db_params_t *p)
126 p->name = NSS_DBNAM_PRINTERS;
127 p->default_config = NSS_DEFCONF_PRINTERS;
130 void
131 _nss_initf_authattr(nss_db_params_t *p)
133 p->name = NSS_DBNAM_AUTHATTR;
134 p->default_config = NSS_DEFCONF_AUTHATTR;
137 void
138 _nss_initf_profattr(nss_db_params_t *p)
140 p->name = NSS_DBNAM_PROFATTR;
141 p->default_config = NSS_DEFCONF_PROFATTR;
144 void
145 _nss_initf_execattr(nss_db_params_t *p)
147 p->name = NSS_DBNAM_EXECATTR;
148 p->default_config = NSS_DEFCONF_PROFATTR;
149 p->config_name = NSS_DBNAM_PROFATTR; /* use config for "prof_attr" */
152 void
153 _nss_initf_userattr(nss_db_params_t *p)
155 p->name = NSS_DBNAM_USERATTR;
156 p->config_name = NSS_DBNAM_PASSWD;
157 p->default_config = NSS_DEFCONF_USERATTR;
160 void
161 _nss_initf_project(nss_db_params_t *p)
163 p->name = NSS_DBNAM_PROJECT;
164 p->default_config = NSS_DEFCONF_PROJECT;
167 void
168 _nss_initf_auuser(nss_db_params_t *p)
170 p->name = NSS_DBNAM_AUDITUSER;
171 p->config_name = NSS_DBNAM_PASSWD;
172 p->default_config = NSS_DEFCONF_AUDITUSER;
175 void
176 _nss_initf_shadow(nss_db_params_t *p)
178 p->name = NSS_DBNAM_SHADOW;
179 p->config_name = NSS_DBNAM_PASSWD;
180 p->default_config = NSS_DEFCONF_PASSWD;
183 void
184 _nss_initf_passwd_compat(nss_db_params_t *p)
186 p->name = NSS_DBNAM_PASSWD;
187 p->config_name = NSS_DBNAM_PASSWD_COMPAT;
188 p->default_config = NSS_DEFCONF_PASSWD_COMPAT;
191 void
192 _nss_initf_group_compat(nss_db_params_t *p)
194 p->name = NSS_DBNAM_GROUP;
195 p->config_name = NSS_DBNAM_GROUP_COMPAT;
196 p->default_config = NSS_DEFCONF_GROUP_COMPAT;
199 void
200 _nss_initf_tsol_rh(nss_db_params_t *p)
202 p->name = NSS_DBNAM_TSOL_RH;
203 p->default_config = NSS_DEFCONF_TSOL_RH;
206 void
207 _nss_initf_tsol_tp(nss_db_params_t *p)
209 p->name = NSS_DBNAM_TSOL_TP;
210 p->default_config = NSS_DEFCONF_TSOL_TP;
213 nss_db_initf_t nscd_nss_db_initf[] = {
214 _nss_initf_passwd,
215 _nss_initf_hosts,
216 _nss_initf_group,
217 _nss_initf_ipnodes,
218 _nss_initf_net,
219 _nss_initf_proto,
220 _nss_initf_rpc,
221 _nss_initf_ethers,
222 _nss_initf_netmasks,
223 _nss_initf_bootparams,
224 _nss_initf_publickey,
225 _nss_initf_netgroup,
226 _nss_initf_services,
227 _nss_initf_printers,
228 _nss_initf_authattr,
229 _nss_initf_profattr,
230 _nss_initf_execattr,
231 _nss_initf_userattr,
232 _nss_initf_project,
233 _nss_initf_shadow,
234 _nss_initf_auuser,
235 _nss_initf_tsol_rh,
236 _nss_initf_tsol_tp,
237 _nss_initf_passwd_compat,
238 _nss_initf_group_compat,
240 * no initf() for pseudo-databases: passwd, shadow, audit_user,
241 * user_attr, and group (when called from the compat backend)
243 NULL,
244 NULL,
245 NULL,
246 NULL,
247 NULL};