Architecture
Three parts with different rights: the network-facing daemon has none, a small root helper checks passwords and starts sessions, and each session runs as the account itself.
waydesk
does TLS, the RDP protocol, channel framing, rate limits per address.
never touches user files, calls PAM, keeps a password after the check.
waydesk-helper
does checks the password through PAM, starts and finds sessions, admits or refuses by memory.
never parses RDP or TLS, listens on the network.
waydesk-session@UID
does its sway, capture, encoder, input, audio, clipboard, hooks.
never anything as another user.
A session is a systemd unit of the account: it survives a disconnect, sits in user-UID.slice (limits there apply) and is killed with its control group. A second login from the same account takes the running session over. Design notes: docs/MULTIUSER-DESIGN.md.
This page is a file in the repository: corrections are welcome.