]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2168. [bug] nsupdate: in non-interactive mode treat syntax errors
authorMark Andrews <marka@isc.org>
Tue, 24 Apr 2007 07:02:31 +0000 (07:02 +0000)
committerMark Andrews <marka@isc.org>
Tue, 24 Apr 2007 07:02:31 +0000 (07:02 +0000)
                        as fatal errors. [RT #16785]

CHANGES
bin/nsupdate/nsupdate.c

diff --git a/CHANGES b/CHANGES
index 251d00791ed20fc1697c33213c99b1812fc9e596..4ca0655d7f69f05053d246ce21c318d777496e7d 100644 (file)
--- 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]
 
index c0719c2c18935ba8fddba9851e03b5ef8b9098bd..18e75946e3a8ee353579c6f87127ba51a207cd1b 100644 (file)
@@ -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);