rustdesk / rustdesk/rustdesk-server
Increasing the security of the two systemd units
Nobody has claimed this yet.
- 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
-
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.
-
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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