FreeBSD server generates new key on restart
tschettervictor opened this issue · comments
Describe the bug
When the FreeBSD RustDesk server is restarted it generates a new key, which is not preferable. Version 1.1.8_1
Describe the environment
TrueNAS Core 13 FreeBSD Jail
How to Reproduce the bug
Install Using
pkg install rustdesk-server
Then on each restart the key file contains a different key.
Expected behavior
I expect the key to persist across a reboot.
Hi,
I created and maintain the FreeBSD port.
I have recently observed this too. I have no idea why right now.
This requires investigation. I'll followup here once I have some findings to share.
One thing I can confirm right away is that the key is not regenerated at every restart. It happens "sometimes", caused by unknown factors. This makes debugging the issue more difficult.
Take time, I have never used freebsd. :(
Hi,
I identified the issue. Nothing wrong in rustdesk-server itself.
The issue is caused by the rc scripts I included in the FreeBSD port, putting DB and key files in /var/run
, which is not preserved across reboots.
Fix is using the proper directory according to hier(7) man page, /var/db
.
I'll fix this in the FreeBSD ports tree. This issue can be closed since there really is no problem in rustdesk-server itself.