fuzz: try *even harder* to prevent Python from looking up usernames
authorAugie Fackler <augie@google.com>
Sun, 14 Oct 2018 04:11:35 -0400
changeset 40280 170cd2a5a1da
parent 40279 4821affc154f
child 40281 29b0e9cd02f4
fuzz: try *even harder* to prevent Python from looking up usernames Differential Revision: https://phab.mercurial-scm.org/D5092
contrib/fuzz/manifest.cc
--- 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;