[X2Go-Commits] [x2gobroker] 02/02: For user context changes: set the HOME dir of the new user correctly.
git-admin at x2go.org
git-admin at x2go.org
Wed Mar 19 12:46:06 CET 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gobroker.
commit 32e3527fc1f2b3492d50ecd0c72ccbe8868c5331
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Mar 19 12:46:01 2014 +0100
For user context changes: set the HOME dir of the new user correctly.
---
debian/changelog | 1 +
x2gobroker/utils.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index a9b3ccb..99d9efe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -102,6 +102,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
- Allow for broker clients to send in public SSH keys that the client may
use for authentication to X2Go Servers.
- broker agent: avoid one option system() calls in Perl.
+ - For user context changes: set the HOME dir of the new user correctly.
* debian/control:
+ Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
+ Fix SYNOPSIS texts.
diff --git a/x2gobroker/utils.py b/x2gobroker/utils.py
index 0d8af2c..8baaed4 100644
--- a/x2gobroker/utils.py
+++ b/x2gobroker/utils.py
@@ -188,4 +188,7 @@ def drop_privileges(uid, gid):
os.setuid(running_uid)
# Ensure a very conservative umask
- old_umask = os.umask(077)
\ No newline at end of file
+ old_umask = os.umask(077)
+
+ # set the new user's home directory as $HOME
+ os.environ['HOME'] = pwd.getpwnam(uid).pw_dir
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
More information about the x2go-commits
mailing list