=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/doas/parse.y,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/doas/parse.y 2016/06/07 14:11:16 1.17 --- src/usr.bin/doas/parse.y 2016/06/07 16:49:23 1.18 *************** *** 1,4 **** ! /* $OpenBSD: parse.y,v 1.17 2016/06/07 14:11:16 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst * --- 1,4 ---- ! /* $OpenBSD: parse.y,v 1.18 2016/06/07 16:49:23 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst * *************** *** 111,117 **** $$.envlist = $2.envlist; } } ; - option: TNOPASS { $$.options = NOPASS; } | TKEEPENV { --- 111,116 ---- *************** *** 131,155 **** errx(1, "can't allocate envlist"); $$.envlist[nenv] = $2.str; $$.envlist[nenv + 1] = NULL; - } | envlist TSTRING '=' TSTRING { - int nenv = arraylen($1.envlist); - char *cp = NULL; - - if (*$2.str == '\0' || strchr($2.str, '=') != NULL) { - yyerror("invalid setenv expression"); - YYERROR; - } - if (!($$.envlist = reallocarray($1.envlist, - nenv + 2, sizeof(char *)))) - errx(1, "can't allocate envlist"); - $$.envlist[nenv] = NULL; - if (asprintf(&cp, "%s=%s", $2.str, $4.str) <= 0 || - cp == NULL) - errx(1,"asprintf failed"); - $$.envlist[nenv] = cp; - $$.envlist[nenv + 1] = NULL; } ident: TSTRING { $$.str = $1.str; } ; --- 130,138 ---- errx(1, "can't allocate envlist"); $$.envlist[nenv] = $2.str; $$.envlist[nenv + 1] = NULL; } + ident: TSTRING { $$.str = $1.str; } ; *************** *** 236,242 **** /* FALLTHROUGH */ case '{': case '}': - case '=': return c; case '#': /* skip comments; NUL is allowed; no continuation */ --- 219,224 ---- *************** *** 289,295 **** case '#': case ' ': case '\t': - case '=': if (!escape && !quotes) goto eow; break; --- 271,276 ----