static int virLockDaemonConfigLoadOptions(virLockDaemonConfigPtr data, const char *filename, virConfPtr conf) { GET_CONF_INT(conf, filename, log_level); GET_CONF_STR(conf, filename, log_filters); GET_CONF_STR(conf, filename, log_outputs); GET_CONF_INT(conf, filename, log_buffer_size); return 0; error: return -1; }
static int daemonConfigLoadOptions(struct daemonConfig *data, const char *filename, virConfPtr conf) { GET_CONF_INT(conf, filename, listen_tcp); GET_CONF_INT(conf, filename, listen_tls); GET_CONF_STR(conf, filename, tls_port); GET_CONF_STR(conf, filename, tcp_port); GET_CONF_STR(conf, filename, listen_addr); if (remoteConfigGetAuth(conf, "auth_unix_rw", &data->auth_unix_rw, filename) < 0) goto error; #if HAVE_POLKIT /* Change default perms to be wide-open if PolicyKit is enabled. * Admin can always override in config file */ if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) { VIR_FREE(data->unix_sock_rw_perms); if (!(data->unix_sock_rw_perms = strdup("0777"))) { virReportOOMError(); goto error; } } #endif if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0) goto error; if (remoteConfigGetAuth(conf, "auth_tcp", &data->auth_tcp, filename) < 0) goto error; if (remoteConfigGetAuth(conf, "auth_tls", &data->auth_tls, filename) < 0) goto error; GET_CONF_STR(conf, filename, unix_sock_group); GET_CONF_STR(conf, filename, unix_sock_ro_perms); GET_CONF_STR(conf, filename, unix_sock_rw_perms); GET_CONF_STR(conf, filename, unix_sock_dir); GET_CONF_INT(conf, filename, mdns_adv); GET_CONF_STR(conf, filename, mdns_name); GET_CONF_INT(conf, filename, tls_no_sanity_certificate); GET_CONF_INT(conf, filename, tls_no_verify_certificate); GET_CONF_STR(conf, filename, key_file); GET_CONF_STR(conf, filename, cert_file); GET_CONF_STR(conf, filename, ca_file); GET_CONF_STR(conf, filename, crl_file); if (remoteConfigGetStringList(conf, "tls_allowed_dn_list", &data->tls_allowed_dn_list, filename) < 0) goto error; if (remoteConfigGetStringList(conf, "sasl_allowed_username_list", &data->sasl_allowed_username_list, filename) < 0) goto error; GET_CONF_INT(conf, filename, min_workers); GET_CONF_INT(conf, filename, max_workers); GET_CONF_INT(conf, filename, max_clients); GET_CONF_INT(conf, filename, prio_workers); GET_CONF_INT(conf, filename, max_requests); GET_CONF_INT(conf, filename, max_client_requests); GET_CONF_INT(conf, filename, audit_level); GET_CONF_INT(conf, filename, audit_logging); GET_CONF_STR(conf, filename, host_uuid); GET_CONF_INT(conf, filename, log_level); GET_CONF_STR(conf, filename, log_filters); GET_CONF_STR(conf, filename, log_outputs); GET_CONF_INT(conf, filename, log_buffer_size); GET_CONF_INT(conf, filename, keepalive_interval); GET_CONF_INT(conf, filename, keepalive_count); GET_CONF_INT(conf, filename, keepalive_required); return 0; error: return -1; }