Report information
The Basics
Id:
45602
Status:
resolved
Priority:
Low/Low
Queue:

BugTracker
Version Fixed:
9.10.6-S1, 9.10.7, 9.11.3, 9.12.0
Version Found:
9.10.0
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
P3 Low
Severity:
S3 Low
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
BIND Infrastructure
Area:
bug

Dates
Created:Mon, 24 Jul 2017 05:04:21 -0400
Updated:Thu, 27 Jul 2017 01:01:37 -0400
Closed:Wed, 26 Jul 2017 04:46:04 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: rrchecker system test improperly handles some failures
Date: Mon, 24 Jul 2017 09:04:21 +0000
To: bind9-public@isc.org
From: michal@isc.org
Most contemporary shells execute each command of a multi-command pipeline in a subshell environment. Environment variables set inside a subshell do not affect the parent shell's environment. Meanwhile, the rrchecker system test sets the ret variable inside a while loop which is the last command in a pipeline. Thus, while error messages will be printed out when named-rrchecker encounters a problem, these problems will not affect the result of the system test. This issue seems to be have been present in the code ever since named-rrchecker was added by commit 49c1e0d18d.
Suggested fix is in the rt45602 branch, please review.
To: bind9-public@isc.org
From: "Mark Andrews" <marka@isc.org>
Date: Mon, 24 Jul 2017 19:08:46 +1000
Subject: Re: [ISC-Bugs #45602] rrchecker system test improperly handles some failures
In message <rt-4.4.1-51431-1500887063-1383.45602-3-0@isc.org>, "Michal Kepien via RT" writes: > Most contemporary shells execute each command of a multi-command > pipeline in a subshell environment. Environment variables set inside a > subshell do not affect the parent shell's environment. Meanwhile, the > rrchecker system test sets the ret variable inside a while loop which is > the last command in a pipeline. Thus, while error messages will be > printed out when named-rrchecker encounters a problem, these problems > will not affect the result of the system test. The shell is broken if { } fails to update the variable. If ( ) was being used then you would have a point. > This issue seems to be have been present in the code ever since > named-rrchecker was added by commit 49c1e0d18d. -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
Subject: Re: [ISC-Bugs #45602] rrchecker system test improperly handles some failures
Date: Mon, 24 Jul 2017 19:11:40 +1000
CC: bind9-public@isc.org
From: "Mark Andrews" <marka@isc.org>
Mark Andrews writes: > > In message <rt-4.4.1-51431-1500887063-1383.45602-3-0@isc.org>, "Michal Kepien via RT" writes: > > Most contemporary shells execute each command of a multi-command > > pipeline in a subshell environment. Environment variables set inside a > > subshell do not affect the parent shell's environment. Meanwhile, the > > rrchecker system test sets the ret variable inside a while loop which is > > the last command in a pipeline. Thus, while error messages will be > > printed out when named-rrchecker encounters a problem, these problems > > will not affect the result of the system test. > > The shell is broken if { } fails to update the variable. If ( ) > was being used then you would have a point. (list) list is executed in a subshell environment (see COMMAND EXECUTION ENVIRONMENT below). Variable assignments and builtin commands that affect the shell's environment do not remain in effect after the command completes. The return status is the exit status of list. { list; } list is simply executed in the current shell environment. list must be terminated with a newline or semicolon. This is known as a group command. The return status is the exit status of list. Note that unlike the metachar- acters ( and ), { and } are reserved words and must occur where a reserved word is permitted to be recognized. Since they do not cause a word break, they must be separated from list by whitespace. > > This issue seems to be have been present in the code ever since > > named-rrchecker was added by commit 49c1e0d18d. > -- > Mark Andrews, ISC > 1 Seymour St., Dundas Valley, NSW 2117, Australia > PHONE: +61 2 9871 4742 INTERNET: marka@isc.org -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
The curly braces are not the issue; the "| while" part is.
made some additional changes. good to go if you are happy with them
Thanks, Mark, these all look good to me.
4657. [bug] rrchecker system test result could be improperly determined. [RT #45602] 9.10.7, 9.11.3, 9.12.0