From 79dd970a7304e628a1ebb211c1e34905fefcc99b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 9 Aug 2019 13:02:07 +1000 Subject: [PATCH] don't escape commas when saving named's command line (cherry picked from commit 70dd93bf8a3512b7ae98f7990e9e8b35fe0adb14) --- bin/named/main.c | 2 +- bin/tests/system/resolver/tests.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/named/main.c b/bin/named/main.c index 108b8d62a2..d9e023b771 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -356,7 +356,7 @@ save_command_line(int argc, char *argv[]) { * nearly always be fine. */ if (quoted || isalnum(*src & 0xff) || - *src == '-' || *src == '_' || + *src == ',' || *src == '-' || *src == '_' || *src == '.' || *src == '/') { *dst++ = *src++; quoted = false; diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 525130c9d3..3aee3d0cfc 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -779,5 +779,12 @@ grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null && ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` +n=`expr $n + 1` +echo_i "check logged command line ($n)" +ret=0 +grep "running as: .* -m record,size,mctx " ns1/named.run > /dev/null || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=`expr $status + $ret` + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1