From 70dd93bf8a3512b7ae98f7990e9e8b35fe0adb14 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 --- 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 7c1c13933b..09842fd472 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -352,7 +352,7 @@ save_command_line(int argc, char *argv[]) { *dst++ = ' '; while (*src != '\0' && dst < eob) { - if (isalnum(*src) || + if (isalnum(*src) || *src == ',' || *src == '-' || *src == '_' || *src == '.' || *src == '/') { diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 6706e65675..d777ea1ab5 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -795,5 +795,12 @@ grep "status: SERVFAIL" 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