#963 closed enhancement (fixed)
multiple bind options for local sockets
Reported by: | Antoine Martin | Owned by: | alas |
---|---|---|---|
Priority: | critical | Milestone: | 0.17 |
Component: | android | Version: | 0.15.x |
Keywords: | Cc: |
Description
Follow up from #888.
Add a --bind=
option, similar to the --bind-tcp
option but for unix domain sockets, and eventually named pipes for win32(#389). This would ease the transition to /run
: we can just create sockets in both locations by default.
It may also help with containers if we support both a directory form (--bind=dir:$HOME/.xpra
) and an absolute path (--bind=socket:/path/to/thesocket
.
And maybe this could help with selinux (#815) because we can then pick the socket in its more "proper" location.
Attachments (1)
Change History (11)
comment:1 Changed 6 years ago by
Owner: | changed from Antoine Martin to jonathan.underwood |
---|
comment:3 Changed 6 years ago by
Fix for "upgrade" server exit in r11722, ideally we should keep track of which server owns which sockets to make we cleanup all the ones that we should cleanup.
Changed 6 years ago by
Attachment: | cleanup-real-socket-path.patch added |
---|
attempt at figuring out the real socket path from the socket file descriptor - does not work..
comment:4 Changed 6 years ago by
Can confirm that on 0.16.2, starting server like this:
xpra start --start-child=xterm --socket-dir=/run/user/1000/xpra :100
and then simply doing a
xpra --mmap=no attach ssh:withnail.phys.ucl.ac.uk:100
worked fine. Does that cover what you wanted?
comment:5 Changed 6 years ago by
Also, I'm not quite clear quite what the --bind is intended to do - in your example (with three paths), is it creating three sockets at the three paths? You talk about 2 sockets, so I am a bit confused.
Aside: I looked for it in the man page (on 0.16.2), and didn't see any mention there.
comment:6 Changed 6 years ago by
jonathan.underwood: no, socket-dir
and bind
are related, but different things. bind
is a 0.17 feature (sorry about the confusion) which allows you to create as many unix domain sockets as you like.
I have edited comment:1 to try to clarify.
comment:7 Changed 6 years ago by
Priority: | major → critical |
---|
@jonathan.underwood: we have a problem, please see ticket:1129#comment:9
comment:8 Changed 6 years ago by
Owner: | changed from jonathan.underwood to alas |
---|
comment:9 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Uhh... not familiar enough with manually manipulating my sockets to know where to start trying to break it.
I'll go ahead and close and maybe open a new one if I can learn enough to be socket-dangerous at some point in the future.
comment:10 Changed 16 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/963
r11485 implements this for unix domain sockets. r11486 adds
$UID
and$GID
path extension (as used forsocket-dirs
already).Example:
Will create:
/tmp
and/run/user/$UID/xpra/
/home/antoine/tmp/tmp/mysocket
I could have used a more explicit differentiator between socket directories (identified by a trailing slash or if the directory exists already) and explicit filenames ("mysocket"), but I couldn't come up with anything that wasn't ugly.
Note: the sockets created will only be found by clients if they are in one of the directories specified with the
socket-dirs
option. For backwards compatibility with older clients / servers, you should keep~/.xpra/
in that list.Sockets specified using the full filename will not be found, even if they are in a socket-dir that is searched by clients, unless the actual socket filename matches the hostname. (like the automatically generated ones)
@jonathan.underwood: if all your other clients and servers are 0.17 or later, you can now safely change the default socket location to be
/var/run/user/$UID/xpra
and things should just work.