You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

3h 46m 9s logged

Devlog 3 - Logging and Logins

Added (or fixed) another 2 very important parts of a distro, the ability to save and read logs, and the ability to securely log into your system. The former was done using sysklogd, a syslog daemon, paired with a logger binary which forwards stdout to syslog. This proved to be quite difficult, mainly due to none of the syslog daemons I tested wanting to create or properly use the /dev/log file. In my struggles, I ended up patching some other hanging issues with module loading.

PAM took several hours of my life in the past few days, with cryptic or no errors reported and the internet being mostly useless on the vague “Authentication failed” error I was hitting. Turns out, I was missing the SUID bit on one of the executables. That took me way too long to find, so I decided to not reinvent the wheel and take the security wrapper code from NixOS (which is probably the safer option, I’m sure there are way less security risks there than there are if I did it myself).

Image: successful logging (cat /var/log/syslog) and logging in with a non-root user.
I can already see the tech debt from this codebase growing, I really need to clean it up, but that’ll be for my next devlog, along with (hopefully) some more inits supported.

0
3

Comments 0

No comments yet. Be the first!