Blame SOURCES/0003-src-augrun.c-nexttoken-add-more-escape-characters.patch

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