A possible solution to the "security issue" mentioned in the README:
Since unix domain sockets are protected via unix file permissions, there's no further security measures needed.
The server should create and listen on a socket file, that belongs to the user running the window manager and should be created with restrictive file permissions (i.e. set umask accordingly).
The client should connect to that socket.
To make the code portable to machines with non-local filesystems, there should be a list of paths that is tried for socket creation/connect:
- some subdirectory of $HOME, might fail for some remote filesystems
- /tmp/$USER/, must be created first and checked for permissions
Also socket creation might be vulnerable to a race condition, which must be prevented in the server code.
Rough draft, I might try my hand at this when/if I find the time. First step is to figure out how to use unix-domain-sockets in racket.
Drawback of this approach is of course that client connections won't work across the network any more, but a proper authentication scheme would be needed for this, which imho is overkill for a window manager client.
I dimly remember sawfish uses unix-domain sockets, too, but it's been a long time since I used it.
A possible solution to the "security issue" mentioned in the README:
Since unix domain sockets are protected via unix file permissions, there's no further security measures needed.
The server should create and listen on a socket file, that belongs to the user running the window manager and should be created with restrictive file permissions (i.e. set umask accordingly).
The client should connect to that socket.
To make the code portable to machines with non-local filesystems, there should be a list of paths that is tried for socket creation/connect:
Also socket creation might be vulnerable to a race condition, which must be prevented in the server code.
Rough draft, I might try my hand at this when/if I find the time. First step is to figure out how to use unix-domain-sockets in racket.
Drawback of this approach is of course that client connections won't work across the network any more, but a proper authentication scheme would be needed for this, which imho is overkill for a window manager client.
I dimly remember sawfish uses unix-domain sockets, too, but it's been a long time since I used it.