summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-08-10 16:36:18 +0200
committerChristian Heimes <christian@cheimes.de>2013-08-10 16:36:18 +0200
commit011ede87bdf36ab2e4cbb24825eb6425d9d72184 (patch)
tree6ae0687b863e8c789319c4e5e4a355f4435d3dde /Python/pythonrun.c
parent2e74d253ec63d110af6e5a55bca22915fe374d60 (diff)
downloadcpython-011ede87bdf36ab2e4cbb24825eb6425d9d72184.tar.gz
Issue #16400: Add command line option for isolated mode.
-I Run Python in isolated mode. This also implies -E and -s. In isolated mode sys.path contains neither the script?s directory nor the user?s site-packages directory. All PYTHON* environment variables are ignored, too. Further restrictions may be imposed to prevent the user from injecting malicious code.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 86c3206829..b0bc549647 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -112,6 +112,7 @@ int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
+int Py_IsolatedFlag = 0; /* for -I, isolate from user's env */
PyThreadState *_Py_Finalizing = NULL;