commit f5f27a8e03bf039b7d90dd605175046bcc3fe0f8
parent 30bd833bc0118a182eaa609c815a533ae16a4cee
Author: tedu <tedu>
Date: Sun, 4 Sep 2016 15:11:13 +0000
don't allow combining nopass and persist in a single rule
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/parse.y b/parse.y
@@ -111,6 +111,10 @@ options: /* none */ {
} | options option {
$$.options = $1.options | $2.options;
$$.envlist = $1.envlist;
+ if (($$.options & (NOPASS|PERSIST)) == (NOPASS|PERSIST)) {
+ yyerror("can't combine nopass and persist");
+ YYERROR;
+ }
if ($2.envlist) {
if ($$.envlist) {
yyerror("can't have two setenv sections");