Commit 9bdda67a authored by Leigh Stoller's avatar Leigh Stoller

When flipping to user, make sure we set the HOME variable.

parent 2eedcdfc
#!/usr/local/bin/python
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# Copyright (c) 200-2007 University of Utah and the Flux Group.
# All rights reserved.
#
import sys
import getopt
import os, os.path
import pwd
import traceback
import syslog
import string
......@@ -327,7 +328,9 @@ class MyServer(SSL.ForkingSSLServer, SimpleXMLRPCDispatcher):
os.setgid(self.glist[0])
os.setgroups(self.glist)
os.setuid(self.uid)
pwddb = pwd.getpwuid(self.uid);
os.environ["HOME"] = pwddb[5];
os.environ["USER"] = self.user;
os.environ["LOGNAME"] = self.user;
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment