Timeline for Why are environment variables being passed to sudo session and is it a concern?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 18, 2022 at 14:46 | comment | added | mesr |
Those variables listed in the sudoers documentation that you quote get a special treatment. I believe that TERM is actually preserved from the caller's environment. What is a bit surprising, and can't replicate on my end, is the preservation of other arbitrary variables as well. What result do you get if you run the following? export TEST=blah; sudo -i sh -c 'echo $TEST'
|
|
Feb 23, 2022 at 13:32 | answer | added | waltinator | timeline score: 0 | |
Feb 23, 2022 at 12:37 | history | migrated | from stackoverflow.com (revisions) | ||
Feb 22, 2022 at 2:46 | history | asked | Augustine Calvino | CC BY-SA 4.0 |