It's great to see this problem broken up into reusable pieces though. It totally makes sense to function without a daemon, especially out of the box.
It's great to see this problem broken up into reusable pieces though. It totally makes sense to function without a daemon, especially out of the box.
hm.. I don't think that's a given at all! There's been many issues with setuid-root programs. And I've seen that the OpenBSD guys favor privilege separation by breaking breaking up daemons into several parts that communicate using a very strict set of commands. For example a dockerd that does most of the work, but talks to another daemon (dockerd-root) when it needs to do anything privileged.
OpenSMTPD example: https://www.opensmtpd.org/presentations/asiabsdcon2013-smtpd...
OpenSSH: Initial efort, 2002: http://www.citi.umich.edu/u/provos/ssh/privsep.html
http://www.openbsd.org/papers/openssh-measures-asiabsdcon200... - Page 16 ->
So then, I guess docker could just run the two servers, one internal as root and one public as not? That's a pretty quick fix.
Wrong. With a server, the only thing an attacker has control over is its input. With a setuid-root binary, they still have control over its input, but they also have control over the entire environment under which it executes, including many things that developers generally assume an attacker can't control. Setuid binaries are incredibly scary from a security perspective and much harder to get right than servers.