#endif /* HAVE_LSEARCH */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.8 2007/11/02 19:09:01 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.9 2007/11/21 18:15:49 millert Exp $";
#endif /* lint */
/*
(_var) = NOMATCH; \
} while (0)
+#define SETENV_RESET \
+ if (setenv_ok == IMPLIED) setenv_ok = def_setenv ? TRUE : UNSPEC
+
/*
* The matching stack, initial space allocated in init_parser().
*/
| cmndspeclist ',' cmndspec
;
-cmndspec : runasspec cmndtag opcmnd {
+cmndspec : { SETENV_RESET; } runasspec cmndtag opcmnd {
/*
* Push the entry onto the stack if it is worth
* saving and reset cmnd_matches for next cmnd.
expand_match_list();
}
}
+ /* sudo "ALL" implies the SETENV tag */
+ if (setenv_ok == UNSPEC)
+ setenv_ok = IMPLIED;
efree(safe_cmnd);
safe_cmnd = NULL;