1 From 1a9754ec64f703542a5faf9ae9c5058b50047b26 Mon Sep 17 00:00:00 2001
2 From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
3 Date: Wed, 11 Dec 2019 19:43:19 -0800
4 sudo-1.8.23-fix-double-quote-parsing-for-Defaults-values.patch
7 plugins/sudoers/regress/sudoers/test2.json.ok | 6 +++---
8 plugins/sudoers/regress/sudoers/test2.toke.ok | 6 +++---
9 plugins/sudoers/toke.c | 2 +-
10 plugins/sudoers/toke.l | 2 +-
11 4 files changed, 8 insertions(+), 8 deletions(-)
13 diff --git a/plugins/sudoers/regress/sudoers/test2.json.ok b/plugins/sudoers/regress/sudoers/test2.json.ok
14 index 8e6656e..769c3fd 100644
15 --- a/plugins/sudoers/regress/sudoers/test2.json.ok
16 +++ b/plugins/sudoers/regress/sudoers/test2.json.ok
21 - { "username": "%them" }
22 + { "usergroup": "them" }
30 - { "username": "%: non UNIX 0 c" }
31 + { "nonunixgroup": " non UNIX 0 c" }
39 - { "username": "+net" }
40 + { "netgroup": "net" }
44 diff --git a/plugins/sudoers/regress/sudoers/test2.toke.ok b/plugins/sudoers/regress/sudoers/test2.toke.ok
45 index fcd7b73..63e1648 100644
46 --- a/plugins/sudoers/regress/sudoers/test2.toke.ok
47 +++ b/plugins/sudoers/regress/sudoers/test2.toke.ok
48 @@ -29,9 +29,9 @@ DEFAULTS_HOST BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
50 DEFAULTS_USER BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
51 DEFAULTS_USER BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
52 -DEFAULTS_USER BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
53 -DEFAULTS_USER BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
54 -DEFAULTS_USER BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
55 +DEFAULTS_USER BEGINSTR STRBODY ENDSTR USERGROUP DEFVAR
56 +DEFAULTS_USER BEGINSTR STRBODY ENDSTR USERGROUP DEFVAR
57 +DEFAULTS_USER BEGINSTR STRBODY ENDSTR NETGROUP DEFVAR
60 DEFAULTS_RUNAS BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR
61 diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c
62 index d0dd5e3..784218b 100644
63 --- a/plugins/sudoers/toke.c
64 +++ b/plugins/sudoers/toke.c
65 @@ -2512,7 +2512,7 @@ YY_RULE_SETUP
66 LEXTRACE("ERROR "); /* empty string */
69 - if (prev_state == INITIAL) {
70 + if (prev_state == INITIAL || prev_state == GOTDEFS) {
71 switch (sudoerslval.string[0]) {
73 if (sudoerslval.string[1] == '\0' ||
74 diff --git a/plugins/sudoers/toke.l b/plugins/sudoers/toke.l
75 index d275a26..638d9ea 100644
76 --- a/plugins/sudoers/toke.l
77 +++ b/plugins/sudoers/toke.l
78 @@ -178,7 +178,7 @@ DEFVAR [a-z_]+
79 LEXTRACE("ERROR "); /* empty string */
82 - if (prev_state == INITIAL) {
83 + if (prev_state == INITIAL || prev_state == GOTDEFS) {
84 switch (sudoerslval.string[0]) {
86 if (sudoerslval.string[1] == '\0' ||