Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
9bdda67a
Commit
9bdda67a
authored
Sep 21, 2007
by
Leigh B. Stoller
Browse files
When flipping to user, make sure we set the HOME variable.
parent
2eedcdfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
xmlrpc/sslxmlrpc_server.py.in
View file @
9bdda67a
#!/usr/local/bin/python
#
# EMULAB-COPYRIGHT
# Copyright (c) 200
4,
200
5
University of Utah and the Flux Group.
# Copyright (c) 200
-
200
7
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment