Commit Graph

17 Commits

Author SHA1 Message Date
mirefly42
df48ac2ada Fix default config permissions (#1253)
Currently, all init scripts, except for systemd, will generate a config
file with default permissions, which is usually `rw-r--r--`.
This is bad, because the config contains a private key.

The systemd service does `chmod 640` after creating the config, which is
much better than just leaving it readable for everyone forever, but
there is still a slight chance that some malicious program might steal
the private key during the time window between key creation and chmod.

For this reason, in this pull request I use `umask 037`, so the config
won't have read permission for others in the first place.

Note that I have only tested openrc and systemd services.

Also, I'm not sure what to do with the contrib/msi/build-msi.sh script,
which creates a bat file that generates a config. I don't know anything
about file permissions on windows, however, it seems that the bat file
generates the config into a user's personal directory, so maybe it's
already somewhat fine.
2026-01-18 14:58:00 +00:00
Revertron
962adc2994 Update yggdrasil.service.debian (#1290)
Can't start service without reading config.
Without explicit allow directive it can't read it.
2026-01-18 11:50:51 +00:00
Neil
0b578a637a Debian package updates (#1073)
* Update Debian package

* Don't put `AdminListen` in config by default, fix path in Debian package

* Fix path in unit file

* Preserve original service files for other packages

---------

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2023-10-28 14:58:52 +01:00
Neil Alexander
a4bdf3de32 Remove CAP_NET_RAW from systemd service unit, as it's not clear why it is there in the first place 2022-01-15 22:17:49 +00:00
Neil Alexander
4f3117d81d Use network-online.target instead of network.target for systemd service unit 2021-11-03 17:40:06 +00:00
cofob
6a0ddc20ef Allow yggdrasil bind to ports <1024 2021-07-21 17:57:59 +07:00
Neil Alexander
4b16c325a3 Merge pull request #607 from Arano-kai/feature/systemd_modular_unit
Systemd: move config generation to a separate unit
2019-12-10 12:02:46 +00:00
Arceliar
38c54efd73 Update yggdrasil.service 2019-11-24 22:54:30 -06:00
Arano-kai
7068160b20 Systemd: move config generation to a separate unit
- Modular unit composition: different tasks in separate units
- Use systemd tool set to run checks
- Avoid using inline shell in unit
2019-11-14 16:52:04 +02:00
Arano-kai
74d824302b FIX: Systemd: typo in directive 2019-10-29 16:36:03 +02:00
Neil Alexander
b0bcf29d27 Allow ExecStartPre to fail for containers (#573) 2019-10-23 11:15:57 +01:00
Arano-kai
045a24d74e Systemd: tun module and capabilities
- Enable (and limit to) capabilities that require to setup tun/tap interface.
- Ensure that tun module is active.
2019-10-02 00:36:33 +03:00
Neil Alexander
d6ee20580d Set TimeoutStopSec for systemd service 2019-09-27 09:37:34 +01:00
Neil Alexander
24cf4b9d2b Add ExecReload for SIGHUP 2019-02-18 22:31:34 +00:00
Neil Alexander
9f7609817e Remove yggdrasil-resume.service from systemd contrib and Debian package 2019-02-10 12:22:39 +00:00
Neil Alexander
e1c7983752 Update debian package to fix systemd disabling (not good for remote systems) and add group yggdrasil for admin socket/conf 2018-12-14 14:25:26 +00:00
Neil Alexander
cdf00ddceb Add systemd service files 2018-01-28 11:59:22 +00:00