46 static const char* conf_str =
"config";
55 int cmdline_verbosity)
58 const char* rngfile = ODS_SE_RNGDIR
"/conf.rng";
68 ods_log_error(
"[%s] failed to read: no filename given", conf_str);
77 ods_log_error(
"[%s] failed to read: allocator failed", conf_str);
112 if (cmdline_verbosity > 0) {
125 ods_log_error(
"[%s] failed to read: unable to open file %s", conf_str,
139 ods_log_error(
"[%s] check failed: config does not exist", conf_str);
143 ods_log_error(
"[%s] check failed: no zonelist filename", conf_str);
147 ods_log_error(
"[%s] check failed: no socket filename", conf_str);
168 fprintf(out,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
170 fprintf(out,
"<Configuration>\n");
173 fprintf(out,
"\t<Common>\n");
175 fprintf(out,
"\t\t<Logging>\n");
176 fprintf(out,
"\t\t\t<Syslog>\n");
177 fprintf(out,
"\t\t\t\t<Facility>%s</Facility>\n",
179 fprintf(out,
"\t\t\t</Syslog>\n");
180 fprintf(out,
"\t\t</Logging>\n");
182 fprintf(out,
"\t\t<Logging>\n");
183 fprintf(out,
"\t\t\t<File>\n");
184 fprintf(out,
"\t\t\t\t<Filename>%s</Filename>\n",
186 fprintf(out,
"\t\t\t</File>\n");
187 fprintf(out,
"\t\t</Logging>\n");
190 fprintf(out,
"\t\t<ZoneListFile>%s</ZoneListFile>\n",
193 fprintf(out,
"\t\t<ZoneFetchFile>%s</ZoneFetchFile>\n",
197 fprintf(out,
"\t</Common>\n");
200 fprintf(out,
"\t<Signer>\n");
202 fprintf(out,
"\t\t<Privileges>\n");
204 fprintf(out,
"\t\t<User>%s</User>\n", config->
username);
207 fprintf(out,
"\t\t<Group>%s</Group>\n", config->
group);
210 fprintf(out,
"\t\t<Directory>%s</Directory>\n",
213 fprintf(out,
"\t\t</Privileges>\n");
215 fprintf(out,
"\t\t<WorkingDirectory>%s</WorkingDirectory>\n",
217 fprintf(out,
"\t\t<WorkerThreads>%i</WorkerThreads>\n",
219 fprintf(out,
"\t\t<SignerThreads>%i</SignerThreads>\n",
222 fprintf(out,
"\t\t<NotifyCommand>%s</NotifyCommand>\n",
225 fprintf(out,
"\t</Signer>\n");
227 fprintf(out,
"</Configuration>\n");
void engine_config_cleanup(engineconfig_type *config)
void engine_config_print(FILE *out, engineconfig_type *config)
int parse_conf_worker_threads(const char *cfgfile)
const char * cfg_filename
void * allocator_alloc(allocator_type *allocator, size_t size)
const char * zonelist_filename
int parse_conf_use_syslog(const char *cfgfile)
const char * parse_conf_zonelist_filename(allocator_type *allocator, const char *cfgfile)
enum ods_enum_status ods_status
ods_status parse_file_check(const char *cfgfile, const char *rngfile)
const char * parse_conf_log_filename(allocator_type *allocator, const char *cfgfile)
void ods_log_error(const char *format,...)
FILE * ods_fopen(const char *file, const char *dir, const char *mode)
allocator_type * allocator
const char * log_filename
const char * clisock_filename
engineconfig_type * engine_config(allocator_type *allocator, const char *cfgfile, int cmdline_verbosity)
const char * parse_conf_group(allocator_type *allocator, const char *cfgfile)
int parse_conf_signer_threads(const char *cfgfile)
const char * parse_conf_chroot(allocator_type *allocator, const char *cfgfile)
const char * zonefetch_filename
const char * notify_command
const char * parse_conf_clisock_filename(allocator_type *allocator, const char *cfgfile)
char * allocator_strdup(allocator_type *allocator, const char *string)
allocator_type * allocator
void ods_log_verbose(const char *format,...)
ods_status engine_config_check(engineconfig_type *config)
void ods_fclose(FILE *fd)
const char * parse_conf_notify_command(allocator_type *allocator, const char *cfgfile)
const char * parse_conf_working_dir(allocator_type *allocator, const char *cfgfile)
int parse_conf_verbosity(const char *cfgfile)
void allocator_deallocate(allocator_type *allocator, void *data)
const char * parse_conf_username(allocator_type *allocator, const char *cfgfile)
const char * parse_conf_pid_filename(allocator_type *allocator, const char *cfgfile)
#define ods_log_assert(x)
const char * pid_filename
const char * parse_conf_zonefetch_filename(allocator_type *allocator, const char *cfgfile)