From: Mark Andrews Date: Tue, 24 Apr 2007 07:02:31 +0000 (+0000) Subject: 2168. [bug] nsupdate: in non-interactive mode treat syntax errors X-Git-Tag: v9.5.0a4~13 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=43da7565913277c020ded34d6ee2139998b743b6;p=thirdparty%2Fbind9.git 2168. [bug] nsupdate: in non-interactive mode treat syntax errors as fatal errors. [RT #16785] --- diff --git a/CHANGES b/CHANGES index 251d00791ed..4ca0655d7f6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2168. [bug] nsupdate: in non-interactive mode treat syntax errors + as fatal errors. [RT #16785] + 2167. [bug] When re-using a automatic zone named failed to attach it to the new view. [RT #16786] diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index c0719c2c189..18e75946e3a 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.148 2007/03/01 23:46:42 tbox Exp $ */ +/* $Id: nsupdate.c,v 1.149 2007/04/24 07:02:31 marka Exp $ */ /*! \file */ @@ -1677,8 +1677,11 @@ user_interaction(void) { isc_uint16_t result = STATUS_MORE; ddebug("user_interaction()"); - while ((result == STATUS_MORE) || (result == STATUS_SYNTAX)) + while ((result == STATUS_MORE) || (result == STATUS_SYNTAX)) { result = get_next_command(); + if (!interactive && result == STATUS_SYNTAX) + fatal("syntax error"); + } if (result == STATUS_SEND) return (ISC_TRUE); return (ISC_FALSE);