Another daemon for managing control groups
Another daemon for managing control groups
Posted Dec 10, 2013 21:46 UTC (Tue) by khim (subscriber, #9252)In reply to: Another daemon for managing control groups by Cyberax
Parent article: Another daemon for managing control groups
Because it will have ALL the faults of suid and lots of additional faults of a half-baked userspace implementation.
Really? Which ones?
For example, think about signals (especially RT signals and SIGSTOP/SIGKILL).
What about signals?
I can kill my SUID program using a straightforward "kill" utility
Yup. And it is a problem security-wise.
how would you do this with SuidD?
Most likely answer: you would not be able to do that. You will probably have some high-level knobs but you will not be able to just send random signals to random provileged programs. And this is “good thing”™.
I'm actually speaking from experience - we have such a daemon in our system. It's simply not possible to replicate all the kernel-level functionality.
Of course not! It'll be pointless excercise to just shuffle functionality around. It's the other way around: suid is a problem because it gives you huge amount of rope to tie itself. SuiD will give you much, much smaller amount of rope. Yes, this will also mean that some brain-dead designs will become impossible, but this will just mean that you will need to spend few more time thinking about design of your system upfront. What real-world task are you trying to solve with signals? Why do you think it can only be solved by giving the rights to affect priveleged process on your system from some random shell script?
SystemD is repeating ALL the problems of this approach.
Wow. Thanks for bringing that to my attention. Seriously, no sarcasm. This cgroups ≈ suid analogy really helps to show just why it's bad idea to give access to just some random user to the capabilities of cgroups… but it still does not explain why only one daemon can ever manipulate cgroups. Ok, It needs to be privileged daemon, but it's still not entirely clear to me just why it must be PID 1.
For example, they have to cobble something together to handle delegation to containers while simple bind-mount is enough right now to nest cgroups.
Well, it was always good idea to have daemon which does that thus I'm not sure why you are just now trying “to cobble something together”. The problematic fact is that all these solutions must be tied somehow to systemd, they can not just exist as yet-another-daemon on the side, but this is not systemd's fault, AFAICS it was imposed by kernel side changes.
