2977. [bug] 'nsupdate -l' report if the session key is missing.

[RT #21670]
This commit is contained in:
Mark Andrews
2010-12-03 00:37:33 +00:00
parent 6c9e21b4ce
commit 82f0630bae
4 changed files with 22 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.183 2010/12/02 23:22:41 marka Exp $ */
/* $Id: nsupdate.c,v 1.184 2010/12/03 00:37:33 marka Exp $ */
/*! \file */
@@ -901,9 +901,12 @@ setup_system(void) {
if (keystr != NULL)
setup_keystr();
else if (local_only)
read_sessionkey(mctx, lctx);
else if (keyfile != NULL)
else if (local_only) {
result = read_sessionkey(mctx, lctx);
if (result != ISC_R_SUCCESS)
fatal("can't read key from %s: %s\n",
keyfile, isc_result_totext(result));
} else if (keyfile != NULL)
setup_keyfile(mctx, lctx);
}