use the right environmental variable as it is set by 'super'
This commit is contained in:
parent
2ce5e0fab6
commit
617b9d81af
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue