davmac314 / dinit

Service monitoring / "init" system
Apache License 2.0
620 stars 49 forks source link

dinitcheck: warn about non-absolute executable path #384

Closed ziyao233 closed 1 month ago

ziyao233 commented 1 month ago

dinit's behavior depends on PATH environment if a service contains command with non-absolute executable path. dinitcheck may not even find correct executables in this case.

Such services may lead to security problems, systemd has been searching executables only in compilation-time specified paths. As similar features do not exist in dinit and aren't very meaningful, we just warn about dangerous usage.

References: https://www.man7.org/linux/man-pages/man5/systemd.service.5.html#COMMAND_LINES

davmac314 commented 1 month ago

By the way if you wish to add yourself to CONTRIBUTORS file, please just open another PR with that change :)