nscd_cfgdef.h revision ad0e80f7538b612141768bfda60009eb76550ee7
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER START
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * The contents of this file are subject to the terms of the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Common Development and Distribution License (the "License").
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You may not use this file except in compliance with the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * See the License for the specific language governing permissions
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * and limitations under the License.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * When distributing Covered Code, include this CDDL HEADER in each
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * If applicable, add the following below this CDDL HEADER, with the
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * fields enclosed by brackets "[]" replaced with your own identifying
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * information: Portions Copyright [yyyy] [name of copyright owner]
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * CDDL HEADER END
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Use is subject to license terms.
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#pragma ident "%Z%%M% %I% %E% SMI"
cb5caa98562cf06753163f558cbcfe30b8f4673adjlextern "C" {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for preliminary checking of an integer
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * configuration value
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for preliminary checking of a bitmap
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * configuration value
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure used for preliminary checking of a string
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * configuration value
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Per nsswitch database config data
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * Per nsswitch database statistics data
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * global statistics data
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * global config data
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * structure for handling the switch database specific group
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * or parameter default
cb5caa98562cf06753163f558cbcfe30b8f4673adjltypedef struct nscd_cfg_nsw_spc_default {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * name service switch source (repository) table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl { 0, "files" },
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * name service related smf service table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * (the order of the services should match the order of the source
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * listed above, 0: files, 1: ldap, 2: nis, 3: nisplus. dns is
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * not needed)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl { 0, "svc:/system/name-service-cache:default"},
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * name service database table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl /* pseudo-databases for the compat backend */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * pseudo-databases that use the switch policy that is
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * configured for NSS_DBNAM_PASSWD_COMPAT
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * pseudo-database that uses the switch policy that is
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * configured for NSS_DBNAM_GROUP_COMPAT
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * A special way to indicate all switch databases
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * data for preliminary checking of the log configuration
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic nscd_cfg_bitmap_check_t NSCD_CFG_LOGLEVEL_PCHECK =
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/* data for preliminary checking of the switch configuration */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * macros for defining the static param table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define NSCD_CFG_PGROUP_DESC(pn, type, pflag, gf, g_in_t, pcheck_p,\
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define NSCD_CFG_PARAM_DESC(pn, type, pflag, pf, p_in_t, \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl 0, 0, 0, \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl 0, 0, 0, \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * the static config parameter description table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-global-log",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_log_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_log_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "logfile",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "debug-level",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "debug-components",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-global-frontend",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_frontend_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_frontend_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "common-worker-threads",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-hit-threads",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-global-selfcred",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_selfcred_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_selfcred_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "enable-selfcred",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "max-per-user-nscd",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "per-user-nscd-ttl",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-global-switch",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_switch_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_switch_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-enable-lookup",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-enable-loopback-checking",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-check-smf-state-interval",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-global-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_cache_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_cache_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-enable-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl /* non-global config param from this point on */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-frontend",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_frontend_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_frontend_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "worker-thread-per-nsw-db",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-switch",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_switch_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_switch_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "nsw-config-string",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "nsw-config-database",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "enable-lookup",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "enable-loopback-checking",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "max-nsw-state-per-db",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "max-nsw-state-per-thread",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "max-getent-ctx-per-db",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "param-group-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_cache_notify",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_cache_verify"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "enable-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "enable-per-user-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "avoid-nameservice",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "check-files",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "check-file-interval",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "positive-time-to-live",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "negative-time-to-live",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "keep-hot-count",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "hint-size",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "maximum-entries-allowed",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "suggested-size",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "old-data-ok",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * defaults for the global configuration
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic nscd_cfg_global_data_t nscd_cfg_global_default = {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_global_log_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_global_frontend_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_global_selfcred_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_global_switch_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_global_cache_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * defaults for the per switch database configuration
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic nscd_cfg_nsw_db_data_t nscd_cfg_nsw_db_data_default = {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_frontend_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_switch_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * nscd_cfg_cache_t
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * macros for defining the database specific defaults
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define NSCD_CFG_DB_DEFAULT_PARAM(db, gf, pf, gt, defaddr, deflen) \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define NSCD_CFG_DB_DEFAULT_GROUP(db, gf, defaddr, deflen) \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * shadow, user_attr, and audit_user use the same switch policy
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * as that of passwd. exec_attr use that of prof_attr.
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic char *nscd_cfg_userattr_cfg_db = NSS_DBNAM_PASSWD;
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic char *nscd_cfg_execattr_cfg_db = NSS_DBNAM_PROFATTR;
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * default switch policy for pseudo-databases passwd_compat and
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * and group_compa is "nis"
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic char *nscd_cfg_def_passwd_compat = NSS_DEFCONF_PASSWD_COMPAT;
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic char *nscd_cfg_def_group_compat = NSS_DEFCONF_GROUP_COMPAT;
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic nscd_cfg_nsw_spc_default_t nscd_cfg_passwd_cfg_link =
cb5caa98562cf06753163f558cbcfe30b8f4673adjlstatic nscd_cfg_nsw_spc_default_t nscd_cfg_profattr_cfg_link =
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * switch database specific defaults
cb5caa98562cf06753163f558cbcfe30b8f4673adjlnscd_cfg_nsw_spc_default_t _nscd_cfg_nsw_spc_default[] = {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * switch database specific defaults that are linked to
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * those of other databases
cb5caa98562cf06753163f558cbcfe30b8f4673adjlnscd_cfg_nsw_spc_default_t _nscd_cfg_nsw_link_default[] = {
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * macros for defining the static stats table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#define NSCD_CFG_STAT_DESC(sn, type, sflag, sf, s_in_t, \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl 0, 0, 0, \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl 0, 0, 0, \
cb5caa98562cf06753163f558cbcfe30b8f4673adjl * the static statistics description table
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "stat-group-global-log",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_log_get_stat"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "entries-logged",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "stat-group-global-switch",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_switch_get_stat"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-lookup-request-received",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-lookup-request-queued",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-lookup-request-in-progress",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-lookup-request-succeeded",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-lookup-request-failed",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-loopback-nsw-db-skipped",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "stat-group-global-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_cache_get_stat"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-hits-on-positive",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-hits-on-negative",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-misses-on-positive",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-misses-on-negative",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-queries-queued",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-total-cache-entries",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-complete-cache-invalidations",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-queries-dropped",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "global-cache-hit-rate",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl /* non-global stat from this point on */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "stat-group-switch",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_switch_get_stat"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "lookup-request-received",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "lookup-request-queued",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "lookup-request-in-progress",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "lookup-request-succeeded",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "lookup-request-failed",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "loopback-nsw-db-skipped",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "stat-group-cache",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "_nscd_cfg_cache_get_stat"),
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-hits-on-positive",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-hits-on-negative",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-misses-on-positive",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-misses-on-negative",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-queries-queued",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "total-cache-entries",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "complete-cache-invalidations",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-hit-rate",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl "cache-queries-dropped",
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/* number of entries in the static tables */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/* number of supported nsw databases (including pseudo ones) */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl/* number of supported nsw databases (not including pseudo ones) */
cb5caa98562cf06753163f558cbcfe30b8f4673adjl#endif /* _NSCD_CFGDEF_H */