1cb5caa98Sdjl /* 2cb5caa98Sdjl * CDDL HEADER START 3cb5caa98Sdjl * 4cb5caa98Sdjl * The contents of this file are subject to the terms of the 5cb5caa98Sdjl * Common Development and Distribution License (the "License"). 6cb5caa98Sdjl * You may not use this file except in compliance with the License. 7cb5caa98Sdjl * 8cb5caa98Sdjl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9cb5caa98Sdjl * or http://www.opensolaris.org/os/licensing. 10cb5caa98Sdjl * See the License for the specific language governing permissions 11cb5caa98Sdjl * and limitations under the License. 12cb5caa98Sdjl * 13cb5caa98Sdjl * When distributing Covered Code, include this CDDL HEADER in each 14cb5caa98Sdjl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15cb5caa98Sdjl * If applicable, add the following below this CDDL HEADER, with the 16cb5caa98Sdjl * fields enclosed by brackets "[]" replaced with your own identifying 17cb5caa98Sdjl * information: Portions Copyright [yyyy] [name of copyright owner] 18cb5caa98Sdjl * 19cb5caa98Sdjl * CDDL HEADER END 20cb5caa98Sdjl */ 21cb5caa98Sdjl /* 22*07925104Sgww * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 23cb5caa98Sdjl */ 24cb5caa98Sdjl 25cb5caa98Sdjl #ifndef _NSCD_CFGDEF_H 26cb5caa98Sdjl #define _NSCD_CFGDEF_H 27cb5caa98Sdjl 28cb5caa98Sdjl #ifdef __cplusplus 29cb5caa98Sdjl extern "C" { 30cb5caa98Sdjl #endif 31cb5caa98Sdjl 32cb5caa98Sdjl #include <stddef.h> 33cb5caa98Sdjl #include <limits.h> 34cb5caa98Sdjl #include <nss_dbdefs.h> 35cb5caa98Sdjl #include "nscd_config.h" 36cb5caa98Sdjl #include "nscd_log.h" 37cb5caa98Sdjl #include "cache.h" 38cb5caa98Sdjl 39cb5caa98Sdjl /* 40cb5caa98Sdjl * structure used for preliminary checking of an integer 41cb5caa98Sdjl * configuration value 42cb5caa98Sdjl */ 43cb5caa98Sdjl typedef struct { 44cb5caa98Sdjl int min; 45cb5caa98Sdjl int max; 46cb5caa98Sdjl } nscd_cfg_int_check_t; 47cb5caa98Sdjl 48cb5caa98Sdjl /* 49cb5caa98Sdjl * structure used for preliminary checking of a bitmap 50cb5caa98Sdjl * configuration value 51cb5caa98Sdjl */ 52cb5caa98Sdjl typedef struct { 53cb5caa98Sdjl nscd_cfg_bitmap_t valid_bits; 54cb5caa98Sdjl } nscd_cfg_bitmap_check_t; 55cb5caa98Sdjl 56cb5caa98Sdjl /* 57cb5caa98Sdjl * structure used for preliminary checking of a string 58cb5caa98Sdjl * configuration value 59cb5caa98Sdjl */ 60cb5caa98Sdjl typedef struct { 61cb5caa98Sdjl nscd_bool_t must_not_null; 62cb5caa98Sdjl int maxlen; 63cb5caa98Sdjl } nscd_cfg_str_check_t; 64cb5caa98Sdjl 65cb5caa98Sdjl /* 66cb5caa98Sdjl * Per nsswitch database config data 67cb5caa98Sdjl */ 68cb5caa98Sdjl typedef struct { 69cb5caa98Sdjl nscd_cfg_frontend_t fe; 70cb5caa98Sdjl nscd_cfg_switch_t sw; 71cb5caa98Sdjl nscd_cfg_cache_t cache; 72cb5caa98Sdjl } nscd_cfg_nsw_db_data_t; 73cb5caa98Sdjl 74cb5caa98Sdjl /* 75cb5caa98Sdjl * Per nsswitch database statistics data 76cb5caa98Sdjl */ 77cb5caa98Sdjl typedef struct { 78cb5caa98Sdjl nscd_cfg_stat_switch_t sw; 79cb5caa98Sdjl nscd_cfg_stat_cache_t cache; 80cb5caa98Sdjl } nscd_cfg_stat_nsw_db_data_t; 81cb5caa98Sdjl 82cb5caa98Sdjl /* 83cb5caa98Sdjl * global statistics data 84cb5caa98Sdjl */ 85cb5caa98Sdjl typedef struct { 86cb5caa98Sdjl nscd_cfg_stat_global_log_t log; 87cb5caa98Sdjl nscd_cfg_stat_global_switch_t sw; 88cb5caa98Sdjl nscd_cfg_stat_cache_t cache; 89cb5caa98Sdjl } nscd_cfg_stat_global_data_t; 90cb5caa98Sdjl 91cb5caa98Sdjl /* 92cb5caa98Sdjl * global config data 93cb5caa98Sdjl */ 94cb5caa98Sdjl typedef struct { 95cb5caa98Sdjl nscd_cfg_global_log_t log; 96cb5caa98Sdjl nscd_cfg_global_frontend_t fe; 97cb5caa98Sdjl nscd_cfg_global_selfcred_t sc; 98cb5caa98Sdjl nscd_cfg_global_switch_t sw; 99cb5caa98Sdjl nscd_cfg_global_cache_t cache; 100cb5caa98Sdjl } nscd_cfg_global_data_t; 101cb5caa98Sdjl 102cb5caa98Sdjl /* 103cb5caa98Sdjl * structure for handling the switch database specific group 104cb5caa98Sdjl * or parameter default 105cb5caa98Sdjl */ 106cb5caa98Sdjl typedef struct nscd_cfg_nsw_spc_default { 107cb5caa98Sdjl char *db; 108cb5caa98Sdjl int group_off; 109cb5caa98Sdjl int param_off; 110cb5caa98Sdjl void *data; /* pointer or link to data */ 111cb5caa98Sdjl int data_len; 112cb5caa98Sdjl } nscd_cfg_nsw_spc_default_t; 113cb5caa98Sdjl 114cb5caa98Sdjl /* 115cb5caa98Sdjl * name service switch source (repository) table 116cb5caa98Sdjl */ 117cb5caa98Sdjl nscd_cfg_id_t _nscd_cfg_nsw_src[] = { 118cb5caa98Sdjl { 0, "files" }, 119cb5caa98Sdjl { 1, "ldap" }, 120cb5caa98Sdjl { 2, "nis" }, 12136e852a1SRaja Andra { 3, "mdns" }, 12236e852a1SRaja Andra { 4, "dns" }, 12336e852a1SRaja Andra { 5, "compat" }, 12436e852a1SRaja Andra { 6, "user" }, 12536e852a1SRaja Andra { 7, "ad" }, 126cb5caa98Sdjl { -1, NULL } 127cb5caa98Sdjl }; 128cb5caa98Sdjl 129cb5caa98Sdjl /* 130cb5caa98Sdjl * name service related smf service table 131cb5caa98Sdjl * (the order of the services should match the order of the source 13236e852a1SRaja Andra * listed above, 0: files, 1: ldap, 2: nis, 3: mdns. 1334b22b933Srs200217 * dns is not needed) 134cb5caa98Sdjl */ 135cb5caa98Sdjl nscd_cfg_id_t _nscd_cfg_smf_services[] = { 136cb5caa98Sdjl { 0, "svc:/system/name-service-cache:default"}, 137cb5caa98Sdjl { 1, "svc:/network/ldap/client:default" }, 138cb5caa98Sdjl { 2, "svc:/network/nis/client:default" }, 13936e852a1SRaja Andra { 3, "svc:/network/dns/multicast:default" }, 140cb5caa98Sdjl { -1, NULL } 141cb5caa98Sdjl }; 142cb5caa98Sdjl 143cb5caa98Sdjl /* 144d2ba247cSmichen * default version for supported sources/backends 145d2ba247cSmichen */ 146d2ba247cSmichen void *_nscd_be_version = NULL; 147d2ba247cSmichen 148d2ba247cSmichen /* 149cb5caa98Sdjl * name service database table 150cb5caa98Sdjl */ 151cb5caa98Sdjl nscd_cfg_id_t _nscd_cfg_nsw_db[] = { 152cb5caa98Sdjl { 0, NSS_DBNAM_PASSWD }, 153cb5caa98Sdjl { 1, NSS_DBNAM_GROUP }, 154cb5caa98Sdjl { 2, NSS_DBNAM_HOSTS }, 155cb5caa98Sdjl { 3, NSS_DBNAM_IPNODES }, 156cb5caa98Sdjl { 4, NSS_DBNAM_EXECATTR }, 157cb5caa98Sdjl { 5, NSS_DBNAM_PROFATTR }, 158cb5caa98Sdjl { 6, NSS_DBNAM_USERATTR }, 159cb5caa98Sdjl { 7, NSS_DBNAM_NETWORKS }, 160cb5caa98Sdjl { 8, NSS_DBNAM_PROTOCOLS }, 161cb5caa98Sdjl { 9, NSS_DBNAM_RPC }, 162cb5caa98Sdjl { 10, NSS_DBNAM_ETHERS }, 163cb5caa98Sdjl { 11, NSS_DBNAM_NETMASKS }, 164cb5caa98Sdjl { 12, NSS_DBNAM_BOOTPARAMS }, 165cb5caa98Sdjl { 13, NSS_DBNAM_PUBLICKEY }, 166cb5caa98Sdjl { 14, NSS_DBNAM_NETGROUP }, 167cb5caa98Sdjl { 15, NSS_DBNAM_SERVICES }, 168cb5caa98Sdjl { 16, NSS_DBNAM_PRINTERS }, 169cb5caa98Sdjl { 17, NSS_DBNAM_AUTHATTR }, 170cb5caa98Sdjl { 18, NSS_DBNAM_PROJECT }, 171cb5caa98Sdjl { 19, NSS_DBNAM_SHADOW }, 172cb5caa98Sdjl { 20, NSS_DBNAM_AUDITUSER }, 173cb5caa98Sdjl { 21, NSS_DBNAM_TSOL_TP }, 174cb5caa98Sdjl { 22, NSS_DBNAM_TSOL_RH }, 175cb5caa98Sdjl /* pseudo-databases for the compat backend */ 176cb5caa98Sdjl { 23, NSS_DBNAM_PASSWD_COMPAT }, 177cb5caa98Sdjl { 24, NSS_DBNAM_GROUP_COMPAT }, 178cb5caa98Sdjl #define NSS_DBNAM_COMPAT_NUM_DB 5 179cb5caa98Sdjl /* 180cb5caa98Sdjl * pseudo-databases that use the switch policy that is 181cb5caa98Sdjl * configured for NSS_DBNAM_PASSWD_COMPAT 182cb5caa98Sdjl */ 183cb5caa98Sdjl { 25, NSS_DBNAM_PASSWD }, 184cb5caa98Sdjl { 26, NSS_DBNAM_SHADOW }, 185cb5caa98Sdjl { 27, NSS_DBNAM_AUDITUSER }, 186cb5caa98Sdjl { 28, NSS_DBNAM_USERATTR }, 187cb5caa98Sdjl /* 188cb5caa98Sdjl * pseudo-database that uses the switch policy that is 189cb5caa98Sdjl * configured for NSS_DBNAM_GROUP_COMPAT 190cb5caa98Sdjl */ 191cb5caa98Sdjl { 29, NSS_DBNAM_GROUP }, 192cb5caa98Sdjl { -1, NULL } 193cb5caa98Sdjl }; 194cb5caa98Sdjl 195cb5caa98Sdjl /* 196cb5caa98Sdjl * A special way to indicate all switch databases 197cb5caa98Sdjl */ 198cb5caa98Sdjl static nscd_cfg_id_t _nscd_cfg_nsw_alldb = { 199cb5caa98Sdjl NSCD_CFG_NSW_ALLDB_INDEX, 200cb5caa98Sdjl NSCD_CFG_NSW_ALLDB 201cb5caa98Sdjl }; 202cb5caa98Sdjl 203cb5caa98Sdjl /* 204cb5caa98Sdjl * data for preliminary checking of the log configuration 205cb5caa98Sdjl */ 206cb5caa98Sdjl static nscd_cfg_str_check_t NSCD_CFG_LOGFILE_PCHECK = 207cb5caa98Sdjl {nscd_false, PATH_MAX}; 208cb5caa98Sdjl static nscd_cfg_bitmap_check_t NSCD_CFG_LOGCOMP_PCHECK = 209cb5caa98Sdjl {NSCD_LOG_ALL}; 210cb5caa98Sdjl static nscd_cfg_bitmap_check_t NSCD_CFG_LOGLEVEL_PCHECK = 211cb5caa98Sdjl {NSCD_LOG_LEVEL_ALL}; 212cb5caa98Sdjl 213cb5caa98Sdjl /* data for preliminary checking of the switch configuration */ 214cb5caa98Sdjl static nscd_cfg_str_check_t NSCD_CFG_NSWCFGSTR_PCHECK = 215cb5caa98Sdjl {nscd_true, 128}; 216cb5caa98Sdjl 217cb5caa98Sdjl /* 218cb5caa98Sdjl * macros for defining the static param table 219cb5caa98Sdjl */ 220cb5caa98Sdjl #define NSCD_CFG_PGROUP_DESC(pn, type, pflag, gf, g_in_t, pcheck_p,\ 221cb5caa98Sdjl nfunc_name, vfunc_name) \ 222cb5caa98Sdjl { \ 223cb5caa98Sdjl {-1, pn}, type, (NSCD_CFG_PFLAG_GROUP | pflag), \ 224cb5caa98Sdjl 0, 0, 0,\ 225cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 2260dfdd7f3Smichen pcheck_p, nfunc_name, vfunc_name \ 227cb5caa98Sdjl } 228cb5caa98Sdjl 229cb5caa98Sdjl #define NSCD_CFG_PARAM_DESC(pn, type, pflag, pf, p_in_t, \ 230cb5caa98Sdjl gf, g_in_t, pcheck_p, nfunc_name, vfunc_name) \ 231cb5caa98Sdjl { \ 232cb5caa98Sdjl {-1, pn}, type, pflag, \ 233cb5caa98Sdjl NSCD_SIZEOF(p_in_t, pf), offsetof(p_in_t, pf), -1, \ 234cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 2350dfdd7f3Smichen pcheck_p, nfunc_name, vfunc_name \ 236cb5caa98Sdjl } 237cb5caa98Sdjl 238cb5caa98Sdjl #define NSCD_CFG_PGROUP_DESC_NULL \ 239cb5caa98Sdjl { \ 240cb5caa98Sdjl {-1, NULL}, -1, NSCD_CFG_PFLAG_GROUP, \ 241cb5caa98Sdjl 0, 0, 0, \ 242cb5caa98Sdjl 0, 0, 0, \ 2430dfdd7f3Smichen NULL, NULL, NULL \ 244cb5caa98Sdjl } 2450dfdd7f3Smichen 2460dfdd7f3Smichen /* nscd internal cfg_*_notify() cfg_*_verify() and cfg_*_get_stat() */ 2470dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_log_notify(); 2480dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_log_verify(); 2490dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_frontend_notify(); 2500dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_frontend_verify(); 2510dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_selfcred_notify(); 2520dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_selfcred_verify(); 2530dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_switch_notify(); 2540dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_switch_verify(); 2550dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_cache_notify(); 2560dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_cache_verify(); 2570dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_log_get_stat(); 2580dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_switch_get_stat(); 2590dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_cache_get_stat(); 2600dfdd7f3Smichen 2610dfdd7f3Smichen /* 2620dfdd7f3Smichen * the following macros are used to indicate a parameter's 2630dfdd7f3Smichen * notify/verify/get_stat functions are the same as those 2640dfdd7f3Smichen * of the group 2650dfdd7f3Smichen */ 2660dfdd7f3Smichen #define NSCD_CFG_FUNC_NOTIFY_AS_GROUP ((nscd_cfg_func_notify_t)-1) 2670dfdd7f3Smichen #define NSCD_CFG_FUNC_VERIFY_AS_GROUP ((nscd_cfg_func_verify_t)-1) 2680dfdd7f3Smichen #define NSCD_CFG_FUNC_GET_STAT_AS_GROUP ((nscd_cfg_func_get_stat_t)-1) 269cb5caa98Sdjl 270cb5caa98Sdjl /* 271cb5caa98Sdjl * the static config parameter description table 272cb5caa98Sdjl */ 273cb5caa98Sdjl static nscd_cfg_param_desc_t _nscd_cfg_param_desc[] = { 274cb5caa98Sdjl 275cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 276cb5caa98Sdjl "param-group-global-log", 277cb5caa98Sdjl NSCD_CFG_DATA_NONE, 278cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 279cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 280cb5caa98Sdjl log, 281cb5caa98Sdjl nscd_cfg_global_data_t, 282cb5caa98Sdjl NULL, 2830dfdd7f3Smichen _nscd_cfg_log_notify, 2840dfdd7f3Smichen _nscd_cfg_log_verify), 285cb5caa98Sdjl 286cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 287cb5caa98Sdjl "logfile", 288cb5caa98Sdjl NSCD_CFG_DATA_STRING, 289cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL | 290cb5caa98Sdjl NSCD_CFG_PFLAG_VLEN_DATA, 291cb5caa98Sdjl logfile, 292cb5caa98Sdjl nscd_cfg_global_log_t, 293cb5caa98Sdjl log, 294cb5caa98Sdjl nscd_cfg_global_data_t, 295cb5caa98Sdjl &NSCD_CFG_LOGFILE_PCHECK, 2960dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 2970dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 298cb5caa98Sdjl 299cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 300cb5caa98Sdjl "debug-level", 301cb5caa98Sdjl NSCD_CFG_DATA_BITMAP, 302cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 303cb5caa98Sdjl debug_level, 304cb5caa98Sdjl nscd_cfg_global_log_t, 305cb5caa98Sdjl log, 306cb5caa98Sdjl nscd_cfg_global_data_t, 307cb5caa98Sdjl &NSCD_CFG_LOGLEVEL_PCHECK, 3080dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3090dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 310cb5caa98Sdjl 311cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 312cb5caa98Sdjl "debug-components", 313cb5caa98Sdjl NSCD_CFG_DATA_BITMAP, 314cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 315cb5caa98Sdjl debug_comp, 316cb5caa98Sdjl nscd_cfg_global_log_t, 317cb5caa98Sdjl log, 318cb5caa98Sdjl nscd_cfg_global_data_t, 319cb5caa98Sdjl &NSCD_CFG_LOGCOMP_PCHECK, 3200dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3210dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 322cb5caa98Sdjl 323cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 324cb5caa98Sdjl "param-group-global-frontend", 325cb5caa98Sdjl NSCD_CFG_DATA_NONE, 326cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 327cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 328cb5caa98Sdjl fe, 329cb5caa98Sdjl nscd_cfg_global_data_t, 330cb5caa98Sdjl NULL, 3310dfdd7f3Smichen _nscd_cfg_frontend_notify, 3320dfdd7f3Smichen _nscd_cfg_frontend_verify), 333cb5caa98Sdjl 334cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 335cb5caa98Sdjl "common-worker-threads", 336cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 337cb5caa98Sdjl NSCD_CFG_PFLAG_SEND_BIT_SELECTED | 338cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 339cb5caa98Sdjl common_worker_threads, 340cb5caa98Sdjl nscd_cfg_global_frontend_t, 341cb5caa98Sdjl fe, 342cb5caa98Sdjl nscd_cfg_global_data_t, 343cb5caa98Sdjl NULL, 3440dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3450dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 346cb5caa98Sdjl 347cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 348cb5caa98Sdjl "cache-hit-threads", 349cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 350cb5caa98Sdjl NSCD_CFG_PFLAG_SEND_BIT_SELECTED | 351cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 352cb5caa98Sdjl cache_hit_threads, 353cb5caa98Sdjl nscd_cfg_global_frontend_t, 354cb5caa98Sdjl fe, 355cb5caa98Sdjl nscd_cfg_global_data_t, 356cb5caa98Sdjl NULL, 3570dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3580dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 359cb5caa98Sdjl 360cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 361cb5caa98Sdjl "param-group-global-selfcred", 362cb5caa98Sdjl NSCD_CFG_DATA_NONE, 363cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 364cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 365cb5caa98Sdjl sc, 366cb5caa98Sdjl nscd_cfg_global_data_t, 367cb5caa98Sdjl NULL, 3680dfdd7f3Smichen _nscd_cfg_selfcred_notify, 3690dfdd7f3Smichen _nscd_cfg_selfcred_verify), 370cb5caa98Sdjl 371cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 372cb5caa98Sdjl "enable-selfcred", 373cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 374cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 375cb5caa98Sdjl enable_selfcred, 376cb5caa98Sdjl nscd_cfg_global_selfcred_t, 377cb5caa98Sdjl sc, 378cb5caa98Sdjl nscd_cfg_global_data_t, 379cb5caa98Sdjl NULL, 3800dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3810dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 382cb5caa98Sdjl 383cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 384cb5caa98Sdjl "per-user-nscd-ttl", 385cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 386cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 387cb5caa98Sdjl per_user_nscd_ttl, 388cb5caa98Sdjl nscd_cfg_global_selfcred_t, 389cb5caa98Sdjl sc, 390cb5caa98Sdjl nscd_cfg_global_data_t, 391cb5caa98Sdjl NULL, 3920dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3930dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 394cb5caa98Sdjl 395cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 396cb5caa98Sdjl "param-group-global-switch", 397cb5caa98Sdjl NSCD_CFG_DATA_NONE, 398cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 399cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 400cb5caa98Sdjl sw, 401cb5caa98Sdjl nscd_cfg_global_data_t, 402cb5caa98Sdjl NULL, 4030dfdd7f3Smichen _nscd_cfg_switch_notify, 4040dfdd7f3Smichen _nscd_cfg_switch_verify), 405cb5caa98Sdjl 406cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 407cb5caa98Sdjl "global-enable-lookup", 408cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 409cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 410cb5caa98Sdjl enable_lookup_g, 411cb5caa98Sdjl nscd_cfg_global_switch_t, 412cb5caa98Sdjl sw, 413cb5caa98Sdjl nscd_cfg_global_data_t, 414cb5caa98Sdjl NULL, 4150dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4160dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 417cb5caa98Sdjl 418cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 419cb5caa98Sdjl "global-enable-loopback-checking", 420cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 421cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 422cb5caa98Sdjl enable_loopback_checking_g, 423cb5caa98Sdjl nscd_cfg_global_switch_t, 424cb5caa98Sdjl sw, 425cb5caa98Sdjl nscd_cfg_global_data_t, 426cb5caa98Sdjl NULL, 4270dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4280dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 429cb5caa98Sdjl 430cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 431cb5caa98Sdjl "global-check-smf-state-interval", 432cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 433cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 434cb5caa98Sdjl check_smf_state_interval_g, 435cb5caa98Sdjl nscd_cfg_global_switch_t, 436cb5caa98Sdjl sw, 437cb5caa98Sdjl nscd_cfg_global_data_t, 438cb5caa98Sdjl NULL, 4390dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4400dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 441cb5caa98Sdjl 442cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 443cb5caa98Sdjl "param-group-global-cache", 444cb5caa98Sdjl NSCD_CFG_DATA_NONE, 445cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 446cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SET_ALL_DB | 447cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 448cb5caa98Sdjl cache, 449cb5caa98Sdjl nscd_cfg_global_data_t, 450cb5caa98Sdjl NULL, 4510dfdd7f3Smichen _nscd_cfg_cache_notify, 4520dfdd7f3Smichen _nscd_cfg_cache_verify), 453cb5caa98Sdjl 454cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 455cb5caa98Sdjl "global-enable-cache", 456cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 457cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 458cb5caa98Sdjl enable, 459cb5caa98Sdjl nscd_cfg_global_cache_t, 460cb5caa98Sdjl cache, 461cb5caa98Sdjl nscd_cfg_global_data_t, 462cb5caa98Sdjl NULL, 4630dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4640dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 465cb5caa98Sdjl 466cb5caa98Sdjl /* non-global config param from this point on */ 467cb5caa98Sdjl 468cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 469cb5caa98Sdjl "param-group-frontend", 470cb5caa98Sdjl NSCD_CFG_DATA_NONE, 471cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP, 472cb5caa98Sdjl fe, 473cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 474cb5caa98Sdjl NULL, 4750dfdd7f3Smichen _nscd_cfg_frontend_notify, 4760dfdd7f3Smichen _nscd_cfg_frontend_verify), 477cb5caa98Sdjl 478cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 479cb5caa98Sdjl "worker-thread-per-nsw-db", 480cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 481cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 482cb5caa98Sdjl worker_thread_per_nsw_db, 483cb5caa98Sdjl nscd_cfg_frontend_t, 484cb5caa98Sdjl fe, 485cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 486cb5caa98Sdjl NULL, 4870dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4880dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 489cb5caa98Sdjl 490cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 491cb5caa98Sdjl "param-group-switch", 492cb5caa98Sdjl NSCD_CFG_DATA_NONE, 493cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 494cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 495cb5caa98Sdjl sw, 496cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 497cb5caa98Sdjl NULL, 4980dfdd7f3Smichen _nscd_cfg_switch_notify, 4990dfdd7f3Smichen _nscd_cfg_switch_verify), 500cb5caa98Sdjl 501cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 502cb5caa98Sdjl "nsw-config-string", 503cb5caa98Sdjl NSCD_CFG_DATA_STRING, 504cb5caa98Sdjl NSCD_CFG_PFLAG_VLEN_DATA | 505cb5caa98Sdjl NSCD_CFG_PFLAG_LINKED, 506cb5caa98Sdjl nsw_config_string, 507cb5caa98Sdjl nscd_cfg_switch_t, 508cb5caa98Sdjl sw, 509cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 510cb5caa98Sdjl &NSCD_CFG_NSWCFGSTR_PCHECK, 5110dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5120dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 513cb5caa98Sdjl 514cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 515cb5caa98Sdjl "nsw-config-database", 516cb5caa98Sdjl NSCD_CFG_DATA_STRING, 517cb5caa98Sdjl NSCD_CFG_PFLAG_VLEN_DATA | 518cb5caa98Sdjl NSCD_CFG_PFLAG_HIDDEN, 519cb5caa98Sdjl nsw_config_db, 520cb5caa98Sdjl nscd_cfg_switch_t, 521cb5caa98Sdjl sw, 522cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 523cb5caa98Sdjl &NSCD_CFG_NSWCFGSTR_PCHECK, 5240dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5250dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 526cb5caa98Sdjl 527cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 528cb5caa98Sdjl "enable-lookup", 529cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 530cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 531cb5caa98Sdjl enable_lookup, 532cb5caa98Sdjl nscd_cfg_switch_t, 533cb5caa98Sdjl sw, 534cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 535cb5caa98Sdjl NULL, 5360dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5370dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 538cb5caa98Sdjl 539cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 540cb5caa98Sdjl "enable-loopback-checking", 541cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 542cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 543cb5caa98Sdjl enable_loopback_checking, 544cb5caa98Sdjl nscd_cfg_switch_t, 545cb5caa98Sdjl sw, 546cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 547cb5caa98Sdjl NULL, 5480dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5490dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 550cb5caa98Sdjl 551cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 552cb5caa98Sdjl "max-nsw-state-per-db", 553cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 554cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 555cb5caa98Sdjl max_nsw_state_per_db, 556cb5caa98Sdjl nscd_cfg_switch_t, 557cb5caa98Sdjl sw, 558cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 559cb5caa98Sdjl NULL, 5600dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5610dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 562cb5caa98Sdjl 563cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 564cb5caa98Sdjl "max-nsw-state-per-thread", 565cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 566cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 567cb5caa98Sdjl max_nsw_state_per_thread, 568cb5caa98Sdjl nscd_cfg_switch_t, 569cb5caa98Sdjl sw, 570cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 571cb5caa98Sdjl NULL, 5720dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5730dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 574cb5caa98Sdjl 575cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 576cb5caa98Sdjl "max-getent-ctx-per-db", 577cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 578cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 579cb5caa98Sdjl max_getent_ctx_per_db, 580cb5caa98Sdjl nscd_cfg_switch_t, 581cb5caa98Sdjl sw, 582cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 583cb5caa98Sdjl NULL, 5840dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5850dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 586cb5caa98Sdjl 587cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 588cb5caa98Sdjl "param-group-cache", 589cb5caa98Sdjl NSCD_CFG_DATA_NONE, 590cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP, 591cb5caa98Sdjl cache, 592cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 593cb5caa98Sdjl NULL, 5940dfdd7f3Smichen _nscd_cfg_cache_notify, 5950dfdd7f3Smichen _nscd_cfg_cache_verify), 596cb5caa98Sdjl 597cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 598cb5caa98Sdjl "enable-cache", 599cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 600cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 601cb5caa98Sdjl enable, 602cb5caa98Sdjl nscd_cfg_cache_t, 603cb5caa98Sdjl cache, 604cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 605cb5caa98Sdjl NULL, 6060dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6070dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 608cb5caa98Sdjl 609cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 610cb5caa98Sdjl "enable-per-user-cache", 611cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 612cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 613cb5caa98Sdjl per_user, 614cb5caa98Sdjl nscd_cfg_cache_t, 615cb5caa98Sdjl cache, 616cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 617cb5caa98Sdjl NULL, 6180dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6190dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 620cb5caa98Sdjl 621cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 622cb5caa98Sdjl "avoid-nameservice", 623cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 624cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 625cb5caa98Sdjl avoid_ns, 626cb5caa98Sdjl nscd_cfg_cache_t, 627cb5caa98Sdjl cache, 628cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 629cb5caa98Sdjl NULL, 6300dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6310dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 632cb5caa98Sdjl 633cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 634cb5caa98Sdjl "check-files", 635cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 636cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 637cb5caa98Sdjl check_files, 638cb5caa98Sdjl nscd_cfg_cache_t, 639cb5caa98Sdjl cache, 640cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 641cb5caa98Sdjl NULL, 6420dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6430dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 644cb5caa98Sdjl 645cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 646cb5caa98Sdjl "check-file-interval", 647cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 648cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 649cb5caa98Sdjl check_interval, 650cb5caa98Sdjl nscd_cfg_cache_t, 651cb5caa98Sdjl cache, 652cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 653cb5caa98Sdjl NULL, 6540dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6550dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 656cb5caa98Sdjl 657cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 658cb5caa98Sdjl "positive-time-to-live", 659cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 660cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 661cb5caa98Sdjl pos_ttl, 662cb5caa98Sdjl nscd_cfg_cache_t, 663cb5caa98Sdjl cache, 664cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 665cb5caa98Sdjl NULL, 6660dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6670dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 668cb5caa98Sdjl 669cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 670cb5caa98Sdjl "negative-time-to-live", 671cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 672cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 673cb5caa98Sdjl neg_ttl, 674cb5caa98Sdjl nscd_cfg_cache_t, 675cb5caa98Sdjl cache, 676cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 677cb5caa98Sdjl NULL, 6780dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6790dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 680cb5caa98Sdjl 681cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 682cb5caa98Sdjl "keep-hot-count", 683cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 684cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 685cb5caa98Sdjl keephot, 686cb5caa98Sdjl nscd_cfg_cache_t, 687cb5caa98Sdjl cache, 688cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 689cb5caa98Sdjl NULL, 6900dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6910dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 692cb5caa98Sdjl 693cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 694cb5caa98Sdjl "hint-size", 695cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 696cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 697cb5caa98Sdjl hint_size, 698cb5caa98Sdjl nscd_cfg_cache_t, 699cb5caa98Sdjl cache, 700cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 701cb5caa98Sdjl NULL, 7020dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7030dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 704cb5caa98Sdjl 705cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 706cb5caa98Sdjl "maximum-entries-allowed", 707cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 708cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 709cb5caa98Sdjl maxentries, 710cb5caa98Sdjl nscd_cfg_cache_t, 711cb5caa98Sdjl cache, 712cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 713cb5caa98Sdjl NULL, 7140dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7150dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 716cb5caa98Sdjl 717cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 718cb5caa98Sdjl "suggested-size", 719cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 720cb5caa98Sdjl NSCD_CFG_PFLAG_OBSOLETE, 721cb5caa98Sdjl suggestedsize, 722cb5caa98Sdjl nscd_cfg_cache_t, 723cb5caa98Sdjl cache, 724cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 725cb5caa98Sdjl NULL, 7260dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7270dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 728cb5caa98Sdjl 729cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 730cb5caa98Sdjl "old-data-ok", 731cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 732cb5caa98Sdjl NSCD_CFG_PFLAG_OBSOLETE, 733cb5caa98Sdjl old_data_ok, 734cb5caa98Sdjl nscd_cfg_cache_t, 735cb5caa98Sdjl cache, 736cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 737cb5caa98Sdjl NULL, 7380dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7390dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 740cb5caa98Sdjl 741cb5caa98Sdjl NSCD_CFG_PGROUP_DESC_NULL 742cb5caa98Sdjl }; 743cb5caa98Sdjl 744cb5caa98Sdjl /* 745cb5caa98Sdjl * defaults for the global configuration 746cb5caa98Sdjl */ 747cb5caa98Sdjl static nscd_cfg_global_data_t nscd_cfg_global_default = { 748cb5caa98Sdjl 749cb5caa98Sdjl /* 750cb5caa98Sdjl * nscd_cfg_global_log_t 751cb5caa98Sdjl */ 752cb5caa98Sdjl { 753cb5caa98Sdjl 754cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_LOG, 755cb5caa98Sdjl NULL, 7560dfdd7f3Smichen NSCD_LOG_LEVEL_NONE, /* debug_level */ 757cb5caa98Sdjl NSCD_LOG_CACHE, /* debug_comp */ 758cb5caa98Sdjl 759cb5caa98Sdjl }, 760cb5caa98Sdjl 761cb5caa98Sdjl /* 762cb5caa98Sdjl * nscd_cfg_global_frontend_t 763cb5caa98Sdjl */ 764cb5caa98Sdjl { 765cb5caa98Sdjl 766cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_FRONTEND, 767e37190e5Smichen 100, /* common_worker_threads */ 768e37190e5Smichen 100, /* cache_hit_threads */ 769cb5caa98Sdjl 770cb5caa98Sdjl }, 771cb5caa98Sdjl 772cb5caa98Sdjl /* 773cb5caa98Sdjl * nscd_cfg_global_selfcred_t 774cb5caa98Sdjl */ 775cb5caa98Sdjl { 776cb5caa98Sdjl 777cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_SELFCRED, 778cb5caa98Sdjl nscd_true, /* enable_selfcred */ 779cb5caa98Sdjl 120, /* per_user_nscd_ttl: 120 seconds */ 780cb5caa98Sdjl 781cb5caa98Sdjl }, 782cb5caa98Sdjl 783cb5caa98Sdjl /* 784cb5caa98Sdjl * nscd_cfg_global_switch_t 785cb5caa98Sdjl */ 786cb5caa98Sdjl { 787cb5caa98Sdjl 788cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_SWITCH, 789cb5caa98Sdjl nscd_true, /* enable_lookup_g */ 790cb5caa98Sdjl nscd_false, /* enable_loopback_checking_g */ 791cb5caa98Sdjl 120, /* check_smf_state_interval_g */ 792cb5caa98Sdjl 793cb5caa98Sdjl }, 794cb5caa98Sdjl 795cb5caa98Sdjl /* 796cb5caa98Sdjl * nscd_cfg_global_cache_t 797cb5caa98Sdjl */ 798cb5caa98Sdjl NSCD_CFG_GLOBAL_CACHE_DEFAULTS 799cb5caa98Sdjl }; 800cb5caa98Sdjl 801cb5caa98Sdjl /* 802cb5caa98Sdjl * defaults for the per switch database configuration 803cb5caa98Sdjl */ 804cb5caa98Sdjl static nscd_cfg_nsw_db_data_t nscd_cfg_nsw_db_data_default = { 805cb5caa98Sdjl 806cb5caa98Sdjl /* 807cb5caa98Sdjl * nscd_cfg_frontend_t 808cb5caa98Sdjl */ 809cb5caa98Sdjl { 810cb5caa98Sdjl 811cb5caa98Sdjl NSCD_CFG_GROUP_INFO_FRONTEND, 812e37190e5Smichen 50, /* worker_thread_per_nsw_db */ 813cb5caa98Sdjl 814cb5caa98Sdjl }, 815cb5caa98Sdjl 816cb5caa98Sdjl /* 817cb5caa98Sdjl * nscd_cfg_switch_t 818cb5caa98Sdjl */ 819cb5caa98Sdjl { 820cb5caa98Sdjl 821cb5caa98Sdjl NSCD_CFG_GROUP_INFO_SWITCH, 822cb5caa98Sdjl "nis files", /* nsw_config_string */ 823cb5caa98Sdjl NULL, /* nsw_config_db */ 824cb5caa98Sdjl nscd_true, /* enable_lookup */ 825cb5caa98Sdjl nscd_false, /* enable_loopback_checking */ 826124771bbSmichen 288, /* max_nsw_state_per_db */ 827124771bbSmichen 32, /* max_nsw_state_per_thread */ 828124771bbSmichen 256, /* max_getent_ctx_per_db */ 829cb5caa98Sdjl 830cb5caa98Sdjl }, 831cb5caa98Sdjl 832cb5caa98Sdjl /* 833cb5caa98Sdjl * nscd_cfg_cache_t 834cb5caa98Sdjl */ 835cb5caa98Sdjl NSCD_CFG_CACHE_DEFAULTS 836cb5caa98Sdjl }; 837cb5caa98Sdjl 838cb5caa98Sdjl /* 839cb5caa98Sdjl * macros for defining the database specific defaults 840cb5caa98Sdjl */ 841cb5caa98Sdjl #define NSCD_CFG_DB_DEFAULT_PARAM(db, gf, pf, gt, defaddr, deflen) \ 842cb5caa98Sdjl { \ 843cb5caa98Sdjl db, offsetof(nscd_cfg_nsw_db_data_t, gf), \ 844cb5caa98Sdjl offsetof(gt, pf), defaddr, deflen \ 845cb5caa98Sdjl } 846cb5caa98Sdjl 847cb5caa98Sdjl #define NSCD_CFG_DB_DEFAULT_GROUP(db, gf, defaddr, deflen) \ 848cb5caa98Sdjl { \ 849cb5caa98Sdjl db, offsetof(nscd_cfg_nsw_db_data_t, gf), \ 850cb5caa98Sdjl 0, defaddr, deflen \ 851cb5caa98Sdjl } 852cb5caa98Sdjl 853cb5caa98Sdjl #define NSCD_CFG_DB_DEFAULT_NULL \ 854cb5caa98Sdjl { \ 855cb5caa98Sdjl NULL, 0, 0, NULL, 0 \ 856cb5caa98Sdjl } 857cb5caa98Sdjl 858cb5caa98Sdjl /* 859*07925104Sgww * shadow, and user_attr use the same switch policy 860cb5caa98Sdjl * as that of passwd. exec_attr use that of prof_attr. 861cb5caa98Sdjl */ 862cb5caa98Sdjl static char *nscd_cfg_shadow_cfg_db = NSS_DBNAM_PASSWD; 863cb5caa98Sdjl static char *nscd_cfg_userattr_cfg_db = NSS_DBNAM_PASSWD; 864cb5caa98Sdjl static char *nscd_cfg_execattr_cfg_db = NSS_DBNAM_PROFATTR; 865cb5caa98Sdjl 866cb5caa98Sdjl /* 867cb5caa98Sdjl * default switch policy for pseudo-databases passwd_compat and 868cb5caa98Sdjl * and group_compa is "nis" 869cb5caa98Sdjl */ 870cb5caa98Sdjl static char *nscd_cfg_def_passwd_compat = NSS_DEFCONF_PASSWD_COMPAT; 871cb5caa98Sdjl static char *nscd_cfg_def_group_compat = NSS_DEFCONF_GROUP_COMPAT; 872cb5caa98Sdjl 873cb5caa98Sdjl static nscd_cfg_nsw_spc_default_t nscd_cfg_passwd_cfg_link = 874cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 875cb5caa98Sdjl NSS_DBNAM_PASSWD, 876cb5caa98Sdjl sw, 877cb5caa98Sdjl nsw_config_string, 878cb5caa98Sdjl nscd_cfg_switch_t, 879cb5caa98Sdjl NULL, 880cb5caa98Sdjl NSCD_SIZEOF(nscd_cfg_switch_t, nsw_config_string)); 881cb5caa98Sdjl 882cb5caa98Sdjl static nscd_cfg_nsw_spc_default_t nscd_cfg_profattr_cfg_link = 883cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 884cb5caa98Sdjl NSS_DBNAM_PROFATTR, 885cb5caa98Sdjl sw, 886cb5caa98Sdjl nsw_config_string, 887cb5caa98Sdjl nscd_cfg_switch_t, 888cb5caa98Sdjl NULL, 889cb5caa98Sdjl NSCD_SIZEOF(nscd_cfg_switch_t, nsw_config_string)); 890cb5caa98Sdjl 891cb5caa98Sdjl 892cb5caa98Sdjl /* 893cb5caa98Sdjl * switch database specific defaults 894cb5caa98Sdjl */ 895cb5caa98Sdjl nscd_cfg_nsw_spc_default_t _nscd_cfg_nsw_spc_default[] = { 896cb5caa98Sdjl 897cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 898cb5caa98Sdjl NSS_DBNAM_SHADOW, 899cb5caa98Sdjl sw, 900cb5caa98Sdjl nsw_config_db, 901cb5caa98Sdjl nscd_cfg_switch_t, 902cb5caa98Sdjl &nscd_cfg_shadow_cfg_db, 903cb5caa98Sdjl sizeof (nscd_cfg_shadow_cfg_db)), 904cb5caa98Sdjl 905cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 906cb5caa98Sdjl NSS_DBNAM_USERATTR, 907cb5caa98Sdjl sw, 908cb5caa98Sdjl nsw_config_db, 909cb5caa98Sdjl nscd_cfg_switch_t, 910cb5caa98Sdjl &nscd_cfg_userattr_cfg_db, 911cb5caa98Sdjl sizeof (nscd_cfg_userattr_cfg_db)), 912cb5caa98Sdjl 913cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 914cb5caa98Sdjl NSS_DBNAM_EXECATTR, 915cb5caa98Sdjl sw, 916cb5caa98Sdjl nsw_config_db, 917cb5caa98Sdjl nscd_cfg_switch_t, 918cb5caa98Sdjl &nscd_cfg_execattr_cfg_db, 919cb5caa98Sdjl sizeof (nscd_cfg_execattr_cfg_db)), 920cb5caa98Sdjl 921cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 922cb5caa98Sdjl NSS_DBNAM_PASSWD_COMPAT, 923cb5caa98Sdjl sw, 924cb5caa98Sdjl nsw_config_string, 925cb5caa98Sdjl nscd_cfg_switch_t, 926cb5caa98Sdjl &nscd_cfg_def_passwd_compat, 927cb5caa98Sdjl sizeof (nscd_cfg_def_passwd_compat)), 928cb5caa98Sdjl 929cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 930cb5caa98Sdjl NSS_DBNAM_GROUP_COMPAT, 931cb5caa98Sdjl sw, 932cb5caa98Sdjl nsw_config_string, 933cb5caa98Sdjl nscd_cfg_switch_t, 934cb5caa98Sdjl &nscd_cfg_def_group_compat, 935cb5caa98Sdjl sizeof (nscd_cfg_def_group_compat)), 936cb5caa98Sdjl 937cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_NULL 938cb5caa98Sdjl }; 939cb5caa98Sdjl 940cb5caa98Sdjl /* 941cb5caa98Sdjl * switch database specific defaults that are linked to 942cb5caa98Sdjl * those of other databases 943cb5caa98Sdjl */ 944cb5caa98Sdjl nscd_cfg_nsw_spc_default_t _nscd_cfg_nsw_link_default[] = { 945cb5caa98Sdjl 946cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 947cb5caa98Sdjl NSS_DBNAM_SHADOW, 948cb5caa98Sdjl sw, 949cb5caa98Sdjl nsw_config_string, 950cb5caa98Sdjl nscd_cfg_switch_t, 951cb5caa98Sdjl &nscd_cfg_passwd_cfg_link, 952cb5caa98Sdjl 0), 953cb5caa98Sdjl 954cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 955cb5caa98Sdjl NSS_DBNAM_USERATTR, 956cb5caa98Sdjl sw, 957cb5caa98Sdjl nsw_config_string, 958cb5caa98Sdjl nscd_cfg_switch_t, 959cb5caa98Sdjl &nscd_cfg_passwd_cfg_link, 960cb5caa98Sdjl 0), 961cb5caa98Sdjl 962cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 963cb5caa98Sdjl NSS_DBNAM_AUDITUSER, 964cb5caa98Sdjl sw, 965cb5caa98Sdjl nsw_config_string, 966cb5caa98Sdjl nscd_cfg_switch_t, 967cb5caa98Sdjl &nscd_cfg_passwd_cfg_link, 968cb5caa98Sdjl 0), 969cb5caa98Sdjl 970cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 971cb5caa98Sdjl NSS_DBNAM_EXECATTR, 972cb5caa98Sdjl sw, 973cb5caa98Sdjl nsw_config_string, 974cb5caa98Sdjl nscd_cfg_switch_t, 975cb5caa98Sdjl &nscd_cfg_profattr_cfg_link, 976cb5caa98Sdjl 0), 977cb5caa98Sdjl 978cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_NULL 979cb5caa98Sdjl }; 980cb5caa98Sdjl 981cb5caa98Sdjl /* 982cb5caa98Sdjl * macros for defining the static stats table 983cb5caa98Sdjl */ 984cb5caa98Sdjl #define NSCD_CFG_SGROUP_DESC(sn, type, sflag, gi, \ 985cb5caa98Sdjl gf, g_in_t, gsfunc_name) \ 986cb5caa98Sdjl { \ 987cb5caa98Sdjl {-1, sn}, type, NSCD_CFG_SFLAG_GROUP | sflag, gi, \ 988cb5caa98Sdjl 0, 0, 0,\ 989cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 9900dfdd7f3Smichen gsfunc_name \ 991cb5caa98Sdjl } 992cb5caa98Sdjl 993cb5caa98Sdjl #define NSCD_CFG_STAT_DESC(sn, type, sflag, sf, s_in_t, \ 994cb5caa98Sdjl gf, g_in_t, gsfunc_name) \ 995cb5caa98Sdjl { \ 996cb5caa98Sdjl {-1, sn}, type, sflag, NSCD_CFG_GROUP_INFO_NULL, \ 997cb5caa98Sdjl NSCD_SIZEOF(s_in_t, sf), offsetof(s_in_t, sf), -1, \ 998cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 9990dfdd7f3Smichen gsfunc_name \ 1000cb5caa98Sdjl } 1001cb5caa98Sdjl 1002cb5caa98Sdjl #define NSCD_CFG_SGROUP_DESC_NULL \ 1003cb5caa98Sdjl { \ 1004cb5caa98Sdjl {-1, NULL}, -1, NSCD_CFG_SFLAG_GROUP, NULL, \ 1005cb5caa98Sdjl 0, 0, 0, \ 1006cb5caa98Sdjl 0, 0, 0, \ 10070dfdd7f3Smichen NULL \ 1008cb5caa98Sdjl } 1009cb5caa98Sdjl 1010cb5caa98Sdjl /* 1011cb5caa98Sdjl * the static statistics description table 1012cb5caa98Sdjl */ 1013cb5caa98Sdjl static nscd_cfg_stat_desc_t _nscd_cfg_stat_desc[] = { 1014cb5caa98Sdjl 1015cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1016cb5caa98Sdjl "stat-group-global-log", 1017cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1018cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1019cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_GLOBAL_LOG, 1020cb5caa98Sdjl log, 1021cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10220dfdd7f3Smichen _nscd_cfg_log_get_stat), 1023cb5caa98Sdjl 1024cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1025cb5caa98Sdjl "entries-logged", 1026cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1027cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1028cb5caa98Sdjl entries_logged, 1029cb5caa98Sdjl nscd_cfg_stat_global_log_t, 1030cb5caa98Sdjl log, 1031cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10320dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1033cb5caa98Sdjl 1034cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1035cb5caa98Sdjl "stat-group-global-switch", 1036cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1037cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1038cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_GLOBAL_SWITCH, 1039cb5caa98Sdjl sw, 1040cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10410dfdd7f3Smichen _nscd_cfg_switch_get_stat), 1042cb5caa98Sdjl 1043cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1044cb5caa98Sdjl "global-lookup-request-received", 1045cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1046cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1047cb5caa98Sdjl lookup_request_received_g, 1048cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1049cb5caa98Sdjl sw, 1050cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10510dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1052cb5caa98Sdjl 1053cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1054cb5caa98Sdjl "global-lookup-request-queued", 1055cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1056cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1057cb5caa98Sdjl lookup_request_queued_g, 1058cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1059cb5caa98Sdjl sw, 1060cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10610dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1062cb5caa98Sdjl 1063cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1064cb5caa98Sdjl "global-lookup-request-in-progress", 1065cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1066cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1067cb5caa98Sdjl lookup_request_in_progress_g, 1068cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1069cb5caa98Sdjl sw, 1070cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10710dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1072cb5caa98Sdjl 1073cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1074cb5caa98Sdjl "global-lookup-request-succeeded", 1075cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1076cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1077cb5caa98Sdjl lookup_request_succeeded_g, 1078cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1079cb5caa98Sdjl sw, 1080cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10810dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1082cb5caa98Sdjl 1083cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1084cb5caa98Sdjl "global-lookup-request-failed", 1085cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1086cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1087cb5caa98Sdjl lookup_request_failed_g, 1088cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1089cb5caa98Sdjl sw, 1090cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10910dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1092cb5caa98Sdjl 1093cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1094cb5caa98Sdjl "global-loopback-nsw-db-skipped", 1095cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1096cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1097cb5caa98Sdjl loopback_nsw_db_skipped_g, 1098cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1099cb5caa98Sdjl sw, 1100cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11010dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1102cb5caa98Sdjl 1103cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1104cb5caa98Sdjl "stat-group-global-cache", 1105cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1106cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1107cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_CACHE, 1108cb5caa98Sdjl cache, 1109cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11100dfdd7f3Smichen _nscd_cfg_cache_get_stat), 1111cb5caa98Sdjl 1112cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1113cb5caa98Sdjl "global-cache-hits-on-positive", 1114cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1115cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1116cb5caa98Sdjl pos_hits, 1117cb5caa98Sdjl nscd_cfg_stat_cache_t, 1118cb5caa98Sdjl cache, 1119cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11200dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1121cb5caa98Sdjl 1122cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1123cb5caa98Sdjl "global-cache-hits-on-negative", 1124cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1125cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1126cb5caa98Sdjl neg_hits, 1127cb5caa98Sdjl nscd_cfg_stat_cache_t, 1128cb5caa98Sdjl cache, 1129cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11300dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1131cb5caa98Sdjl 1132cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1133cb5caa98Sdjl "global-cache-misses-on-positive", 1134cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1135cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1136cb5caa98Sdjl pos_misses, 1137cb5caa98Sdjl nscd_cfg_stat_cache_t, 1138cb5caa98Sdjl cache, 1139cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11400dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1141cb5caa98Sdjl 1142cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1143cb5caa98Sdjl "global-cache-misses-on-negative", 1144cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1145cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1146cb5caa98Sdjl neg_misses, 1147cb5caa98Sdjl nscd_cfg_stat_cache_t, 1148cb5caa98Sdjl cache, 1149cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11500dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1151cb5caa98Sdjl 1152cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1153cb5caa98Sdjl "global-cache-queries-queued", 1154cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1155cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1156cb5caa98Sdjl wait_count, 1157cb5caa98Sdjl nscd_cfg_stat_cache_t, 1158cb5caa98Sdjl cache, 1159cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11600dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1161cb5caa98Sdjl 1162cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1163cb5caa98Sdjl "global-total-cache-entries", 1164cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1165cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1166cb5caa98Sdjl entries, 1167cb5caa98Sdjl nscd_cfg_stat_cache_t, 1168cb5caa98Sdjl cache, 1169cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11700dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1171cb5caa98Sdjl 1172cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1173cb5caa98Sdjl "global-complete-cache-invalidations", 1174cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1175cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1176cb5caa98Sdjl invalidate_count, 1177cb5caa98Sdjl nscd_cfg_stat_cache_t, 1178cb5caa98Sdjl cache, 1179cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11800dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1181cb5caa98Sdjl 1182cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1183cb5caa98Sdjl "global-cache-queries-dropped", 1184cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1185cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1186cb5caa98Sdjl drop_count, 1187cb5caa98Sdjl nscd_cfg_stat_cache_t, 1188cb5caa98Sdjl cache, 1189cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11900dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1191cb5caa98Sdjl 1192cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1193cb5caa98Sdjl "global-cache-hit-rate", 1194cb5caa98Sdjl NSCD_CFG_DATA_PERCENT, 1195cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1196cb5caa98Sdjl hitrate, 1197cb5caa98Sdjl nscd_cfg_stat_cache_t, 1198cb5caa98Sdjl cache, 1199cb5caa98Sdjl nscd_cfg_stat_global_data_t, 12000dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1201cb5caa98Sdjl 1202cb5caa98Sdjl /* non-global stat from this point on */ 1203cb5caa98Sdjl 1204cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1205cb5caa98Sdjl "stat-group-switch", 1206cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1207cb5caa98Sdjl NSCD_CFG_SFLAG_GROUP, 1208cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_SWITCH, 1209cb5caa98Sdjl cache, 1210cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12110dfdd7f3Smichen _nscd_cfg_switch_get_stat), 1212cb5caa98Sdjl 1213cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1214cb5caa98Sdjl "lookup-request-received", 1215cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1216cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1217cb5caa98Sdjl lookup_request_received, 1218cb5caa98Sdjl nscd_cfg_stat_switch_t, 1219cb5caa98Sdjl sw, 1220cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12210dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1222cb5caa98Sdjl 1223cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1224cb5caa98Sdjl "lookup-request-queued", 1225cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1226cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1227cb5caa98Sdjl lookup_request_queued, 1228cb5caa98Sdjl nscd_cfg_stat_switch_t, 1229cb5caa98Sdjl sw, 1230cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12310dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1232cb5caa98Sdjl 1233cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1234cb5caa98Sdjl "lookup-request-in-progress", 1235cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1236cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1237cb5caa98Sdjl lookup_request_in_progress, 1238cb5caa98Sdjl nscd_cfg_stat_switch_t, 1239cb5caa98Sdjl sw, 1240cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12410dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1242cb5caa98Sdjl 1243cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1244cb5caa98Sdjl "lookup-request-succeeded", 1245cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1246cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1247cb5caa98Sdjl lookup_request_succeeded, 1248cb5caa98Sdjl nscd_cfg_stat_switch_t, 1249cb5caa98Sdjl sw, 1250cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12510dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1252cb5caa98Sdjl 1253cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1254cb5caa98Sdjl "lookup-request-failed", 1255cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1256cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1257cb5caa98Sdjl lookup_request_failed, 1258cb5caa98Sdjl nscd_cfg_stat_switch_t, 1259cb5caa98Sdjl sw, 1260cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12610dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1262cb5caa98Sdjl 1263cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1264cb5caa98Sdjl "loopback-nsw-db-skipped", 1265cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1266cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1267cb5caa98Sdjl loopback_nsw_db_skipped, 1268cb5caa98Sdjl nscd_cfg_stat_switch_t, 1269cb5caa98Sdjl sw, 1270cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12710dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1272cb5caa98Sdjl 1273cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1274cb5caa98Sdjl "stat-group-cache", 1275cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1276cb5caa98Sdjl NSCD_CFG_SFLAG_GROUP, 1277cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_CACHE, 1278cb5caa98Sdjl cache, 1279cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12800dfdd7f3Smichen _nscd_cfg_cache_get_stat), 1281cb5caa98Sdjl 1282cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1283cb5caa98Sdjl "cache-hits-on-positive", 1284cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1285cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1286cb5caa98Sdjl pos_hits, 1287cb5caa98Sdjl nscd_cfg_stat_cache_t, 1288cb5caa98Sdjl cache, 1289cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12900dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1291cb5caa98Sdjl 1292cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1293cb5caa98Sdjl "cache-hits-on-negative", 1294cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1295cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1296cb5caa98Sdjl neg_hits, 1297cb5caa98Sdjl nscd_cfg_stat_cache_t, 1298cb5caa98Sdjl cache, 1299cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13000dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1301cb5caa98Sdjl 1302cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1303cb5caa98Sdjl "cache-misses-on-positive", 1304cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1305cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1306cb5caa98Sdjl pos_misses, 1307cb5caa98Sdjl nscd_cfg_stat_cache_t, 1308cb5caa98Sdjl cache, 1309cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13100dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1311cb5caa98Sdjl 1312cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1313cb5caa98Sdjl "cache-misses-on-negative", 1314cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1315cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1316cb5caa98Sdjl neg_misses, 1317cb5caa98Sdjl nscd_cfg_stat_cache_t, 1318cb5caa98Sdjl cache, 1319cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13200dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1321cb5caa98Sdjl 1322cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1323cb5caa98Sdjl "cache-queries-queued", 1324cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1325cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1326cb5caa98Sdjl wait_count, 1327cb5caa98Sdjl nscd_cfg_stat_cache_t, 1328cb5caa98Sdjl cache, 1329cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13300dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1331cb5caa98Sdjl 1332cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1333cb5caa98Sdjl "total-cache-entries", 1334cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1335cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1336cb5caa98Sdjl entries, 1337cb5caa98Sdjl nscd_cfg_stat_cache_t, 1338cb5caa98Sdjl cache, 1339cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13400dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1341cb5caa98Sdjl 1342cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1343cb5caa98Sdjl "complete-cache-invalidations", 1344cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1345cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1346cb5caa98Sdjl invalidate_count, 1347cb5caa98Sdjl nscd_cfg_stat_cache_t, 1348cb5caa98Sdjl cache, 1349cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13500dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1351cb5caa98Sdjl 1352cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1353cb5caa98Sdjl "cache-hit-rate", 1354cb5caa98Sdjl NSCD_CFG_DATA_PERCENT, 1355cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1356cb5caa98Sdjl hitrate, 1357cb5caa98Sdjl nscd_cfg_stat_cache_t, 1358cb5caa98Sdjl cache, 1359cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13600dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1361cb5caa98Sdjl 1362cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1363cb5caa98Sdjl "cache-queries-dropped", 1364cb5caa98Sdjl NSCD_CFG_DATA_PERCENT, 1365cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1366cb5caa98Sdjl drop_count, 1367cb5caa98Sdjl nscd_cfg_stat_cache_t, 1368cb5caa98Sdjl cache, 1369cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13700dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1371cb5caa98Sdjl 1372cb5caa98Sdjl 1373cb5caa98Sdjl NSCD_CFG_SGROUP_DESC_NULL 1374cb5caa98Sdjl }; 1375cb5caa98Sdjl 1376cb5caa98Sdjl /* number of entries in the static tables */ 1377cb5caa98Sdjl 1378cb5caa98Sdjl int _nscd_cfg_num_nsw_src = 1379cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_src) / 1380cb5caa98Sdjl sizeof (_nscd_cfg_nsw_src[0]) - 1); 1381cb5caa98Sdjl 1382cb5caa98Sdjl int _nscd_cfg_num_smf_services = 1383cb5caa98Sdjl (sizeof (_nscd_cfg_smf_services) / 1384cb5caa98Sdjl sizeof (_nscd_cfg_smf_services[0]) - 1); 1385cb5caa98Sdjl 1386cb5caa98Sdjl /* number of supported nsw databases (including pseudo ones) */ 1387cb5caa98Sdjl int _nscd_cfg_num_nsw_db_all = 1388cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_db) / 1389cb5caa98Sdjl sizeof (_nscd_cfg_nsw_db[0]) - 1); 1390cb5caa98Sdjl 1391cb5caa98Sdjl /* number of supported nsw databases (not including pseudo ones) */ 1392cb5caa98Sdjl int _nscd_cfg_num_nsw_db = 1393cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_db) / 1394cb5caa98Sdjl sizeof (_nscd_cfg_nsw_db[0]) - 1) - 1395cb5caa98Sdjl NSS_DBNAM_COMPAT_NUM_DB; 1396cb5caa98Sdjl 1397cb5caa98Sdjl static int _nscd_cfg_num_param = 1398cb5caa98Sdjl (sizeof (_nscd_cfg_param_desc) / 1399cb5caa98Sdjl sizeof (_nscd_cfg_param_desc[0]) - 1); 1400cb5caa98Sdjl 1401cb5caa98Sdjl static int _nscd_cfg_num_stat = 1402cb5caa98Sdjl (sizeof (_nscd_cfg_stat_desc) / 1403cb5caa98Sdjl sizeof (_nscd_cfg_stat_desc[0]) - 1); 1404cb5caa98Sdjl 1405cb5caa98Sdjl int _nscd_cfg_num_nsw_default = 1406cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_spc_default) / 1407cb5caa98Sdjl sizeof (_nscd_cfg_nsw_spc_default[0]) - 1); 1408cb5caa98Sdjl 1409cb5caa98Sdjl int _nscd_cfg_num_link_default = 1410cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_link_default) / 1411cb5caa98Sdjl sizeof (_nscd_cfg_nsw_link_default[0]) - 1); 1412cb5caa98Sdjl 1413cb5caa98Sdjl #ifdef __cplusplus 1414cb5caa98Sdjl } 1415cb5caa98Sdjl #endif 1416cb5caa98Sdjl 1417cb5caa98Sdjl #endif /* _NSCD_CFGDEF_H */ 1418