Skip to content

Commit

Permalink
clients should not use the session dir for sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 3, 2023
1 parent 8e1be99 commit ae52c7c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xpra/client/mixins/network_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def err(msg):
if opts.bind and (not WIN32 or WIN32_LOCAL_SOCKETS or opts.bind!="auto"):
try:
local_sockets = setup_local_sockets(opts.bind,
None, opts.client_socket_dirs,
None, opts.client_socket_dirs, None,
str(os.getpid()), True,
opts.mmap_group, opts.socket_permissions)
except (OSError, InitExit) as e:
Expand Down
5 changes: 2 additions & 3 deletions xpra/net/socket_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,14 +513,13 @@ def normalize_local_display_name(local_display_name):
return local_display_name


def setup_local_sockets(bind, socket_dir, socket_dirs, display_name, clobber,
def setup_local_sockets(bind, socket_dir, socket_dirs, session_dir, display_name, clobber,
mmap_group="auto", socket_permissions="600", username="", uid=0, gid=0):
log = get_network_logger()
log("setup_local_sockets%s", (bind, socket_dir, socket_dirs, display_name, clobber,
log("setup_local_sockets%s", (bind, socket_dir, socket_dirs, session_dir, display_name, clobber,
mmap_group, socket_permissions, username, uid, gid))
if not bind:
return {}
session_dir = os.environ.get("XPRA_SESSION_DIR")
if not socket_dir and (not socket_dirs or (len(socket_dirs)==1 and not socket_dirs[0])):
if WIN32:
socket_dirs = [""]
Expand Down
2 changes: 1 addition & 1 deletion xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ def handshake_complete(*_args):
if "auto" in opts.bind:
opts.bind.remove("auto")
local_sockets = setup_local_sockets(opts.bind,
opts.socket_dir, opts.socket_dirs,
opts.socket_dir, opts.socket_dirs, None,
None, False,
opts.mmap_group, opts.socket_permissions,
get_username(), getuid, getgid)
Expand Down
2 changes: 1 addition & 1 deletion xpra/scripts/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ def init_local_sockets():
#setup unix domain socket:
netlog = get_network_logger()
local_sockets = setup_local_sockets(opts.bind,
opts.socket_dir, opts.socket_dirs,
opts.socket_dir, opts.socket_dirs, session_dir,
display_name, clobber,
opts.mmap_group, opts.socket_permissions,
username, uid, gid)
Expand Down

0 comments on commit ae52c7c

Please sign in to comment.