On Fri, Mar 18, 2005 at 11:19:52AM +0200, Tommi Virtanen wrote:
> Oh, the group-restricted UNIX domain socket wins there, too.
I'm not convinced.
> Your model:
> - setuid client that only lets certain users open ports <1024
You're very flexible in your setuid root client.
1. You may restrict the set of users that is able to call the client,
e.g. it might be root:trusted 4750. This would impose the same
restrictions as your group protection mechanism.
2. The first thing the client does it to acquire the privileged
port and then drop capabilities immediately afterwards. Security
flaws in the client will thus at most grant the exploiter a
privileged socket. (This has nothing to do with xen, just a
general rule for setuid root apps.)
3. The client can impose whatever restrictions it likes, e.g.
checking SSL certificates, asking for passwords, checking
a configuration file, whatever.
> The UNIX domain socket way is both more flexible and _more secure_
> -- it only needs setgid where the port<1024 thing needs setuid.
I don't see a big difference in neither flexibility nor security.
So let's create patches and see which one looks better in the end :-)
Kurt Garloff <kurt@xxxxxxxxxx> [Koeln, DE]
Physics:Plasma modeling <garloff@xxxxxxxxxxxxxxxxxxx> [TU Eindhoven, NL]
Linux: SUSE Labs (Director) <garloff@xxxxxxx> [Novell Inc]
Description: PGP signature