changeset 40280:170cd2a5a1da

fuzz: try *even harder* to prevent Python from looking up usernames Differential Revision: https://phab.mercurial-scm.org/D5092
author Augie Fackler <augie@google.com>
date Sun, 14 Oct 2018 04:11:35 -0400
parents 4821affc154f
children 29b0e9cd02f4
files contrib/fuzz/manifest.cc
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/fuzz/manifest.cc	Sun Oct 14 03:42:43 2018 -0400
+++ b/contrib/fuzz/manifest.cc	Sun Oct 14 04:11:35 2018 -0400
@@ -31,6 +31,8 @@
 	strncpy(cpypath, pypath.c_str(), pypath.size());
 	setenv("PYTHONPATH", cpypath, 1);
 	setenv("PYTHONNOUSERSITE", "1", 1);
+	/* prevent Python from looking up users in the fuzz environment */
+	setenv("PYTHONUSERBASE", cpypath, 1);
 	Py_SetPythonHome(cpypath);
 	Py_InitializeEx(0);
 	return 0;