Create a gist now

Instantly share code, notes, and snippets.

@mulander /parse.y.diff Secret
Created Jun 8, 2017

What would you like to do?
Index: parse.y
===================================================================
RCS file: /cvs/src/usr.bin/doas/parse.y,v
retrieving revision 1.26
diff -u -p -r1.26 parse.y
--- parse.y 2 Jan 2017 01:40:20 -0000 1.26
+++ parse.y 8 Jun 2017 16:27:42 -0000
@@ -69,7 +69,7 @@ arraylen(const char **arr)
%}
-%token TPERMIT TDENY TAS TCMD TARGS
+%token TPERMIT TDENY TAS TCMD TCONFIRM TARGS
%token TNOPASS TPERSIST TKEEPENV TSETENV
%token TSTRING
@@ -136,6 +136,10 @@ options: /* none */ {
option: TNOPASS {
$$.options = NOPASS;
$$.envlist = NULL;
+ } | TCONFIRM {
+ $$.options = CONFIRM;
+ $$.envlist = NULL;
+ }
} | TPERSIST {
$$.options = PERSIST;
$$.envlist = NULL;
@@ -209,6 +213,7 @@ static struct keyword {
{ "cmd", TCMD },
{ "args", TARGS },
{ "nopass", TNOPASS },
+ { "confirm", TCONFIRM },
{ "persist", TPERSIST },
{ "keepenv", TKEEPENV },
{ "setenv", TSETENV },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment