4 ms·
>Systemd makes it easy to add additional limitations to every service you're running So does chroot. And so does jails. And posix capabilities. And cgroups...
by qwertyuiop924 10y ago
>Systemd makes it easy to add additional limitations to every service you're running
So does chroot. And so does jails. And posix capabilities. And cgroups...
- darfs 10y agoI think he is being downvoted because he is factual wrong. Could someone please elaborate with details?
- DyslexicAtheist 10y agoone of the arguments against systemd is that it consolidates several scriptable and bug-prone isolated scripts into a binary. This is introducing it's own risks that require upstream interaction to fix a small issue normally a sysadmin without knowledge of C can hot-fix locally. Considering the non existence of a systemd developer community, it's pretty risky. There are similar arguments (pro/against) docker where 2 camps, one saying it's poison & bloat the other the best thing since tabbed browsing. People get so riled up because they're unwilling to acknowledge that they're just tools that make lot sense for solving specific issues. Everyone keeps looking for silver bullets. Problems start when one camp tries to become the de-facto standard (not just the tool but also the processes that come with it). Also people are way to scared of code-forks IMHO. The "fail quick, fail fast" mentality should apply here too. Some healthy competition and a willingness to let certain projects just wither and die should be a good thing ...
- deleted 10y ago[deleted]
- wtbob 10y ago> Considering the non existence of a systemd developer community, it's pretty risky. There's also the fact that it's written in C. Writing security-sensitive software in C in 2016 is, in general, a grievous mistake. No, other languages are not perfect; yes, other languages have their own issues; regardless, C is worse than most. Buffer overflows, memory management, lack of type safety — Just Say No™.
- qwertyuiop924 10y agoIt's an acceptable language for writing the piece of software that init is supposed to be. However, systemd is for more complicated and integrated and unsafe than that piece of software.
- zeveb 10y ago> It's an acceptable language for writing the piece of software that init is supposed to be. Is it though? Although I can't think of a lot of vulnerabilities to be concerned of in PID 1, I can think of a few (perhaps something to do with reaping zombies?). Why even allow for that possibility? I see no reason why init(1) couldn't be written in Lisp, or Python (although the speed might not be great), or Go, or Rust, or Haskell, or ML.
- bandrami 10y agoPID 1 shouldn't have anything complicated about it. A comp sci student should be able to write it in 10 minutes. This is a solved problem[1]. A run control system, which should be a completely separate project, could easily be written in a higher-level language than C. For instance, the traditional Linux RC system is written in sh, and the official GNU RC system[2] is written in scheme. Daemon run control isn't a domain where performance is crucial; transparency is much more important there, so the argument for using a higher level language to control daemons is pretty strong. [1] http://git.suckless.org/sinit/ http://git.suckless.org/sinit/ [2] https://www.gnu.org/software/shepherd/ https://www.gnu.org/software/shepherd/
- qwertyuiop924 10y agoYep. Pretty much. The setup is that you have your init, which handles startup, shutdown, reaping, and runs your RC. From there, you'll run process montoring for daemons (this is sometimes integrated into rc, sometimes spun out, resulting in runit, s6, and the rest of the daemontools family). This is sometimes mashed together into one program. Sometimes RC and init are the same, and process monitoring is spun out. But that's the pattern. Most RCs and process managers also have the ability to run as PID 1 if you want them to, and many do. But it's not necessary, and it is a security liability (although not as much of one as systemd, which does so much more than all of this, and which people are trying to expose to the internet directly).
- bkor 10y agoIt seems you skipped the bit where I said that those restrictions are often shipped by upstream and as such applied to everyone by default? It's one thing to lock down your machine(s), systemd allows to lock down loads of services for everyone. It's not perfect, it doesn't do everything. But is your suggestion really not to make use of systemd abilities because maybe something else could be used? How does this not go against the defence in depth theory? Try and use (filesystem) capabilities. Now apply that security fix: capability is gone. Further, that was just a change made to your machine(s). It seems much easier to improve the security on all fronts instead of going for some idealistic super safe solution that either takes ages or doesn't happen. Example: pretty nice to restrict that Jabber daemon written in Java from accessing too much of the filesystem.
- qwertyuiop924 10y agoWell, posix capabilities can be packaged upstream do that. So can Capsicum, for that matter. And so can chroot...
- bandrami 10y agoIf only there were a free POSIX-ish OS that did privilege separation and chroot for daemons by default. Perhaps some enterprising Canadian developer could base it on the BSD kernel.
- qwertyuiop924 10y agoWell then, there's your proof.