mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
7263641953dd55d4b151891e0b6755cc6920395c
The precheck accepts a directory as new init: access(path, X_OK) only checks search permission, which directories almost always have, so the mistake is not caught until after teardown. The snprintf() building init_path also never checks for truncation, so an overlong newroot + newinit validates the wrong path. Require a regular file, with EISDIR or ENOEXEC to match what is printed, and fail with ENAMETOOLONG on a truncated init path. Signed-off-by: Paweł Sobczak <github@fixeq.qzz.io>
Finit is a fast, simple alternative to SysV init and systemd, designed for small and embedded Linux systems. It can also run on desktop and server systems, like finix.
Reverse engineered from the EeePC fastinit
"gaps filled with frog DNA …"
— Claudio Matsuoka
For detailed information, explore our extensive documentation
📚 http://finit-project.github.io
For working examples, see the 🚀 contrib/ section or these tutorials:
- 🛠️ Buildroot embedded Linux,
- 📦 Debian GNU/Linux,
- ⛰️ Alpine Linux, and
- 🌌 Void Linux
Note
Finit can run on various Linux distributions, but the bundled install scripts are examples only. They have been tested on amd64 (x86_64) systems with standard configurations.
For embedded systems, see these Buildroot-based examples: myLinux, Infix, or br2-finit-demo.
Languages
C
84.3%
Shell
11.9%
Makefile
2.1%
M4
1.7%

