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]
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"
32 _nss_initf_passwd(nss_db_params_t
*p
)
34 p
->name
= NSS_DBNAM_PASSWD
;
35 p
->default_config
= NSS_DEFCONF_PASSWD
;
39 _nss_initf_hosts(nss_db_params_t
*p
)
41 p
->name
= NSS_DBNAM_HOSTS
;
42 p
->default_config
= NSS_DEFCONF_HOSTS
;
46 _nss_initf_group(nss_db_params_t
*p
)
48 p
->name
= NSS_DBNAM_GROUP
;
49 p
->default_config
= NSS_DEFCONF_GROUP
;
53 _nss_initf_ipnodes(nss_db_params_t
*p
)
55 p
->name
= NSS_DBNAM_IPNODES
;
56 p
->default_config
= NSS_DEFCONF_IPNODES
;
60 _nss_initf_net(nss_db_params_t
*p
)
62 p
->name
= NSS_DBNAM_NETWORKS
;
63 p
->default_config
= NSS_DEFCONF_NETWORKS
;
67 _nss_initf_proto(nss_db_params_t
*p
)
69 p
->name
= NSS_DBNAM_PROTOCOLS
;
70 p
->default_config
= NSS_DEFCONF_PROTOCOLS
;
77 p
->name
= NSS_DBNAM_RPC
;
78 p
->default_config
= NSS_DEFCONF_RPC
;
82 _nss_initf_ethers(nss_db_params_t
*p
)
84 p
->name
= NSS_DBNAM_ETHERS
;
85 p
->default_config
= NSS_DEFCONF_ETHERS
;
89 _nss_initf_netmasks(nss_db_params_t
*p
)
91 p
->name
= NSS_DBNAM_NETMASKS
;
92 p
->default_config
= NSS_DEFCONF_NETMASKS
;
96 _nss_initf_bootparams(nss_db_params_t
*p
)
98 p
->name
= NSS_DBNAM_BOOTPARAMS
;
99 p
->default_config
= NSS_DEFCONF_BOOTPARAMS
;
103 _nss_initf_publickey(nss_db_params_t
*p
)
105 p
->name
= NSS_DBNAM_PUBLICKEY
;
106 p
->default_config
= NSS_DEFCONF_PUBLICKEY
;
110 _nss_initf_netgroup(nss_db_params_t
*p
)
112 p
->name
= NSS_DBNAM_NETGROUP
;
113 p
->default_config
= NSS_DEFCONF_NETGROUP
;
117 _nss_initf_services(nss_db_params_t
*p
)
119 p
->name
= NSS_DBNAM_SERVICES
;
120 p
->default_config
= NSS_DEFCONF_SERVICES
;
124 _nss_initf_printers(nss_db_params_t
*p
)
126 p
->name
= NSS_DBNAM_PRINTERS
;
127 p
->default_config
= NSS_DEFCONF_PRINTERS
;
131 _nss_initf_authattr(nss_db_params_t
*p
)
133 p
->name
= NSS_DBNAM_AUTHATTR
;
134 p
->default_config
= NSS_DEFCONF_AUTHATTR
;
138 _nss_initf_profattr(nss_db_params_t
*p
)
140 p
->name
= NSS_DBNAM_PROFATTR
;
141 p
->default_config
= NSS_DEFCONF_PROFATTR
;
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" */
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
;
161 _nss_initf_project(nss_db_params_t
*p
)
163 p
->name
= NSS_DBNAM_PROJECT
;
164 p
->default_config
= NSS_DEFCONF_PROJECT
;
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
;
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
;
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
;
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
;
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
;
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
[] = {
223 _nss_initf_bootparams
,
224 _nss_initf_publickey
,
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)