feat: Add socket-activated systemd service for discovery
Introduce a system-wide daemon listening on /run/wsdd.socket, which is managed by systemd. When a client first connects to the socket the daemon is started. Multiple clients can connect and safely use the API simultaneously.
The service runs in discovery-only mode.
Uses multicast source-port 37020.
- Increases the security of services like gvfs which rely discovery mode by integrating with all the security confinement features
- Allows us to standardize one
--source-port - Only one daemon per system
- systemd-specific but non-intrusive
TODO: systemctl stop wsdd-discovery hangs if there are processes (gvfsd) listening on /run/wsdd.socket. We should probably close the connection.
TODO:
systemctl stop wsdd-discoveryhangs if there are processes (gvfsd) listening on/run/wsdd.socket. We should probably close the connection.
That's #219
@aleasto I split the UFW rules because I think enabling discovering other devices on the network should not open ports for the host itself to be discoverable. AFAIK, Windows actually has two services as well (fdPHost and FDResPub on Win11).
WDYT?
Yeah I think I agree.
Shouldn't you do the same for firewalld?
Shouldn't you do the same for firewalld?
Good point. Done
Would it be time to make a tagged release?