4 ms·
Regarding Python scripts: All Python scripts runnable by more than one user should really have the “-I” option on the shebang line; this, among other things, i
by teddyh 6y ago
Regarding Python scripts: All Python scripts runnable by more than one user should really have the “-I” option on the shebang line; this, among other things, ignores all PYTHON* environment variables. (Note: Python 3 only.)
- josephcsible 6y agoWhy? Isn't it safer to just have sudo always handle resetting the environment? Or do you mean if you're using a custom setuid wrapper?
- teddyh 6y agoI said nothing about sudo or setuid; I simply meant what I wrote: A Python program runnable by more than one user, where I meant user as in uid.
- josephcsible 6y agoThat makes even less sense then. Are you trying to protect users from attacking themselves? What specific threat do you think you'd mitigate by doing that?