D5092: fuzz: try *even harder* to prevent Python from looking up usernames

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sun Oct 14 05:28:34 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG170cd2a5a1da: fuzz: try *even harder* to prevent Python from looking up usernames (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5092?vs=12102&id=12109

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