Lines Matching refs:cfg
51 #include <sys/nsctl/cfg.h>
533 update_setids(CFGFILE *cfg, int *no_id, int highest)
541 if ((ctag = cfg_get_resource(cfg)) != NULL) {
543 cfg_resource(cfg, "setid-ctag");
550 if (highest > get_new_cfg_setid(cfg)) {
553 if (cfg_put_cstring(cfg, "setid.set1.value", buf,
562 (void) sprintf(buf, "%d", get_new_cfg_setid(cfg));
564 if (cfg_put_options(cfg, CFG_SEC_CONF, key, "setid", buf) < 0)
573 cfg_resource(cfg, ctag);
577 if (cfg_commit(cfg) < 0)
586 * cfg write lock must be held across this function
589 get_lghn(CFGFILE *cfg, char *ctag, int setnum, int flag)
632 if (cfg_put_options(cfg, CFG_SEC_CONF, key, "lghn", lhostname) < 0)
636 if (cfg_commit(cfg) < 0)
672 CFGFILE *cfg;
685 if ((cfg = cfg_open("")) == NULL)
694 if (!cfg_lock(cfg, CFG_WRLOCK))
696 cfg_resource(cfg, NULL);
698 if (!cfg_lock(cfg, CFG_RDLOCK))
700 cfg_resource(cfg, ctag);
703 if ((numsets = cfg_get_num_entries(cfg, "sndr")) < 0)
718 if (cfg_get_cstring(cfg, key, buf, CFG_MAX_BUF) < 0)
725 rdc_err(NULL, gettext("cfg input error (%d)"), rc);
739 if (cfg_get_single_option(cfg, CFG_SEC_CONF, key,
742 get_lghn(cfg, ctag, setnumber, flag));
749 cfg_close(cfg);
770 if (cfg_get_single_option(cfg, CFG_SEC_CONF, key, "setid",
782 cfg_close(cfg);
794 (void) update_setids(cfg, no_id, highest);
798 cfg_close(cfg);