summaryrefslogtreecommitdiffabout
path: root/src/nssync.h
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-23 13:29:16 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-23 13:29:16 (GMT)
commitd538f8dbe5b24a4cafe6ac297436c382def519d9 (patch) (side-by-side diff)
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') (more/less context) (ignore whitespace changes)
-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
@@ -55,6 +55,7 @@ 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;
@@ -110,5 +111,6 @@ 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.