1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * nis/bootparams_getbyname.c -- "nis" backend for nsswitch "bootparams"
24 * database.
25 *
26 * Copyright (c) 1988-1992 Sun Microsystems Inc
27 * All Rights Reserved.
28 */
29
30 #include <nss_dbdefs.h>
31 #include "nis_common.h"
32
33 static nss_status_t
getbyname(be,a)34 getbyname(be, a)
35 nis_backend_ptr_t be;
36 void *a;
37 {
38 nss_XbyY_args_t *argp = (nss_XbyY_args_t *) a;
39
40 return (_nss_nis_lookup(be, argp, 0, "bootparams",
41 argp->key.name, 0));
42 }
43
44 static nis_backend_op_t bootparams_ops[] = {
45 _nss_nis_destr,
46 getbyname
47 };
48
49 /*ARGSUSED*/
50 nss_backend_t *
_nss_nis_bootparams_constr(dummy1,dummy2,dummy3)51 _nss_nis_bootparams_constr(dummy1, dummy2, dummy3)
52 const char *dummy1, *dummy2, *dummy3;
53 {
54 return (_nss_nis_constr(bootparams_ops,
55 sizeof (bootparams_ops) / sizeof (bootparams_ops[0]),
56 "bootparams"));
57 }
58