Signed-off-by: Mike Bonnet <mikeb(a)redhat.com>
---
Set the HOME environment variable to match the chroothome config
parameter. Allows commands running under --chroot --unpriv to create
dotfiles, etc.
py/mock.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/py/mock.py b/py/mock.py
index d04c859..677691b 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -410,7 +410,6 @@ def main(ret):
uidManager = mock.uid.uidManager(unprivUid, unprivGid)
uidManager._becomeUser(unprivUid, unprivGid)
- del(os.environ["HOME"])
# defaults
config_opts = {}
@@ -498,6 +497,7 @@ def main(ret):
ret["chroot"] = chroot
ret["config_opts"] = config_opts
os.umask(002)
+ os.environ["HOME"] = chroot.homedir
# New namespace starting from here
try:
--
1.6.0.6
Show replies by thread