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]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _NSCD_COMMON_H
27 #define _NSCD_COMMON_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
35 #include <sys/types.h>
39 * nscd internal return/error codes
43 NSCD_INITIALIZATION_FAILED
,
46 NSCD_DB_ENTRY_NOT_FOUND
,
47 NSCD_INVALID_ARGUMENT
,
49 NSCD_THREAD_CREATE_ERROR
,
51 NSCD_CFG_UNSUPPORTED_SWITCH_DB
,
52 NSCD_CFG_UNSUPPORTED_SWITCH_SRC
,
53 NSCD_CFG_DLOPEN_ERROR
,
55 NSCD_CFG_SET_PARAM_FAILED
,
56 NSCD_CFG_PARAM_DESC_ERROR
,
57 NSCD_CFG_STAT_DESC_ERROR
,
58 NSCD_CFG_INVALID_HANDLE
,
60 NSCD_CFG_FILE_OPEN_ERROR
,
61 NSCD_CFG_FILE_ACCESS_ERROR
,
62 NSCD_CFG_SYNTAX_ERROR
,
63 NSCD_CFG_PRELIM_CHECK_FAILED
,
64 NSCD_CFG_DATA_CONVERSION_FAILED
,
67 NSCD_CFG_CHANGE_NOT_ALLOWED
,
68 NSCD_CREATE_NSW_STATE_FAILED
,
69 NSCD_CREATE_GETENT_CTX_FAILED
,
70 NSCD_NSS_BACKEND_NOT_FOUND
,
71 NSCD_DOOR_UCRED_ERROR
,
72 NSCD_DOOR_BUFFER_CHECK_FAILED
,
73 NSCD_SELF_CRED_NOT_CONFIGURED
,
74 NSCD_SELF_CRED_NO_FORKER
,
75 NSCD_SELF_CRED_WRONG_NSCD
,
76 NSCD_SELF_CRED_MAIN_IMPOSTER
,
77 NSCD_SELF_CRED_FORKER_IMPOSTER
,
78 NSCD_SELF_CRED_CHILD_IMPOSTER
,
79 NSCD_SELF_CRED_NO_DOOR
,
80 NSCD_SELF_CRED_NO_CHILD_SLOT
,
81 NSCD_SELF_CRED_INVALID_SLOT_NUMBER
,
82 NSCD_SELF_CRED_INVALID_SLOT_STATE
,
83 NSCD_ADMIN_FAIL_TO_SET
,
84 NSCD_CACHE_INVALID_CACHE_NAME
,
85 NSCD_CACHE_NO_CACHE_CTX
,
87 NSCD_CACHE_NO_CACHE_FOUND
,
93 /* nscd data type: boolean */
94 typedef uint8_t nscd_bool_t
;
98 /* common functions */
99 void _nscd_set_start_time(int reset
);
100 time_t _nscd_get_start_time();
101 nscd_rc_t
_nscd_init(char *cfgfile
);
102 nscd_rc_t
_nscd_refresh();
108 #endif /* _NSCD_COMMON_H */