From: Mark Andrews Date: Thu, 30 May 2013 01:09:29 +0000 (+1000) Subject: 3578. [bug] 'rndc -c file' now fails if 'file' does not exist. X-Git-Tag: v9.10.0a1~325 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=17a00ff54c51f6bdfddd7d9ceaef6f2dcf387cc1;p=thirdparty%2Fbind9.git 3578. [bug] 'rndc -c file' now fails if 'file' does not exist. [RT #33571] --- diff --git a/CHANGES b/CHANGES index 24a9afb1400..06c4313405c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3578. [bug] 'rndc -c file' now fails if 'file' does not exist. + [RT #33571] + 3577. [bug] Handle zero TTL values better. [RT #33411] 3576. [bug] Address a shutdown race when validating. [RT #33573] diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 8dde10278be..0f69f5fcea0 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -499,6 +499,9 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname, conffile = admin_keyfile; conftype = &cfg_type_rndckey; + if (c_flag) + fatal("%s does not exist", admin_conffile); + if (! isc_file_exists(conffile)) fatal("neither %s nor %s was found", admin_conffile, admin_keyfile);