D5092: fuzz: try *even harder* to prevent Python from looking up usernames
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sun Oct 14 08:11:54 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5092
AFFECTED FILES
contrib/fuzz/manifest.cc
CHANGE DETAILS
diff --git a/contrib/fuzz/manifest.cc b/contrib/fuzz/manifest.cc
--- a/contrib/fuzz/manifest.cc
+++ b/contrib/fuzz/manifest.cc
@@ -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;
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list