d7e0d2
From d37c8aabc29c3989d5f961d8b742b246a5f64cdf Mon Sep 17 00:00:00 2001
d7e0d2
From: Pino Toscano <ptoscano@redhat.com>
d7e0d2
Date: Fri, 17 May 2019 13:47:20 +0200
d7e0d2
Subject: [PATCH] * src/augrun.c (nexttoken): add more escape characters
d7e0d2
d7e0d2
Synchonize the list of "pass-through" characters with the set in the
d7e0d2
'name_follow' variable in pathx.c: as pathx_escape_name() escapes them,
d7e0d2
make sure that aug_srun() accepts them as arguments.
d7e0d2
---
d7e0d2
 src/augrun.c | 10 +++++++++-
d7e0d2
 1 file changed, 9 insertions(+), 1 deletion(-)
d7e0d2
d7e0d2
diff --git a/src/augrun.c b/src/augrun.c
d7e0d2
index 07f865a9..fd710c5f 100644
d7e0d2
--- a/src/augrun.c
d7e0d2
+++ b/src/augrun.c
d7e0d2
@@ -133,8 +133,16 @@ static char *nexttoken(struct command *cmd, char **line, bool path) {
d7e0d2
         copy = true;
d7e0d2
         if (*s == '\\') {
d7e0d2
             switch (*(s+1)) {
d7e0d2
+                case ']':
d7e0d2
                 case '[':
d7e0d2
-                case ']':  /* pass both literally */
d7e0d2
+                case '|':
d7e0d2
+                case '/':
d7e0d2
+                case '=':
d7e0d2
+                case '(':
d7e0d2
+                case ')':
d7e0d2
+                case '!':
d7e0d2
+                case ',':  /* pass them literally;
d7e0d2
+                            * see 'name_follow' in pathx.c */
d7e0d2
                     nescaped = 2;
d7e0d2
                     break;
d7e0d2
                 case 't':  /* insert tab */
d7e0d2
-- 
d7e0d2
2.24.1
d7e0d2