aboutsummaryrefslogtreecommitdiff
path: root/src/nssync.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-23 16:29:16 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-23 16:29:16 +0300
commitd538f8dbe5b24a4cafe6ac297436c382def519d9 (patch)
treedff477b5f27dd13ad0eced6f0d319b4ef9c17524 /src/nssync.h
parent627feaab03df9153ae04f6e792e9a55ad6817d0c (diff)
downloadnssync-d538f8dbe5b24a4cafe6ac297436c382def519d9.tar.gz
nssync-d538f8dbe5b24a4cafe6ac297436c382def519d9.tar.bz2
Improve error handling.
* src/bindcf.c (bind_working_dir): Remove static qualifier. (filetab): New static. (find_file): New static function. (bindcf_zone_name): New function. (bindcf_lookup): Rename existing zone file if zone_file_pattern has changed. (flush_zone_list): Handle file name clashes gratiously. Don't delete file if it is already used by another zone. * src/nssync.c (create_hierarchy,trycreate): New function. (copy_file): Call trycreate if open failed with ENOENT. (move_file): New function. (main): Print additional diagnostics before exiting on error. * src/nssync.h (bind_working_dir): New extern. (move_file): New proto.
Diffstat (limited to 'src/nssync.h')
-rw-r--r--src/nssync.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nssync.h b/src/nssync.h
index db710eb..7304e14 100644
--- a/src/nssync.h
+++ b/src/nssync.h
@@ -52,12 +52,13 @@ extern int sql_port;
extern char *named_conf_file;
extern struct grecs_list *bind_include_path;
extern char *zone_file_pattern;
extern char *zone_conf_file;
+extern char *bind_working_dir;
extern struct grecs_list *synclist;
extern unsigned error_count;
extern unsigned changed_zones;
@@ -107,8 +108,9 @@ void format_zones(struct nssync *);
void source_named_conf(void);
char *bindcf_lookup(struct nssync *sp, const char *zone);
void flush_zone_list(struct nssync *sp);
int compare(const char *oldfile, const char *newfile);
+int move_file(const char *file, const char *dst_file);

Return to:

Send suggestions and report system problems to the System administrator.