[projects/git-slug: 125/170] Set HOME directory in slug_watch
glen
glen at pld-linux.org
Mon Sep 21 21:49:19 CEST 2015
commit 6d986688071e983cfceea18167aa48e85d2b0239
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Thu Jun 28 02:41:12 2012 +0100
Set HOME directory in slug_watch
git uses $HOME to locate user's .gitconfig file. So it is need to set to
correct value after os.setuid().
slug_watch | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/slug_watch b/slug_watch
index 7333824..26c3da6 100755
--- a/slug_watch
+++ b/slug_watch
@@ -97,6 +97,7 @@ def runwatch(user=None):
gid = pwd.getpwnam(user).pw_gid
os.setgid(gid)
os.setuid(uid)
+ os.putenv('HOME', pwd.getpwnam(user).pw_dir)
os.chdir(pwd.getpwuid(os.getuid()).pw_dir)
for directory in (WATCHDIR, REFREPO_WDIR):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5
More information about the pld-cvs-commit
mailing list