=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/parse.yacc,v retrieving revision 1.18 retrieving revision 1.19 diff -c -r1.18 -r1.19 *** src/usr.bin/sudo/Attic/parse.yacc 2007/11/02 19:16:47 1.18 --- src/usr.bin/sudo/Attic/parse.yacc 2007/12/03 15:09:47 1.19 *************** *** 69,75 **** #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 $"; #endif /* lint */ /* --- 69,75 ---- #endif /* HAVE_LSEARCH */ #ifndef lint ! __unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.9 2007/11/21 18:15:49 millert Exp $"; #endif /* lint */ /* *************** *** 104,109 **** --- 104,112 ---- (_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(). */ *************** *** 440,446 **** | cmndspeclist ',' cmndspec ; ! cmndspec : runasspec cmndtag opcmnd { /* * Push the entry onto the stack if it is worth * saving and reset cmnd_matches for next cmnd. --- 443,449 ---- | cmndspeclist ',' cmndspec ; ! cmndspec : { SETENV_RESET; } runasspec cmndtag opcmnd { /* * Push the entry onto the stack if it is worth * saving and reset cmnd_matches for next cmnd. *************** *** 692,697 **** --- 695,703 ---- expand_match_list(); } } + /* sudo "ALL" implies the SETENV tag */ + if (setenv_ok == UNSPEC) + setenv_ok = IMPLIED; efree(safe_cmnd); safe_cmnd = NULL;