Comment 24 for bug 938869

Revision history for this message
Christian Heimes (heimes) wrote :

All system command should have "-E -s" in the shebang line to isolate them from the user's env vars and local site-packages directory.

-E : ignore PYTHON* environment variables (such as PYTHONPATH)
-s : don't add user site directory to sys.path

None of Ubuntu's Python scripts in /usr/bin and /usr/sbin are using -E or -s.

$ for F in /usr/bin/* /usr/sbin/*; do head -n1 $F | grep -q python && echo $F; done