1*2830Sdjl /*
2*2830Sdjl * CDDL HEADER START
3*2830Sdjl *
4*2830Sdjl * The contents of this file are subject to the terms of the
5*2830Sdjl * Common Development and Distribution License (the "License").
6*2830Sdjl * You may not use this file except in compliance with the License.
7*2830Sdjl *
8*2830Sdjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*2830Sdjl * or http://www.opensolaris.org/os/licensing.
10*2830Sdjl * See the License for the specific language governing permissions
11*2830Sdjl * and limitations under the License.
12*2830Sdjl *
13*2830Sdjl * When distributing Covered Code, include this CDDL HEADER in each
14*2830Sdjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*2830Sdjl * If applicable, add the following below this CDDL HEADER, with the
16*2830Sdjl * fields enclosed by brackets "[]" replaced with your own identifying
17*2830Sdjl * information: Portions Copyright [yyyy] [name of copyright owner]
18*2830Sdjl *
19*2830Sdjl * CDDL HEADER END
20*2830Sdjl */
21*2830Sdjl /*
22*2830Sdjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23*2830Sdjl * Use is subject to license terms.
24*2830Sdjl */
25*2830Sdjl
26*2830Sdjl #pragma ident "%Z%%M% %I% %E% SMI"
27*2830Sdjl
28*2830Sdjl /*
29*2830Sdjl * Routines to handle getauth* calls in nscd
30*2830Sdjl */
31*2830Sdjl
32*2830Sdjl #include "cache.h"
33*2830Sdjl
34*2830Sdjl #define nam_db ctx->nsc_db[0]
35*2830Sdjl #define NSC_NAME_AUTHATTR_BYNAME "getauthnam"
36*2830Sdjl
37*2830Sdjl void
auth_init_ctx(nsc_ctx_t * ctx)38*2830Sdjl auth_init_ctx(nsc_ctx_t *ctx) {
39*2830Sdjl ctx->dbname = NSS_DBNAM_AUTHATTR;
40*2830Sdjl ctx->file_name = "/etc/security/auth_attr";
41*2830Sdjl ctx->db_count = 1;
42*2830Sdjl nam_db = make_cache(nsc_key_ces,
43*2830Sdjl NSS_DBOP_AUTHATTR_BYNAME,
44*2830Sdjl NSC_NAME_AUTHATTR_BYNAME,
45*2830Sdjl NULL, NULL, NULL, nsc_ht_default, -1);
46*2830Sdjl }
47