Commit Graph

107 Commits

Author SHA1 Message Date
Todd C. Miller
63ae9ec2ad Dump default bad env table when 'sudo -V' is run by root. 2001-11-12 18:08:30 +00:00
Todd C. Miller
65302649f5 Add support for '*' in env_keep when not resetting the environment
(ie: the normal case).
2001-11-12 04:51:57 +00:00
Todd C. Miller
ab020c056b Add env_delete variable that lets the user replace/add to the bad_env_table.
Allow '*' wildcard in env_keep entries.
2001-11-12 04:47:22 +00:00
Todd C. Miller
aeb8cefc42 glibc uses the LANGUAGE env var so clear that too; Solar Designer 2001-01-07 18:57:23 +00:00
Todd C. Miller
d956d77528 Move defaults info into its own files from which we generate
.h and .c files.  This makes adding or rearranging variables
much simpler.
2000-12-31 01:38:37 +00:00
Todd C. Miller
1875e47474 Make env_keep override badenv_table as documented
Fix traversal of badenv_table (broken in last commit)
2000-12-30 21:22:08 +00:00
Todd C. Miller
998631b73a New Defaults options:
o stay_setuid - sudo will remain setuid if system has saved uids or setreuid(2)
 o env_reset - reset the environment to a sane default
 o env_keep - preserve environment variables that would otherwise be cleared

No longer use getenv/putenv/setenv functions--do environment munging by hand.
Potentially dangerous environment variables can be cleared only if they
contain '/' pr '%' characters to protect buggy programs.
Moved environment routines into env.c (new file)
2000-12-30 03:29:47 +00:00