From eacd6ec4e4b16da05e68f6a44981f5a7ef460ec0 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 22 Dec 2011 12:01:43 +0000 Subject: [PATCH] use binmode --- bin/tests/system/dnssec/tests.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 054e84d64f8..809a56c5a90 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.106 2011/12/08 16:07:20 each Exp $ +# $Id: tests.sh,v 1.107 2011/12/22 12:01:43 marka Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -59,7 +59,8 @@ checkprivate () { # check that a zone file is raw format, version 0 israw0 () { - cat $1 | perl -e '$input = ; + cat $1 | perl -e 'binmode STDIN; + read(STDIN, $input, 8); ($style, $version) = unpack("NN", $input); exit 1 if ($style != 2 || $version != 0);' return $? @@ -67,7 +68,8 @@ israw0 () { # check that a zone file is raw format, version 1 israw1 () { - cat $1 | perl -e '$input = ; + cat $1 | perl -e 'binmode STDIN; + read(STDIN, $input, 8); ($style, $version) = unpack("NN", $input); exit 1 if ($style != 2 || $version != 1);' return $? -- 2.47.3