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*36e852a1SRaja Andra * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23cb5caa98Sdjl * Use is subject to license terms. 24cb5caa98Sdjl */ 25cb5caa98Sdjl 26cb5caa98Sdjl #ifndef _NSCD_CFGDEF_H 27cb5caa98Sdjl #define _NSCD_CFGDEF_H 28cb5caa98Sdjl 29cb5caa98Sdjl #ifdef __cplusplus 30cb5caa98Sdjl extern "C" { 31cb5caa98Sdjl #endif 32cb5caa98Sdjl 33cb5caa98Sdjl #include <stddef.h> 34cb5caa98Sdjl #include <limits.h> 35cb5caa98Sdjl #include <nss_dbdefs.h> 36cb5caa98Sdjl #include "nscd_config.h" 37cb5caa98Sdjl #include "nscd_log.h" 38cb5caa98Sdjl #include "cache.h" 39cb5caa98Sdjl 40cb5caa98Sdjl /* 41cb5caa98Sdjl * structure used for preliminary checking of an integer 42cb5caa98Sdjl * configuration value 43cb5caa98Sdjl */ 44cb5caa98Sdjl typedef struct { 45cb5caa98Sdjl int min; 46cb5caa98Sdjl int max; 47cb5caa98Sdjl } nscd_cfg_int_check_t; 48cb5caa98Sdjl 49cb5caa98Sdjl /* 50cb5caa98Sdjl * structure used for preliminary checking of a bitmap 51cb5caa98Sdjl * configuration value 52cb5caa98Sdjl */ 53cb5caa98Sdjl typedef struct { 54cb5caa98Sdjl nscd_cfg_bitmap_t valid_bits; 55cb5caa98Sdjl } nscd_cfg_bitmap_check_t; 56cb5caa98Sdjl 57cb5caa98Sdjl /* 58cb5caa98Sdjl * structure used for preliminary checking of a string 59cb5caa98Sdjl * configuration value 60cb5caa98Sdjl */ 61cb5caa98Sdjl typedef struct { 62cb5caa98Sdjl nscd_bool_t must_not_null; 63cb5caa98Sdjl int maxlen; 64cb5caa98Sdjl } nscd_cfg_str_check_t; 65cb5caa98Sdjl 66cb5caa98Sdjl /* 67cb5caa98Sdjl * Per nsswitch database config data 68cb5caa98Sdjl */ 69cb5caa98Sdjl typedef struct { 70cb5caa98Sdjl nscd_cfg_frontend_t fe; 71cb5caa98Sdjl nscd_cfg_switch_t sw; 72cb5caa98Sdjl nscd_cfg_cache_t cache; 73cb5caa98Sdjl } nscd_cfg_nsw_db_data_t; 74cb5caa98Sdjl 75cb5caa98Sdjl /* 76cb5caa98Sdjl * Per nsswitch database statistics data 77cb5caa98Sdjl */ 78cb5caa98Sdjl typedef struct { 79cb5caa98Sdjl nscd_cfg_stat_switch_t sw; 80cb5caa98Sdjl nscd_cfg_stat_cache_t cache; 81cb5caa98Sdjl } nscd_cfg_stat_nsw_db_data_t; 82cb5caa98Sdjl 83cb5caa98Sdjl /* 84cb5caa98Sdjl * global statistics data 85cb5caa98Sdjl */ 86cb5caa98Sdjl typedef struct { 87cb5caa98Sdjl nscd_cfg_stat_global_log_t log; 88cb5caa98Sdjl nscd_cfg_stat_global_switch_t sw; 89cb5caa98Sdjl nscd_cfg_stat_cache_t cache; 90cb5caa98Sdjl } nscd_cfg_stat_global_data_t; 91cb5caa98Sdjl 92cb5caa98Sdjl /* 93cb5caa98Sdjl * global config data 94cb5caa98Sdjl */ 95cb5caa98Sdjl typedef struct { 96cb5caa98Sdjl nscd_cfg_global_log_t log; 97cb5caa98Sdjl nscd_cfg_global_frontend_t fe; 98cb5caa98Sdjl nscd_cfg_global_selfcred_t sc; 99cb5caa98Sdjl nscd_cfg_global_switch_t sw; 100cb5caa98Sdjl nscd_cfg_global_cache_t cache; 101cb5caa98Sdjl } nscd_cfg_global_data_t; 102cb5caa98Sdjl 103cb5caa98Sdjl /* 104cb5caa98Sdjl * structure for handling the switch database specific group 105cb5caa98Sdjl * or parameter default 106cb5caa98Sdjl */ 107cb5caa98Sdjl typedef struct nscd_cfg_nsw_spc_default { 108cb5caa98Sdjl char *db; 109cb5caa98Sdjl int group_off; 110cb5caa98Sdjl int param_off; 111cb5caa98Sdjl void *data; /* pointer or link to data */ 112cb5caa98Sdjl int data_len; 113cb5caa98Sdjl } nscd_cfg_nsw_spc_default_t; 114cb5caa98Sdjl 115cb5caa98Sdjl /* 116cb5caa98Sdjl * name service switch source (repository) table 117cb5caa98Sdjl */ 118cb5caa98Sdjl nscd_cfg_id_t _nscd_cfg_nsw_src[] = { 119cb5caa98Sdjl { 0, "files" }, 120cb5caa98Sdjl { 1, "ldap" }, 121cb5caa98Sdjl { 2, "nis" }, 122*36e852a1SRaja Andra { 3, "mdns" }, 123*36e852a1SRaja Andra { 4, "dns" }, 124*36e852a1SRaja Andra { 5, "compat" }, 125*36e852a1SRaja Andra { 6, "user" }, 126*36e852a1SRaja Andra { 7, "ad" }, 127cb5caa98Sdjl { -1, NULL } 128cb5caa98Sdjl }; 129cb5caa98Sdjl 130cb5caa98Sdjl /* 131cb5caa98Sdjl * name service related smf service table 132cb5caa98Sdjl * (the order of the services should match the order of the source 133*36e852a1SRaja Andra * listed above, 0: files, 1: ldap, 2: nis, 3: mdns. 1344b22b933Srs200217 * dns is not needed) 135cb5caa98Sdjl */ 136cb5caa98Sdjl nscd_cfg_id_t _nscd_cfg_smf_services[] = { 137cb5caa98Sdjl { 0, "svc:/system/name-service-cache:default"}, 138cb5caa98Sdjl { 1, "svc:/network/ldap/client:default" }, 139cb5caa98Sdjl { 2, "svc:/network/nis/client:default" }, 140*36e852a1SRaja Andra { 3, "svc:/network/dns/multicast:default" }, 141cb5caa98Sdjl { -1, NULL } 142cb5caa98Sdjl }; 143cb5caa98Sdjl 144cb5caa98Sdjl /* 145d2ba247cSmichen * default version for supported sources/backends 146d2ba247cSmichen */ 147d2ba247cSmichen void *_nscd_be_version = NULL; 148d2ba247cSmichen 149d2ba247cSmichen /* 150cb5caa98Sdjl * name service database table 151cb5caa98Sdjl */ 152cb5caa98Sdjl nscd_cfg_id_t _nscd_cfg_nsw_db[] = { 153cb5caa98Sdjl { 0, NSS_DBNAM_PASSWD }, 154cb5caa98Sdjl { 1, NSS_DBNAM_GROUP }, 155cb5caa98Sdjl { 2, NSS_DBNAM_HOSTS }, 156cb5caa98Sdjl { 3, NSS_DBNAM_IPNODES }, 157cb5caa98Sdjl { 4, NSS_DBNAM_EXECATTR }, 158cb5caa98Sdjl { 5, NSS_DBNAM_PROFATTR }, 159cb5caa98Sdjl { 6, NSS_DBNAM_USERATTR }, 160cb5caa98Sdjl { 7, NSS_DBNAM_NETWORKS }, 161cb5caa98Sdjl { 8, NSS_DBNAM_PROTOCOLS }, 162cb5caa98Sdjl { 9, NSS_DBNAM_RPC }, 163cb5caa98Sdjl { 10, NSS_DBNAM_ETHERS }, 164cb5caa98Sdjl { 11, NSS_DBNAM_NETMASKS }, 165cb5caa98Sdjl { 12, NSS_DBNAM_BOOTPARAMS }, 166cb5caa98Sdjl { 13, NSS_DBNAM_PUBLICKEY }, 167cb5caa98Sdjl { 14, NSS_DBNAM_NETGROUP }, 168cb5caa98Sdjl { 15, NSS_DBNAM_SERVICES }, 169cb5caa98Sdjl { 16, NSS_DBNAM_PRINTERS }, 170cb5caa98Sdjl { 17, NSS_DBNAM_AUTHATTR }, 171cb5caa98Sdjl { 18, NSS_DBNAM_PROJECT }, 172cb5caa98Sdjl { 19, NSS_DBNAM_SHADOW }, 173cb5caa98Sdjl { 20, NSS_DBNAM_AUDITUSER }, 174cb5caa98Sdjl { 21, NSS_DBNAM_TSOL_TP }, 175cb5caa98Sdjl { 22, NSS_DBNAM_TSOL_RH }, 176cb5caa98Sdjl /* pseudo-databases for the compat backend */ 177cb5caa98Sdjl { 23, NSS_DBNAM_PASSWD_COMPAT }, 178cb5caa98Sdjl { 24, NSS_DBNAM_GROUP_COMPAT }, 179cb5caa98Sdjl #define NSS_DBNAM_COMPAT_NUM_DB 5 180cb5caa98Sdjl /* 181cb5caa98Sdjl * pseudo-databases that use the switch policy that is 182cb5caa98Sdjl * configured for NSS_DBNAM_PASSWD_COMPAT 183cb5caa98Sdjl */ 184cb5caa98Sdjl { 25, NSS_DBNAM_PASSWD }, 185cb5caa98Sdjl { 26, NSS_DBNAM_SHADOW }, 186cb5caa98Sdjl { 27, NSS_DBNAM_AUDITUSER }, 187cb5caa98Sdjl { 28, NSS_DBNAM_USERATTR }, 188cb5caa98Sdjl /* 189cb5caa98Sdjl * pseudo-database that uses the switch policy that is 190cb5caa98Sdjl * configured for NSS_DBNAM_GROUP_COMPAT 191cb5caa98Sdjl */ 192cb5caa98Sdjl { 29, NSS_DBNAM_GROUP }, 193cb5caa98Sdjl { -1, NULL } 194cb5caa98Sdjl }; 195cb5caa98Sdjl 196cb5caa98Sdjl /* 197cb5caa98Sdjl * A special way to indicate all switch databases 198cb5caa98Sdjl */ 199cb5caa98Sdjl static nscd_cfg_id_t _nscd_cfg_nsw_alldb = { 200cb5caa98Sdjl NSCD_CFG_NSW_ALLDB_INDEX, 201cb5caa98Sdjl NSCD_CFG_NSW_ALLDB 202cb5caa98Sdjl }; 203cb5caa98Sdjl 204cb5caa98Sdjl /* 205cb5caa98Sdjl * data for preliminary checking of the log configuration 206cb5caa98Sdjl */ 207cb5caa98Sdjl static nscd_cfg_str_check_t NSCD_CFG_LOGFILE_PCHECK = 208cb5caa98Sdjl {nscd_false, PATH_MAX}; 209cb5caa98Sdjl static nscd_cfg_bitmap_check_t NSCD_CFG_LOGCOMP_PCHECK = 210cb5caa98Sdjl {NSCD_LOG_ALL}; 211cb5caa98Sdjl static nscd_cfg_bitmap_check_t NSCD_CFG_LOGLEVEL_PCHECK = 212cb5caa98Sdjl {NSCD_LOG_LEVEL_ALL}; 213cb5caa98Sdjl 214cb5caa98Sdjl /* data for preliminary checking of the switch configuration */ 215cb5caa98Sdjl static nscd_cfg_str_check_t NSCD_CFG_NSWCFGSTR_PCHECK = 216cb5caa98Sdjl {nscd_true, 128}; 217cb5caa98Sdjl 218cb5caa98Sdjl /* 219cb5caa98Sdjl * macros for defining the static param table 220cb5caa98Sdjl */ 221cb5caa98Sdjl #define NSCD_CFG_PGROUP_DESC(pn, type, pflag, gf, g_in_t, pcheck_p,\ 222cb5caa98Sdjl nfunc_name, vfunc_name) \ 223cb5caa98Sdjl { \ 224cb5caa98Sdjl {-1, pn}, type, (NSCD_CFG_PFLAG_GROUP | pflag), \ 225cb5caa98Sdjl 0, 0, 0,\ 226cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 2270dfdd7f3Smichen pcheck_p, nfunc_name, vfunc_name \ 228cb5caa98Sdjl } 229cb5caa98Sdjl 230cb5caa98Sdjl #define NSCD_CFG_PARAM_DESC(pn, type, pflag, pf, p_in_t, \ 231cb5caa98Sdjl gf, g_in_t, pcheck_p, nfunc_name, vfunc_name) \ 232cb5caa98Sdjl { \ 233cb5caa98Sdjl {-1, pn}, type, pflag, \ 234cb5caa98Sdjl NSCD_SIZEOF(p_in_t, pf), offsetof(p_in_t, pf), -1, \ 235cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 2360dfdd7f3Smichen pcheck_p, nfunc_name, vfunc_name \ 237cb5caa98Sdjl } 238cb5caa98Sdjl 239cb5caa98Sdjl #define NSCD_CFG_PGROUP_DESC_NULL \ 240cb5caa98Sdjl { \ 241cb5caa98Sdjl {-1, NULL}, -1, NSCD_CFG_PFLAG_GROUP, \ 242cb5caa98Sdjl 0, 0, 0, \ 243cb5caa98Sdjl 0, 0, 0, \ 2440dfdd7f3Smichen NULL, NULL, NULL \ 245cb5caa98Sdjl } 2460dfdd7f3Smichen 2470dfdd7f3Smichen /* nscd internal cfg_*_notify() cfg_*_verify() and cfg_*_get_stat() */ 2480dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_log_notify(); 2490dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_log_verify(); 2500dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_frontend_notify(); 2510dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_frontend_verify(); 2520dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_selfcred_notify(); 2530dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_selfcred_verify(); 2540dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_switch_notify(); 2550dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_switch_verify(); 2560dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_cache_notify(); 2570dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_cache_verify(); 2580dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_log_get_stat(); 2590dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_switch_get_stat(); 2600dfdd7f3Smichen extern nscd_rc_t _nscd_cfg_cache_get_stat(); 2610dfdd7f3Smichen 2620dfdd7f3Smichen /* 2630dfdd7f3Smichen * the following macros are used to indicate a parameter's 2640dfdd7f3Smichen * notify/verify/get_stat functions are the same as those 2650dfdd7f3Smichen * of the group 2660dfdd7f3Smichen */ 2670dfdd7f3Smichen #define NSCD_CFG_FUNC_NOTIFY_AS_GROUP ((nscd_cfg_func_notify_t)-1) 2680dfdd7f3Smichen #define NSCD_CFG_FUNC_VERIFY_AS_GROUP ((nscd_cfg_func_verify_t)-1) 2690dfdd7f3Smichen #define NSCD_CFG_FUNC_GET_STAT_AS_GROUP ((nscd_cfg_func_get_stat_t)-1) 270cb5caa98Sdjl 271cb5caa98Sdjl /* 272cb5caa98Sdjl * the static config parameter description table 273cb5caa98Sdjl */ 274cb5caa98Sdjl static nscd_cfg_param_desc_t _nscd_cfg_param_desc[] = { 275cb5caa98Sdjl 276cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 277cb5caa98Sdjl "param-group-global-log", 278cb5caa98Sdjl NSCD_CFG_DATA_NONE, 279cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 280cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 281cb5caa98Sdjl log, 282cb5caa98Sdjl nscd_cfg_global_data_t, 283cb5caa98Sdjl NULL, 2840dfdd7f3Smichen _nscd_cfg_log_notify, 2850dfdd7f3Smichen _nscd_cfg_log_verify), 286cb5caa98Sdjl 287cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 288cb5caa98Sdjl "logfile", 289cb5caa98Sdjl NSCD_CFG_DATA_STRING, 290cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL | 291cb5caa98Sdjl NSCD_CFG_PFLAG_VLEN_DATA, 292cb5caa98Sdjl logfile, 293cb5caa98Sdjl nscd_cfg_global_log_t, 294cb5caa98Sdjl log, 295cb5caa98Sdjl nscd_cfg_global_data_t, 296cb5caa98Sdjl &NSCD_CFG_LOGFILE_PCHECK, 2970dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 2980dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 299cb5caa98Sdjl 300cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 301cb5caa98Sdjl "debug-level", 302cb5caa98Sdjl NSCD_CFG_DATA_BITMAP, 303cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 304cb5caa98Sdjl debug_level, 305cb5caa98Sdjl nscd_cfg_global_log_t, 306cb5caa98Sdjl log, 307cb5caa98Sdjl nscd_cfg_global_data_t, 308cb5caa98Sdjl &NSCD_CFG_LOGLEVEL_PCHECK, 3090dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3100dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 311cb5caa98Sdjl 312cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 313cb5caa98Sdjl "debug-components", 314cb5caa98Sdjl NSCD_CFG_DATA_BITMAP, 315cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 316cb5caa98Sdjl debug_comp, 317cb5caa98Sdjl nscd_cfg_global_log_t, 318cb5caa98Sdjl log, 319cb5caa98Sdjl nscd_cfg_global_data_t, 320cb5caa98Sdjl &NSCD_CFG_LOGCOMP_PCHECK, 3210dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3220dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 323cb5caa98Sdjl 324cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 325cb5caa98Sdjl "param-group-global-frontend", 326cb5caa98Sdjl NSCD_CFG_DATA_NONE, 327cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 328cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 329cb5caa98Sdjl fe, 330cb5caa98Sdjl nscd_cfg_global_data_t, 331cb5caa98Sdjl NULL, 3320dfdd7f3Smichen _nscd_cfg_frontend_notify, 3330dfdd7f3Smichen _nscd_cfg_frontend_verify), 334cb5caa98Sdjl 335cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 336cb5caa98Sdjl "common-worker-threads", 337cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 338cb5caa98Sdjl NSCD_CFG_PFLAG_SEND_BIT_SELECTED | 339cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 340cb5caa98Sdjl common_worker_threads, 341cb5caa98Sdjl nscd_cfg_global_frontend_t, 342cb5caa98Sdjl fe, 343cb5caa98Sdjl nscd_cfg_global_data_t, 344cb5caa98Sdjl NULL, 3450dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3460dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 347cb5caa98Sdjl 348cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 349cb5caa98Sdjl "cache-hit-threads", 350cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 351cb5caa98Sdjl NSCD_CFG_PFLAG_SEND_BIT_SELECTED | 352cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 353cb5caa98Sdjl cache_hit_threads, 354cb5caa98Sdjl nscd_cfg_global_frontend_t, 355cb5caa98Sdjl fe, 356cb5caa98Sdjl nscd_cfg_global_data_t, 357cb5caa98Sdjl NULL, 3580dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3590dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 360cb5caa98Sdjl 361cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 362cb5caa98Sdjl "param-group-global-selfcred", 363cb5caa98Sdjl NSCD_CFG_DATA_NONE, 364cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 365cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 366cb5caa98Sdjl sc, 367cb5caa98Sdjl nscd_cfg_global_data_t, 368cb5caa98Sdjl NULL, 3690dfdd7f3Smichen _nscd_cfg_selfcred_notify, 3700dfdd7f3Smichen _nscd_cfg_selfcred_verify), 371cb5caa98Sdjl 372cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 373cb5caa98Sdjl "enable-selfcred", 374cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 375cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 376cb5caa98Sdjl enable_selfcred, 377cb5caa98Sdjl nscd_cfg_global_selfcred_t, 378cb5caa98Sdjl sc, 379cb5caa98Sdjl nscd_cfg_global_data_t, 380cb5caa98Sdjl NULL, 3810dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3820dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 383cb5caa98Sdjl 384cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 385cb5caa98Sdjl "per-user-nscd-ttl", 386cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 387cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 388cb5caa98Sdjl per_user_nscd_ttl, 389cb5caa98Sdjl nscd_cfg_global_selfcred_t, 390cb5caa98Sdjl sc, 391cb5caa98Sdjl nscd_cfg_global_data_t, 392cb5caa98Sdjl NULL, 3930dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 3940dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 395cb5caa98Sdjl 396cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 397cb5caa98Sdjl "param-group-global-switch", 398cb5caa98Sdjl NSCD_CFG_DATA_NONE, 399cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 400cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 401cb5caa98Sdjl sw, 402cb5caa98Sdjl nscd_cfg_global_data_t, 403cb5caa98Sdjl NULL, 4040dfdd7f3Smichen _nscd_cfg_switch_notify, 4050dfdd7f3Smichen _nscd_cfg_switch_verify), 406cb5caa98Sdjl 407cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 408cb5caa98Sdjl "global-enable-lookup", 409cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 410cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 411cb5caa98Sdjl enable_lookup_g, 412cb5caa98Sdjl nscd_cfg_global_switch_t, 413cb5caa98Sdjl sw, 414cb5caa98Sdjl nscd_cfg_global_data_t, 415cb5caa98Sdjl NULL, 4160dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4170dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 418cb5caa98Sdjl 419cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 420cb5caa98Sdjl "global-enable-loopback-checking", 421cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 422cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 423cb5caa98Sdjl enable_loopback_checking_g, 424cb5caa98Sdjl nscd_cfg_global_switch_t, 425cb5caa98Sdjl sw, 426cb5caa98Sdjl nscd_cfg_global_data_t, 427cb5caa98Sdjl NULL, 4280dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4290dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 430cb5caa98Sdjl 431cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 432cb5caa98Sdjl "global-check-smf-state-interval", 433cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 434cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 435cb5caa98Sdjl check_smf_state_interval_g, 436cb5caa98Sdjl nscd_cfg_global_switch_t, 437cb5caa98Sdjl sw, 438cb5caa98Sdjl nscd_cfg_global_data_t, 439cb5caa98Sdjl NULL, 4400dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4410dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 442cb5caa98Sdjl 443cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 444cb5caa98Sdjl "param-group-global-cache", 445cb5caa98Sdjl NSCD_CFG_DATA_NONE, 446cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 447cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SET_ALL_DB | 448cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 449cb5caa98Sdjl cache, 450cb5caa98Sdjl nscd_cfg_global_data_t, 451cb5caa98Sdjl NULL, 4520dfdd7f3Smichen _nscd_cfg_cache_notify, 4530dfdd7f3Smichen _nscd_cfg_cache_verify), 454cb5caa98Sdjl 455cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 456cb5caa98Sdjl "global-enable-cache", 457cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 458cb5caa98Sdjl NSCD_CFG_PFLAG_GLOBAL, 459cb5caa98Sdjl enable, 460cb5caa98Sdjl nscd_cfg_global_cache_t, 461cb5caa98Sdjl cache, 462cb5caa98Sdjl nscd_cfg_global_data_t, 463cb5caa98Sdjl NULL, 4640dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4650dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 466cb5caa98Sdjl 467cb5caa98Sdjl /* non-global config param from this point on */ 468cb5caa98Sdjl 469cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 470cb5caa98Sdjl "param-group-frontend", 471cb5caa98Sdjl NSCD_CFG_DATA_NONE, 472cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP, 473cb5caa98Sdjl fe, 474cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 475cb5caa98Sdjl NULL, 4760dfdd7f3Smichen _nscd_cfg_frontend_notify, 4770dfdd7f3Smichen _nscd_cfg_frontend_verify), 478cb5caa98Sdjl 479cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 480cb5caa98Sdjl "worker-thread-per-nsw-db", 481cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 482cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 483cb5caa98Sdjl worker_thread_per_nsw_db, 484cb5caa98Sdjl nscd_cfg_frontend_t, 485cb5caa98Sdjl fe, 486cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 487cb5caa98Sdjl NULL, 4880dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 4890dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 490cb5caa98Sdjl 491cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 492cb5caa98Sdjl "param-group-switch", 493cb5caa98Sdjl NSCD_CFG_DATA_NONE, 494cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP | 495cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 496cb5caa98Sdjl sw, 497cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 498cb5caa98Sdjl NULL, 4990dfdd7f3Smichen _nscd_cfg_switch_notify, 5000dfdd7f3Smichen _nscd_cfg_switch_verify), 501cb5caa98Sdjl 502cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 503cb5caa98Sdjl "nsw-config-string", 504cb5caa98Sdjl NSCD_CFG_DATA_STRING, 505cb5caa98Sdjl NSCD_CFG_PFLAG_VLEN_DATA | 506cb5caa98Sdjl NSCD_CFG_PFLAG_LINKED, 507cb5caa98Sdjl nsw_config_string, 508cb5caa98Sdjl nscd_cfg_switch_t, 509cb5caa98Sdjl sw, 510cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 511cb5caa98Sdjl &NSCD_CFG_NSWCFGSTR_PCHECK, 5120dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5130dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 514cb5caa98Sdjl 515cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 516cb5caa98Sdjl "nsw-config-database", 517cb5caa98Sdjl NSCD_CFG_DATA_STRING, 518cb5caa98Sdjl NSCD_CFG_PFLAG_VLEN_DATA | 519cb5caa98Sdjl NSCD_CFG_PFLAG_HIDDEN, 520cb5caa98Sdjl nsw_config_db, 521cb5caa98Sdjl nscd_cfg_switch_t, 522cb5caa98Sdjl sw, 523cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 524cb5caa98Sdjl &NSCD_CFG_NSWCFGSTR_PCHECK, 5250dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5260dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 527cb5caa98Sdjl 528cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 529cb5caa98Sdjl "enable-lookup", 530cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 531cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 532cb5caa98Sdjl enable_lookup, 533cb5caa98Sdjl nscd_cfg_switch_t, 534cb5caa98Sdjl sw, 535cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 536cb5caa98Sdjl NULL, 5370dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5380dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 539cb5caa98Sdjl 540cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 541cb5caa98Sdjl "enable-loopback-checking", 542cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 543cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 544cb5caa98Sdjl enable_loopback_checking, 545cb5caa98Sdjl nscd_cfg_switch_t, 546cb5caa98Sdjl sw, 547cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 548cb5caa98Sdjl NULL, 5490dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5500dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 551cb5caa98Sdjl 552cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 553cb5caa98Sdjl "max-nsw-state-per-db", 554cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 555cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 556cb5caa98Sdjl max_nsw_state_per_db, 557cb5caa98Sdjl nscd_cfg_switch_t, 558cb5caa98Sdjl sw, 559cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 560cb5caa98Sdjl NULL, 5610dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5620dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 563cb5caa98Sdjl 564cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 565cb5caa98Sdjl "max-nsw-state-per-thread", 566cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 567cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 568cb5caa98Sdjl max_nsw_state_per_thread, 569cb5caa98Sdjl nscd_cfg_switch_t, 570cb5caa98Sdjl sw, 571cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 572cb5caa98Sdjl NULL, 5730dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5740dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 575cb5caa98Sdjl 576cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 577cb5caa98Sdjl "max-getent-ctx-per-db", 578cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 579cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 580cb5caa98Sdjl max_getent_ctx_per_db, 581cb5caa98Sdjl nscd_cfg_switch_t, 582cb5caa98Sdjl sw, 583cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 584cb5caa98Sdjl NULL, 5850dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 5860dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 587cb5caa98Sdjl 588cb5caa98Sdjl NSCD_CFG_PGROUP_DESC( 589cb5caa98Sdjl "param-group-cache", 590cb5caa98Sdjl NSCD_CFG_DATA_NONE, 591cb5caa98Sdjl NSCD_CFG_PFLAG_INIT_SEND_WHOLE_GROUP, 592cb5caa98Sdjl cache, 593cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 594cb5caa98Sdjl NULL, 5950dfdd7f3Smichen _nscd_cfg_cache_notify, 5960dfdd7f3Smichen _nscd_cfg_cache_verify), 597cb5caa98Sdjl 598cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 599cb5caa98Sdjl "enable-cache", 600cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 601cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 602cb5caa98Sdjl enable, 603cb5caa98Sdjl nscd_cfg_cache_t, 604cb5caa98Sdjl cache, 605cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 606cb5caa98Sdjl NULL, 6070dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6080dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 609cb5caa98Sdjl 610cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 611cb5caa98Sdjl "enable-per-user-cache", 612cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 613cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 614cb5caa98Sdjl per_user, 615cb5caa98Sdjl nscd_cfg_cache_t, 616cb5caa98Sdjl cache, 617cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 618cb5caa98Sdjl NULL, 6190dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6200dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 621cb5caa98Sdjl 622cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 623cb5caa98Sdjl "avoid-nameservice", 624cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 625cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 626cb5caa98Sdjl avoid_ns, 627cb5caa98Sdjl nscd_cfg_cache_t, 628cb5caa98Sdjl cache, 629cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 630cb5caa98Sdjl NULL, 6310dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6320dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 633cb5caa98Sdjl 634cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 635cb5caa98Sdjl "check-files", 636cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 637cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 638cb5caa98Sdjl check_files, 639cb5caa98Sdjl nscd_cfg_cache_t, 640cb5caa98Sdjl cache, 641cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 642cb5caa98Sdjl NULL, 6430dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6440dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 645cb5caa98Sdjl 646cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 647cb5caa98Sdjl "check-file-interval", 648cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 649cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 650cb5caa98Sdjl check_interval, 651cb5caa98Sdjl nscd_cfg_cache_t, 652cb5caa98Sdjl cache, 653cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 654cb5caa98Sdjl NULL, 6550dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6560dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 657cb5caa98Sdjl 658cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 659cb5caa98Sdjl "positive-time-to-live", 660cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 661cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 662cb5caa98Sdjl pos_ttl, 663cb5caa98Sdjl nscd_cfg_cache_t, 664cb5caa98Sdjl cache, 665cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 666cb5caa98Sdjl NULL, 6670dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6680dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 669cb5caa98Sdjl 670cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 671cb5caa98Sdjl "negative-time-to-live", 672cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 673cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 674cb5caa98Sdjl neg_ttl, 675cb5caa98Sdjl nscd_cfg_cache_t, 676cb5caa98Sdjl cache, 677cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 678cb5caa98Sdjl NULL, 6790dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6800dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 681cb5caa98Sdjl 682cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 683cb5caa98Sdjl "keep-hot-count", 684cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 685cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 686cb5caa98Sdjl keephot, 687cb5caa98Sdjl nscd_cfg_cache_t, 688cb5caa98Sdjl cache, 689cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 690cb5caa98Sdjl NULL, 6910dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 6920dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 693cb5caa98Sdjl 694cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 695cb5caa98Sdjl "hint-size", 696cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 697cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 698cb5caa98Sdjl hint_size, 699cb5caa98Sdjl nscd_cfg_cache_t, 700cb5caa98Sdjl cache, 701cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 702cb5caa98Sdjl NULL, 7030dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7040dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 705cb5caa98Sdjl 706cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 707cb5caa98Sdjl "maximum-entries-allowed", 708cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 709cb5caa98Sdjl NSCD_CFG_PFLAG_NONE, 710cb5caa98Sdjl maxentries, 711cb5caa98Sdjl nscd_cfg_cache_t, 712cb5caa98Sdjl cache, 713cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 714cb5caa98Sdjl NULL, 7150dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7160dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 717cb5caa98Sdjl 718cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 719cb5caa98Sdjl "suggested-size", 720cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 721cb5caa98Sdjl NSCD_CFG_PFLAG_OBSOLETE, 722cb5caa98Sdjl suggestedsize, 723cb5caa98Sdjl nscd_cfg_cache_t, 724cb5caa98Sdjl cache, 725cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 726cb5caa98Sdjl NULL, 7270dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7280dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 729cb5caa98Sdjl 730cb5caa98Sdjl NSCD_CFG_PARAM_DESC( 731cb5caa98Sdjl "old-data-ok", 732cb5caa98Sdjl NSCD_CFG_DATA_BOOLEAN, 733cb5caa98Sdjl NSCD_CFG_PFLAG_OBSOLETE, 734cb5caa98Sdjl old_data_ok, 735cb5caa98Sdjl nscd_cfg_cache_t, 736cb5caa98Sdjl cache, 737cb5caa98Sdjl nscd_cfg_nsw_db_data_t, 738cb5caa98Sdjl NULL, 7390dfdd7f3Smichen NSCD_CFG_FUNC_NOTIFY_AS_GROUP, 7400dfdd7f3Smichen NSCD_CFG_FUNC_VERIFY_AS_GROUP), 741cb5caa98Sdjl 742cb5caa98Sdjl NSCD_CFG_PGROUP_DESC_NULL 743cb5caa98Sdjl }; 744cb5caa98Sdjl 745cb5caa98Sdjl /* 746cb5caa98Sdjl * defaults for the global configuration 747cb5caa98Sdjl */ 748cb5caa98Sdjl static nscd_cfg_global_data_t nscd_cfg_global_default = { 749cb5caa98Sdjl 750cb5caa98Sdjl /* 751cb5caa98Sdjl * nscd_cfg_global_log_t 752cb5caa98Sdjl */ 753cb5caa98Sdjl { 754cb5caa98Sdjl 755cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_LOG, 756cb5caa98Sdjl NULL, 7570dfdd7f3Smichen NSCD_LOG_LEVEL_NONE, /* debug_level */ 758cb5caa98Sdjl NSCD_LOG_CACHE, /* debug_comp */ 759cb5caa98Sdjl 760cb5caa98Sdjl }, 761cb5caa98Sdjl 762cb5caa98Sdjl /* 763cb5caa98Sdjl * nscd_cfg_global_frontend_t 764cb5caa98Sdjl */ 765cb5caa98Sdjl { 766cb5caa98Sdjl 767cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_FRONTEND, 768e37190e5Smichen 100, /* common_worker_threads */ 769e37190e5Smichen 100, /* cache_hit_threads */ 770cb5caa98Sdjl 771cb5caa98Sdjl }, 772cb5caa98Sdjl 773cb5caa98Sdjl /* 774cb5caa98Sdjl * nscd_cfg_global_selfcred_t 775cb5caa98Sdjl */ 776cb5caa98Sdjl { 777cb5caa98Sdjl 778cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_SELFCRED, 779cb5caa98Sdjl nscd_true, /* enable_selfcred */ 780cb5caa98Sdjl 120, /* per_user_nscd_ttl: 120 seconds */ 781cb5caa98Sdjl 782cb5caa98Sdjl }, 783cb5caa98Sdjl 784cb5caa98Sdjl /* 785cb5caa98Sdjl * nscd_cfg_global_switch_t 786cb5caa98Sdjl */ 787cb5caa98Sdjl { 788cb5caa98Sdjl 789cb5caa98Sdjl NSCD_CFG_GROUP_INFO_GLOBAL_SWITCH, 790cb5caa98Sdjl nscd_true, /* enable_lookup_g */ 791cb5caa98Sdjl nscd_false, /* enable_loopback_checking_g */ 792cb5caa98Sdjl 120, /* check_smf_state_interval_g */ 793cb5caa98Sdjl 794cb5caa98Sdjl }, 795cb5caa98Sdjl 796cb5caa98Sdjl /* 797cb5caa98Sdjl * nscd_cfg_global_cache_t 798cb5caa98Sdjl */ 799cb5caa98Sdjl NSCD_CFG_GLOBAL_CACHE_DEFAULTS 800cb5caa98Sdjl }; 801cb5caa98Sdjl 802cb5caa98Sdjl /* 803cb5caa98Sdjl * defaults for the per switch database configuration 804cb5caa98Sdjl */ 805cb5caa98Sdjl static nscd_cfg_nsw_db_data_t nscd_cfg_nsw_db_data_default = { 806cb5caa98Sdjl 807cb5caa98Sdjl /* 808cb5caa98Sdjl * nscd_cfg_frontend_t 809cb5caa98Sdjl */ 810cb5caa98Sdjl { 811cb5caa98Sdjl 812cb5caa98Sdjl NSCD_CFG_GROUP_INFO_FRONTEND, 813e37190e5Smichen 50, /* worker_thread_per_nsw_db */ 814cb5caa98Sdjl 815cb5caa98Sdjl }, 816cb5caa98Sdjl 817cb5caa98Sdjl /* 818cb5caa98Sdjl * nscd_cfg_switch_t 819cb5caa98Sdjl */ 820cb5caa98Sdjl { 821cb5caa98Sdjl 822cb5caa98Sdjl NSCD_CFG_GROUP_INFO_SWITCH, 823cb5caa98Sdjl "nis files", /* nsw_config_string */ 824cb5caa98Sdjl NULL, /* nsw_config_db */ 825cb5caa98Sdjl nscd_true, /* enable_lookup */ 826cb5caa98Sdjl nscd_false, /* enable_loopback_checking */ 827124771bbSmichen 288, /* max_nsw_state_per_db */ 828124771bbSmichen 32, /* max_nsw_state_per_thread */ 829124771bbSmichen 256, /* max_getent_ctx_per_db */ 830cb5caa98Sdjl 831cb5caa98Sdjl }, 832cb5caa98Sdjl 833cb5caa98Sdjl /* 834cb5caa98Sdjl * nscd_cfg_cache_t 835cb5caa98Sdjl */ 836cb5caa98Sdjl NSCD_CFG_CACHE_DEFAULTS 837cb5caa98Sdjl }; 838cb5caa98Sdjl 839cb5caa98Sdjl /* 840cb5caa98Sdjl * macros for defining the database specific defaults 841cb5caa98Sdjl */ 842cb5caa98Sdjl #define NSCD_CFG_DB_DEFAULT_PARAM(db, gf, pf, gt, defaddr, deflen) \ 843cb5caa98Sdjl { \ 844cb5caa98Sdjl db, offsetof(nscd_cfg_nsw_db_data_t, gf), \ 845cb5caa98Sdjl offsetof(gt, pf), defaddr, deflen \ 846cb5caa98Sdjl } 847cb5caa98Sdjl 848cb5caa98Sdjl #define NSCD_CFG_DB_DEFAULT_GROUP(db, gf, defaddr, deflen) \ 849cb5caa98Sdjl { \ 850cb5caa98Sdjl db, offsetof(nscd_cfg_nsw_db_data_t, gf), \ 851cb5caa98Sdjl 0, defaddr, deflen \ 852cb5caa98Sdjl } 853cb5caa98Sdjl 854cb5caa98Sdjl #define NSCD_CFG_DB_DEFAULT_NULL \ 855cb5caa98Sdjl { \ 856cb5caa98Sdjl NULL, 0, 0, NULL, 0 \ 857cb5caa98Sdjl } 858cb5caa98Sdjl 859cb5caa98Sdjl /* 860cb5caa98Sdjl * shadow, user_attr, and audit_user use the same switch policy 861cb5caa98Sdjl * as that of passwd. exec_attr use that of prof_attr. 862cb5caa98Sdjl */ 863cb5caa98Sdjl static char *nscd_cfg_shadow_cfg_db = NSS_DBNAM_PASSWD; 864cb5caa98Sdjl static char *nscd_cfg_userattr_cfg_db = NSS_DBNAM_PASSWD; 865cb5caa98Sdjl static char *nscd_cfg_auuser_cfg_db = NSS_DBNAM_PASSWD; 866cb5caa98Sdjl static char *nscd_cfg_execattr_cfg_db = NSS_DBNAM_PROFATTR; 867cb5caa98Sdjl 868cb5caa98Sdjl /* 869cb5caa98Sdjl * default switch policy for pseudo-databases passwd_compat and 870cb5caa98Sdjl * and group_compa is "nis" 871cb5caa98Sdjl */ 872cb5caa98Sdjl static char *nscd_cfg_def_passwd_compat = NSS_DEFCONF_PASSWD_COMPAT; 873cb5caa98Sdjl static char *nscd_cfg_def_group_compat = NSS_DEFCONF_GROUP_COMPAT; 874cb5caa98Sdjl 875cb5caa98Sdjl static nscd_cfg_nsw_spc_default_t nscd_cfg_passwd_cfg_link = 876cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 877cb5caa98Sdjl NSS_DBNAM_PASSWD, 878cb5caa98Sdjl sw, 879cb5caa98Sdjl nsw_config_string, 880cb5caa98Sdjl nscd_cfg_switch_t, 881cb5caa98Sdjl NULL, 882cb5caa98Sdjl NSCD_SIZEOF(nscd_cfg_switch_t, nsw_config_string)); 883cb5caa98Sdjl 884cb5caa98Sdjl static nscd_cfg_nsw_spc_default_t nscd_cfg_profattr_cfg_link = 885cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 886cb5caa98Sdjl NSS_DBNAM_PROFATTR, 887cb5caa98Sdjl sw, 888cb5caa98Sdjl nsw_config_string, 889cb5caa98Sdjl nscd_cfg_switch_t, 890cb5caa98Sdjl NULL, 891cb5caa98Sdjl NSCD_SIZEOF(nscd_cfg_switch_t, nsw_config_string)); 892cb5caa98Sdjl 893cb5caa98Sdjl 894cb5caa98Sdjl /* 895cb5caa98Sdjl * switch database specific defaults 896cb5caa98Sdjl */ 897cb5caa98Sdjl nscd_cfg_nsw_spc_default_t _nscd_cfg_nsw_spc_default[] = { 898cb5caa98Sdjl 899cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 900cb5caa98Sdjl NSS_DBNAM_SHADOW, 901cb5caa98Sdjl sw, 902cb5caa98Sdjl nsw_config_db, 903cb5caa98Sdjl nscd_cfg_switch_t, 904cb5caa98Sdjl &nscd_cfg_shadow_cfg_db, 905cb5caa98Sdjl sizeof (nscd_cfg_shadow_cfg_db)), 906cb5caa98Sdjl 907cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 908cb5caa98Sdjl NSS_DBNAM_USERATTR, 909cb5caa98Sdjl sw, 910cb5caa98Sdjl nsw_config_db, 911cb5caa98Sdjl nscd_cfg_switch_t, 912cb5caa98Sdjl &nscd_cfg_userattr_cfg_db, 913cb5caa98Sdjl sizeof (nscd_cfg_userattr_cfg_db)), 914cb5caa98Sdjl 915cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 916cb5caa98Sdjl NSS_DBNAM_AUDITUSER, 917cb5caa98Sdjl sw, 918cb5caa98Sdjl nsw_config_db, 919cb5caa98Sdjl nscd_cfg_switch_t, 920cb5caa98Sdjl &nscd_cfg_auuser_cfg_db, 921cb5caa98Sdjl sizeof (nscd_cfg_auuser_cfg_db)), 922cb5caa98Sdjl 923cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 924cb5caa98Sdjl NSS_DBNAM_EXECATTR, 925cb5caa98Sdjl sw, 926cb5caa98Sdjl nsw_config_db, 927cb5caa98Sdjl nscd_cfg_switch_t, 928cb5caa98Sdjl &nscd_cfg_execattr_cfg_db, 929cb5caa98Sdjl sizeof (nscd_cfg_execattr_cfg_db)), 930cb5caa98Sdjl 931cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 932cb5caa98Sdjl NSS_DBNAM_PASSWD_COMPAT, 933cb5caa98Sdjl sw, 934cb5caa98Sdjl nsw_config_string, 935cb5caa98Sdjl nscd_cfg_switch_t, 936cb5caa98Sdjl &nscd_cfg_def_passwd_compat, 937cb5caa98Sdjl sizeof (nscd_cfg_def_passwd_compat)), 938cb5caa98Sdjl 939cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 940cb5caa98Sdjl NSS_DBNAM_GROUP_COMPAT, 941cb5caa98Sdjl sw, 942cb5caa98Sdjl nsw_config_string, 943cb5caa98Sdjl nscd_cfg_switch_t, 944cb5caa98Sdjl &nscd_cfg_def_group_compat, 945cb5caa98Sdjl sizeof (nscd_cfg_def_group_compat)), 946cb5caa98Sdjl 947cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_NULL 948cb5caa98Sdjl }; 949cb5caa98Sdjl 950cb5caa98Sdjl /* 951cb5caa98Sdjl * switch database specific defaults that are linked to 952cb5caa98Sdjl * those of other databases 953cb5caa98Sdjl */ 954cb5caa98Sdjl nscd_cfg_nsw_spc_default_t _nscd_cfg_nsw_link_default[] = { 955cb5caa98Sdjl 956cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 957cb5caa98Sdjl NSS_DBNAM_SHADOW, 958cb5caa98Sdjl sw, 959cb5caa98Sdjl nsw_config_string, 960cb5caa98Sdjl nscd_cfg_switch_t, 961cb5caa98Sdjl &nscd_cfg_passwd_cfg_link, 962cb5caa98Sdjl 0), 963cb5caa98Sdjl 964cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 965cb5caa98Sdjl NSS_DBNAM_USERATTR, 966cb5caa98Sdjl sw, 967cb5caa98Sdjl nsw_config_string, 968cb5caa98Sdjl nscd_cfg_switch_t, 969cb5caa98Sdjl &nscd_cfg_passwd_cfg_link, 970cb5caa98Sdjl 0), 971cb5caa98Sdjl 972cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 973cb5caa98Sdjl NSS_DBNAM_AUDITUSER, 974cb5caa98Sdjl sw, 975cb5caa98Sdjl nsw_config_string, 976cb5caa98Sdjl nscd_cfg_switch_t, 977cb5caa98Sdjl &nscd_cfg_passwd_cfg_link, 978cb5caa98Sdjl 0), 979cb5caa98Sdjl 980cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_PARAM( 981cb5caa98Sdjl NSS_DBNAM_EXECATTR, 982cb5caa98Sdjl sw, 983cb5caa98Sdjl nsw_config_string, 984cb5caa98Sdjl nscd_cfg_switch_t, 985cb5caa98Sdjl &nscd_cfg_profattr_cfg_link, 986cb5caa98Sdjl 0), 987cb5caa98Sdjl 988cb5caa98Sdjl NSCD_CFG_DB_DEFAULT_NULL 989cb5caa98Sdjl }; 990cb5caa98Sdjl 991cb5caa98Sdjl /* 992cb5caa98Sdjl * macros for defining the static stats table 993cb5caa98Sdjl */ 994cb5caa98Sdjl #define NSCD_CFG_SGROUP_DESC(sn, type, sflag, gi, \ 995cb5caa98Sdjl gf, g_in_t, gsfunc_name) \ 996cb5caa98Sdjl { \ 997cb5caa98Sdjl {-1, sn}, type, NSCD_CFG_SFLAG_GROUP | sflag, gi, \ 998cb5caa98Sdjl 0, 0, 0,\ 999cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 10000dfdd7f3Smichen gsfunc_name \ 1001cb5caa98Sdjl } 1002cb5caa98Sdjl 1003cb5caa98Sdjl #define NSCD_CFG_STAT_DESC(sn, type, sflag, sf, s_in_t, \ 1004cb5caa98Sdjl gf, g_in_t, gsfunc_name) \ 1005cb5caa98Sdjl { \ 1006cb5caa98Sdjl {-1, sn}, type, sflag, NSCD_CFG_GROUP_INFO_NULL, \ 1007cb5caa98Sdjl NSCD_SIZEOF(s_in_t, sf), offsetof(s_in_t, sf), -1, \ 1008cb5caa98Sdjl NSCD_SIZEOF(g_in_t, gf), offsetof(g_in_t, gf), -1, \ 10090dfdd7f3Smichen gsfunc_name \ 1010cb5caa98Sdjl } 1011cb5caa98Sdjl 1012cb5caa98Sdjl #define NSCD_CFG_SGROUP_DESC_NULL \ 1013cb5caa98Sdjl { \ 1014cb5caa98Sdjl {-1, NULL}, -1, NSCD_CFG_SFLAG_GROUP, NULL, \ 1015cb5caa98Sdjl 0, 0, 0, \ 1016cb5caa98Sdjl 0, 0, 0, \ 10170dfdd7f3Smichen NULL \ 1018cb5caa98Sdjl } 1019cb5caa98Sdjl 1020cb5caa98Sdjl /* 1021cb5caa98Sdjl * the static statistics description table 1022cb5caa98Sdjl */ 1023cb5caa98Sdjl static nscd_cfg_stat_desc_t _nscd_cfg_stat_desc[] = { 1024cb5caa98Sdjl 1025cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1026cb5caa98Sdjl "stat-group-global-log", 1027cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1028cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1029cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_GLOBAL_LOG, 1030cb5caa98Sdjl log, 1031cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10320dfdd7f3Smichen _nscd_cfg_log_get_stat), 1033cb5caa98Sdjl 1034cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1035cb5caa98Sdjl "entries-logged", 1036cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1037cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1038cb5caa98Sdjl entries_logged, 1039cb5caa98Sdjl nscd_cfg_stat_global_log_t, 1040cb5caa98Sdjl log, 1041cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10420dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1043cb5caa98Sdjl 1044cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1045cb5caa98Sdjl "stat-group-global-switch", 1046cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1047cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1048cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_GLOBAL_SWITCH, 1049cb5caa98Sdjl sw, 1050cb5caa98Sdjl nscd_cfg_stat_global_data_t, 10510dfdd7f3Smichen _nscd_cfg_switch_get_stat), 1052cb5caa98Sdjl 1053cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1054cb5caa98Sdjl "global-lookup-request-received", 1055cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1056cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1057cb5caa98Sdjl lookup_request_received_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-queued", 1065cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1066cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1067cb5caa98Sdjl lookup_request_queued_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-in-progress", 1075cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1076cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1077cb5caa98Sdjl lookup_request_in_progress_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-succeeded", 1085cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1086cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1087cb5caa98Sdjl lookup_request_succeeded_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-lookup-request-failed", 1095cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1096cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1097cb5caa98Sdjl lookup_request_failed_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_STAT_DESC( 1104cb5caa98Sdjl "global-loopback-nsw-db-skipped", 1105cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1106cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1107cb5caa98Sdjl loopback_nsw_db_skipped_g, 1108cb5caa98Sdjl nscd_cfg_stat_global_switch_t, 1109cb5caa98Sdjl sw, 1110cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11110dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1112cb5caa98Sdjl 1113cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1114cb5caa98Sdjl "stat-group-global-cache", 1115cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1116cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1117cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_CACHE, 1118cb5caa98Sdjl cache, 1119cb5caa98Sdjl nscd_cfg_stat_global_data_t, 11200dfdd7f3Smichen _nscd_cfg_cache_get_stat), 1121cb5caa98Sdjl 1122cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1123cb5caa98Sdjl "global-cache-hits-on-positive", 1124cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1125cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1126cb5caa98Sdjl pos_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-hits-on-negative", 1134cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1135cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1136cb5caa98Sdjl neg_hits, 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-positive", 1144cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1145cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1146cb5caa98Sdjl pos_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-misses-on-negative", 1154cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1155cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1156cb5caa98Sdjl neg_misses, 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-cache-queries-queued", 1164cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1165cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1166cb5caa98Sdjl wait_count, 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-total-cache-entries", 1174cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1175cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1176cb5caa98Sdjl entries, 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-complete-cache-invalidations", 1184cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1185cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1186cb5caa98Sdjl invalidate_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-queries-dropped", 1194cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1195cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1196cb5caa98Sdjl drop_count, 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 NSCD_CFG_STAT_DESC( 1203cb5caa98Sdjl "global-cache-hit-rate", 1204cb5caa98Sdjl NSCD_CFG_DATA_PERCENT, 1205cb5caa98Sdjl NSCD_CFG_SFLAG_GLOBAL, 1206cb5caa98Sdjl hitrate, 1207cb5caa98Sdjl nscd_cfg_stat_cache_t, 1208cb5caa98Sdjl cache, 1209cb5caa98Sdjl nscd_cfg_stat_global_data_t, 12100dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1211cb5caa98Sdjl 1212cb5caa98Sdjl /* non-global stat from this point on */ 1213cb5caa98Sdjl 1214cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1215cb5caa98Sdjl "stat-group-switch", 1216cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1217cb5caa98Sdjl NSCD_CFG_SFLAG_GROUP, 1218cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_SWITCH, 1219cb5caa98Sdjl cache, 1220cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12210dfdd7f3Smichen _nscd_cfg_switch_get_stat), 1222cb5caa98Sdjl 1223cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1224cb5caa98Sdjl "lookup-request-received", 1225cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1226cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1227cb5caa98Sdjl lookup_request_received, 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-queued", 1235cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1236cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1237cb5caa98Sdjl lookup_request_queued, 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-in-progress", 1245cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1246cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1247cb5caa98Sdjl lookup_request_in_progress, 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-succeeded", 1255cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1256cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1257cb5caa98Sdjl lookup_request_succeeded, 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 "lookup-request-failed", 1265cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1266cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1267cb5caa98Sdjl lookup_request_failed, 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_STAT_DESC( 1274cb5caa98Sdjl "loopback-nsw-db-skipped", 1275cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1276cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1277cb5caa98Sdjl loopback_nsw_db_skipped, 1278cb5caa98Sdjl nscd_cfg_stat_switch_t, 1279cb5caa98Sdjl sw, 1280cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12810dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1282cb5caa98Sdjl 1283cb5caa98Sdjl NSCD_CFG_SGROUP_DESC( 1284cb5caa98Sdjl "stat-group-cache", 1285cb5caa98Sdjl NSCD_CFG_DATA_NONE, 1286cb5caa98Sdjl NSCD_CFG_SFLAG_GROUP, 1287cb5caa98Sdjl NSCD_CFG_STAT_GROUP_INFO_CACHE, 1288cb5caa98Sdjl cache, 1289cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 12900dfdd7f3Smichen _nscd_cfg_cache_get_stat), 1291cb5caa98Sdjl 1292cb5caa98Sdjl NSCD_CFG_STAT_DESC( 1293cb5caa98Sdjl "cache-hits-on-positive", 1294cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1295cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1296cb5caa98Sdjl pos_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-hits-on-negative", 1304cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1305cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1306cb5caa98Sdjl neg_hits, 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-positive", 1314cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1315cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1316cb5caa98Sdjl pos_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-misses-on-negative", 1324cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1325cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1326cb5caa98Sdjl neg_misses, 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 "cache-queries-queued", 1334cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1335cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1336cb5caa98Sdjl wait_count, 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 "total-cache-entries", 1344cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1345cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1346cb5caa98Sdjl entries, 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 "complete-cache-invalidations", 1354cb5caa98Sdjl NSCD_CFG_DATA_INTEGER, 1355cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1356cb5caa98Sdjl invalidate_count, 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-hit-rate", 1364cb5caa98Sdjl NSCD_CFG_DATA_PERCENT, 1365cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1366cb5caa98Sdjl hitrate, 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 NSCD_CFG_STAT_DESC( 1373cb5caa98Sdjl "cache-queries-dropped", 1374cb5caa98Sdjl NSCD_CFG_DATA_PERCENT, 1375cb5caa98Sdjl NSCD_CFG_SFLAG_NONE, 1376cb5caa98Sdjl drop_count, 1377cb5caa98Sdjl nscd_cfg_stat_cache_t, 1378cb5caa98Sdjl cache, 1379cb5caa98Sdjl nscd_cfg_stat_nsw_db_data_t, 13800dfdd7f3Smichen NSCD_CFG_FUNC_GET_STAT_AS_GROUP), 1381cb5caa98Sdjl 1382cb5caa98Sdjl 1383cb5caa98Sdjl NSCD_CFG_SGROUP_DESC_NULL 1384cb5caa98Sdjl }; 1385cb5caa98Sdjl 1386cb5caa98Sdjl /* number of entries in the static tables */ 1387cb5caa98Sdjl 1388cb5caa98Sdjl int _nscd_cfg_num_nsw_src = 1389cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_src) / 1390cb5caa98Sdjl sizeof (_nscd_cfg_nsw_src[0]) - 1); 1391cb5caa98Sdjl 1392cb5caa98Sdjl int _nscd_cfg_num_smf_services = 1393cb5caa98Sdjl (sizeof (_nscd_cfg_smf_services) / 1394cb5caa98Sdjl sizeof (_nscd_cfg_smf_services[0]) - 1); 1395cb5caa98Sdjl 1396cb5caa98Sdjl /* number of supported nsw databases (including pseudo ones) */ 1397cb5caa98Sdjl int _nscd_cfg_num_nsw_db_all = 1398cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_db) / 1399cb5caa98Sdjl sizeof (_nscd_cfg_nsw_db[0]) - 1); 1400cb5caa98Sdjl 1401cb5caa98Sdjl /* number of supported nsw databases (not including pseudo ones) */ 1402cb5caa98Sdjl int _nscd_cfg_num_nsw_db = 1403cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_db) / 1404cb5caa98Sdjl sizeof (_nscd_cfg_nsw_db[0]) - 1) - 1405cb5caa98Sdjl NSS_DBNAM_COMPAT_NUM_DB; 1406cb5caa98Sdjl 1407cb5caa98Sdjl static int _nscd_cfg_num_param = 1408cb5caa98Sdjl (sizeof (_nscd_cfg_param_desc) / 1409cb5caa98Sdjl sizeof (_nscd_cfg_param_desc[0]) - 1); 1410cb5caa98Sdjl 1411cb5caa98Sdjl static int _nscd_cfg_num_stat = 1412cb5caa98Sdjl (sizeof (_nscd_cfg_stat_desc) / 1413cb5caa98Sdjl sizeof (_nscd_cfg_stat_desc[0]) - 1); 1414cb5caa98Sdjl 1415cb5caa98Sdjl int _nscd_cfg_num_nsw_default = 1416cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_spc_default) / 1417cb5caa98Sdjl sizeof (_nscd_cfg_nsw_spc_default[0]) - 1); 1418cb5caa98Sdjl 1419cb5caa98Sdjl int _nscd_cfg_num_link_default = 1420cb5caa98Sdjl (sizeof (_nscd_cfg_nsw_link_default) / 1421cb5caa98Sdjl sizeof (_nscd_cfg_nsw_link_default[0]) - 1); 1422cb5caa98Sdjl 1423cb5caa98Sdjl #ifdef __cplusplus 1424cb5caa98Sdjl } 1425cb5caa98Sdjl #endif 1426cb5caa98Sdjl 1427cb5caa98Sdjl #endif /* _NSCD_CFGDEF_H */ 1428