From 852b9985ff1348d89cc8bd2ca3405b08de5a98f4 Mon Sep 17 00:00:00 2001 From: Alex Tsariounov Date: Thu, 9 Jun 2011 14:59:06 -0400 Subject: [PATCH] Also set USER env var when execting new process with the --user option. --- cpuset/commands/proc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cpuset/commands/proc.py b/cpuset/commands/proc.py index 353292f..855626d 100644 --- a/cpuset/commands/proc.py +++ b/cpuset/commands/proc.py @@ -569,6 +569,7 @@ def run(tset, args, usr_par=None, grp_par=None): os.setuid(user) os.environ["LOGNAME"] = usr_par os.environ["USERNAME"] = usr_par + os.environ["USER"] = usr_par os.execvp(args[0], args) def is_unbound(proc):