use the right environmental variable as it is set by 'super'

This commit is contained in:
lars 2007-02-09 20:56:16 +00:00
parent 2ce5e0fab6
commit 617b9d81af
1 changed files with 2 additions and 2 deletions

View File

@ -399,9 +399,9 @@ def getCallingUserInfo():
@return: tuple of (name, uid, (groups))
"""
## are we called via 'super'?
if ("SUPERCMD" in os.environ) and ("USER" in os.environ):
if ("SUPERCMD" in os.environ) and ("ORIG_USER" in os.environ):
## return the user that was calling super
return getUserInfo(os.environ["USER"])
return getUserInfo(os.environ["ORIG_USER"])
else:
## return the current user
return getUserInfo(os.getuid())