41 static const char* tools_str =
"tools";
53 char* lockname = NULL;
59 ods_log_error(
"[%s] unable to read zone: no zone", tools_str);
65 ods_log_error(
"[%s] unable to read zone: no zone data", tools_str);
93 if (access(lockname, F_OK) == 0) {
95 "waiting...", tools_str, tmpname);
99 fd = fopen(lockname,
"w");
102 tools_str, lockname);
103 free((
void*)tmpname);
104 free((
void*)lockname);
113 (void) unlink(lockname);
119 free((
void*)tmpname);
120 free((
void*)lockname);
123 free((
void*)tmpname);
124 free((
void*)lockname);
131 ods_log_error(
"[%s] unable to read from input adapter for zone %s: "
132 "%s", tools_str, zone->
name?zone->
name:
"(null)",
141 free((
void*)tmpname);
180 uint32_t num_added = 0;
183 ods_log_error(
"[%s] unable to nsecify zone: no zone", tools_str);
190 tools_str, zone->
name);
197 tools_str, zone->
name);
220 ods_log_error(
"[%s] unable to nsecify zone %s: failed to add empty ",
221 "non-terminals", tools_str, zone->
name);
231 tools_str, zone->
name);
237 ods_log_error(
"[%s] unable to nsecify zone %s: unknown RRtype %u for ",
238 "denial of existence", tools_str, zone->
name,
267 char* inbound = NULL;
268 char* finalized = NULL;
275 ods_log_error(
"[%s] unable to audit zone: no zone", tools_str);
282 tools_str, zone->
name?zone->
name:
"(null)");
304 ods_log_error(
"[%s] audit zone %s failed: unable to write zone",
305 tools_str, finalized);
306 free((
void*)inbound);
307 free((
void*)finalized);
311 snprintf(str,
SYSTEM_MAXLEN,
"%s -c %s -u %s/%s -s %s/%s -z %s > /dev/null",
313 cfg_filename?cfg_filename:ODS_SE_CFGFILE,
314 working_dir?working_dir:
"",
315 inbound?inbound:
"(null)",
316 working_dir?working_dir:
"",
317 finalized?finalized:
"(null)",
327 free((
void*)finalized);
329 free((
void*)inbound);
336 ods_log_info(
"[%s] audit passed for zone %s", tools_str,
349 ods_log_error(
"[%s] unable to audit zone %s: ods-auditor not installed",
350 tools_str, zone->
name?zone->
name:
"(null)");
367 uint32_t outbound_serial = 0;
370 ods_log_error(
"[%s] unable to write zone: no zone", tools_str);
376 ods_log_error(
"[%s] unable to write zone %s: no outbound adapter",
377 tools_str, zone->
name?zone->
name:
"(null)");
388 "changed)", tools_str, zone->
name?zone->
name:
"(null)",
405 ods_log_error(
"[%s] unable to write zone %s: adapter failed (%s)",
422 ods_log_error(
"[%s] failed to notify nameserver", tools_str);
#define LOCKED_STATS_TOOLS_OUTPUT_START
#define LOCKED_STATS_TOOLS_AUDIT_STOP
void ods_log_debug(const char *format,...)
ods_status zonedata_entize(zonedata_type *zd, ldns_rdf *apex)
void stats_log(stats_type *stats, const char *name, ldns_rr_type nsec_type)
void ods_log_info(const char *format,...)
enum ods_enum_status ods_status
#define LOCKED_STATS_TOOLS_NSECIFY_STOP
void ods_log_error(const char *format,...)
lock_basic_type stats_lock
#define LOCKED_STATS_TOOLS_INPUT_START
const char * ods_status2str(ods_status status)
#define LOCKED_STATS_TOOLS_NSECIFY_START
#define LOCKED_STATS_TOOLS_INPUT_STOP
nsec3params_type * nsec3params
void zonedata_rollback(zonedata_type *zd)
adapter_type * adoutbound
ods_status zonedata_nsecify(zonedata_type *zd, ldns_rr_class klass, uint32_t ttl, uint32_t *num_added)
#define lock_basic_lock(lock)
ods_status adapter_read(struct zone_struct *zone)
ods_status adapter_write(struct zone_struct *zone)
#define LOCKED_STATS_TOOLS_LOG
char * ods_build_path(const char *file, const char *suffix, int dir, int no_slash)
time_t duration2time(duration_type *duration)
void ods_log_verbose(const char *format,...)
#define LOCKED_STATS_TOOLS_AUDIT_START
ods_status zonedata_commit(zonedata_type *zd)
void ods_log_deeebug(const char *format,...)
ods_status zonedata_nsecify3(zonedata_type *zd, ldns_rr_class klass, uint32_t ttl, nsec3params_type *nsec3params, uint32_t *num_added)
#define ods_log_assert(x)
ods_status adfile_write(struct zone_struct *zone, const char *filename)
#define lock_basic_unlock(lock)
void ods_log_warning(const char *format,...)
ods_status ods_file_copy(const char *file1, const char *file2)
void stats_clear(stats_type *stats)