zyxhere💭 3ed37b3ed5 net-*/*: stop exporting $pidfile in OpenRC service scripts (insecure)
Say it with me: the pidfile and its parent directories should
only be writable by root unless you use supervise-daemon ;)

With `checkpath -o someuser:someuser $pidfile` in start_pre(), it can
cause DOS attacks because the now unprivelaged process can replace the
pidfile with some other pid number in it like pid 1 and cause the host
machine to crash when the daemon finally stops. Supervise-daemon can
supervise without the daemon creating a pidfile so don't export the
variable at all.

That assumes the scripts *are* using supervise-daemon, if
supervise-daemon fails to start (due to maybe some incorrect config
option *wink wink*) then OpenRC falls back to the older
start-stop-daemon and that *does* use the $pidfile. If thats the case
then the daemon will simply fail to start (yes I haven't tested if any
these packages work without $pidfile which they should since they are
specifying `supervisor=supervise-daemon`).

IMO failing to start is better than running in a potentially vulnerable
configuration.

Merges: https://codeberg.org/gentoo/guru/pulls/92
Part-off: https://codeberg.org/gentoo/guru/pulls/92
Signed-off-by: zyxhere💭 <zyx@envs.net>
2026-09-30 12:19:39 +00:00
2026-08-09 16:02:45 +02:00
2026-04-04 01:50:36 +02:00
2026-09-28 17:50:38 -03:00
2025-12-19 13:00:31 +01:00
2026-05-29 20:57:45 +02:00
2026-08-07 09:34:02 -04:00
2026-08-08 19:54:54 +05:00
2026-05-07 16:25:17 +05:00
2026-09-11 11:22:43 +02:00
2026-09-26 17:43:56 +02:00
2026-01-02 22:56:57 +01:00
2026-09-17 22:30:53 +02:00
2026-09-11 00:15:11 +02:00
2026-09-04 11:55:22 -04:00
2026-09-11 11:22:43 +02:00
2026-09-28 21:18:27 +02:00
2026-09-19 21:10:00 +02:00
2026-08-01 22:23:59 +02:00
2026-09-01 14:07:40 +05:30
2026-09-24 16:52:41 +02:00
2026-09-18 10:45:39 +02:00
2026-03-24 03:55:29 +01:00
2026-09-28 21:18:24 +02:00
2026-08-02 04:28:33 +02:00
…
2026-09-06 16:52:40 +02:00
…
S
Description
GURU: Ebuild repository entirely maintained by Gentoo users
Readme
256 MiB
0 Stars 1 Watchers 0 Forks
Languages
Shell 98.5%
Roff 1.3%