3 ms·
It depends on whether sudo was compiled with --disable-env-reset or not, it's on by default[1]. Also some variables are inherited regardless (e.g. DISPLAY, TER
by mid-kid 2y ago
It depends on whether sudo was compiled with --disable-env-reset or not, it's on by default[1].
Also some variables are inherited regardless (e.g. DISPLAY, TERM), and some useful ones (e.g. HOME) are initialized by sudo, but I can't tell where that's done.
[1]: https://github.com/sudo-project/sudo/blob/ef52db46f9b375d7ffd2e8893f1ef65f5b0fc014/configure.ac#L1279 https://github.com/sudo-project/sudo/blob/ef52db46f9b375d7ff...