From: tedu Date: Sun, 4 Sep 2016 15:11:13 +0000 (+0000) Subject: don't allow combining nopass and persist in a single rule X-Git-Tag: v6.6~76 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=f5f27a8e03bf039b7d90dd605175046bcc3fe0f8 don't allow combining nopass and persist in a single rule --- diff --git a/parse.y b/parse.y index 43732a6..8a33364 100644 --- 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");