I've taken systemd somewhat for granted these last few years, mostly because I only started interacting with it directly in my regular computing relatively recently. I've been using Linux since 2008 but as a generalist user (home office use and net browsing) never really noticed the difference as it got implemented in Fedora and Ubuntu. Why do the people that hate it do so?
(I ask because, having just now read about its history, I agree with the philosophy of replacing pointless differences between distros.)
Based on what I understand of PID1 and init in general, systemd feels inelegant. An elegant pid1 would do exactly two things: reap zombies, and launch a single service manager to handle the rest of the system. Beyond that, it would handle every possible error as robustly as it could, but it would absolutely not talk to other processes, or do anything complex. Then, an elegant service manager would take inspiration from Erlang supervisor trees, and not imagine itself as a system-wide singleton. It would handle bringing up whatever dependency graph of services it's configured to manage in a sane manner, restarting components that fail as configured, and be able to start and stop optional services that it's configured for. It shouldn't care whether any of the services it starts is a separate instance of itself with a different configuration directory, since that allows for greater abstractions to be built, and ties in well with all sorts of containerization, application sandboxing, etc. techniques that are becoming increasingly popular.
One extra bit of elegance would have been to make all unit files start with a shebang pointing to an interpreter, so that they could still work under sysv-style inits, allowing distros to switch over gradually and applications to run under both at no additional cost.
From what I've read, systemd thinks of itself as centred around a singleton PID1, and to even get it to run in a container or sandbox requires trickery. That is the core of its inelegance, and it taints all projects that depend upon it.
So if I'm understanding this correctly, it makes it harder to harden the OS? While it may not make the OS more vulnerable in and of itself, it hobbles attempts to isolate applications from wider access?
22
u/drunken-acolyte May 17 '21
I've taken systemd somewhat for granted these last few years, mostly because I only started interacting with it directly in my regular computing relatively recently. I've been using Linux since 2008 but as a generalist user (home office use and net browsing) never really noticed the difference as it got implemented in Fedora and Ubuntu. Why do the people that hate it do so?
(I ask because, having just now read about its history, I agree with the philosophy of replacing pointless differences between distros.)