mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
3ed37b3ed56c7f3c6cb801698c48e1546fd54628
$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>
…
…
…
…
…
…
…
The GURU Project Repository
The official repository for new Gentoo packages, maintained collaboratively by Gentoo users.
This README contains some additional useful information for GURU contributors, such as common mistakes, frequently asked questions and other tips and tricks.
The GURU rules, and the Gentoo developer manual take precedence over any information here.
See wiki.gentoo.org/wiki/Project:GURU for more information on the project.
Useful Links
- https://wiki.gentoo.org/wiki/Project:GURU
- https://wiki.gentoo.org/wiki/Project:GURU/Information_for_Contributors
- https://wiki.gentoo.org/wiki/Project:GURU/Information_for_Trusted_Contributors
- https://wiki.gentoo.org/wiki/Basic_guide_to_write_Gentoo_Ebuilds
- https://devmanual.gentoo.org/quickstart
- https://devmanual.gentoo.org/ebuild-writing
- https://devmanual.gentoo.org/ebuild-writing/variables
- https://devmanual.gentoo.org/function-reference
- https://devmanual.gentoo.org/function-reference/install-functions
- https://dev.gentoo.org/~mgorny/python-guide/eclass.html
- GURU outdated packages
- GURU Bugs
Description
GURU: Ebuild repository entirely maintained by Gentoo users
256 MiB
0 Stars
1 Watchers
0 Forks
Languages
Shell
98.5%
Roff
1.3%