rustdesk / rustdesk/rustdesk-server

Increasing the security of the two systemd units

Open
#496 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
10.4k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
Rustdesk provides two systemd units (see https://github.com/rustdesk/rustdesk-server/tree/master/systemd). These two unit files offer much less security than would be possible.

Describe the solution you'd like

  1. The Rustdesk services should not be started with root privileges. When installing the deb packages, a suitable user and group should be created, for example "rustdesk", and the access rights of the directories "/var/lib/rustdesk-server/" and "/var/log/rustdesk-server" should be set accordingly.

  2. The changes mentioned under point 1 should be taken into account in the two systemd units (rustdesk-hbbr.service, rustdesk-hbbs.service). Furthermore, the execution environment of the services should be configured more restrictively in these files. You can see what the modified unit files might look like in the examples attached here.

Describe alternatives you've considered
Leave it as it is, but this weakens security IMHO

Additional context
Add any other context about the feature request here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with systemd/rustdesk-hbbr.service and systemd/rustdesk-hbbs.service, then inspect how the deb packages create users, groups, and the /var/lib/rustdesk-server/ and /var/log/rustdesk-server directories. Compare the unit files with the examples referenced in the issue. Done means the services use a dedicated account with appropriate directory access and a more restricted execution environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devops, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.