[systemd-devel] [RFC 4/8] HACK0: allow meta information customizable

Djalal Harouni tixxdz at opendz.org
Fri Jun 27 03:14:26 PDT 2014


On Fri, Jun 27, 2014 at 11:44:06AM +0200, Daniel Mack wrote:
> On 06/27/2014 11:33 AM, Djalal Harouni wrote:
> > On Fri, Jun 27, 2014 at 11:24:48AM +0200, Daniel Mack wrote:
> 
> >> No, that's what I'm saying. We cannot cache anything as any information
> >> may change at any time. The rule here is simple: if you want metadata,
> >> you have to be aware that they come at a price. If you don't need them,
> >> don't request them :)
> > Well, Daniel I think we can do something here!
> > 
> > We can use the cached metadata from handle or from HELLO and only for
> > privileged bus users!
> > 
> > Privileged bus users can do what ever they want, and per kdbus
> > definition this include normal users which is nice! so we can perhap do
> > that!
> 
> Did you consider the fact that a kdbus handle (the fd) can be passed
> from one userspace task to another? Tasks may also modify their name,
> drop capabilities, change their effective uid and all the like. Metadata
> must match the environment in which the _message_ has been generated,
> regardless what was the case when the bus user originally connected to
> the bus.
Yes, I do agree that metadata *must* match the environment at the moment
of generating and sending the message.

In the other hand say we have a busy privileged process (that we can trust)
that will setup its enviroment then open or make a HELLO cmd, and will
not change its capabilities, others unprivileged processes or connections
that do connect to this bus will for sure trust the provided metadata
and have to!

For the kdbus handle and the fd that can be passed from a task to
another, yes you have a point.

Need to investigate this more, applications should not just connect to any
bus, in the other hand I'm making this only available to bus privileged
users, so this follows the same scheme of kdbus activators, policy holders,
monitors...

And also is this really useful ? sure we need to explore it.


> > I've already patches that do this! will send them in minutes, we have
> > metadata for free and bechmark improvment hmm say ~50%
> 
> Ok.
> 
> 
> Thanks,
> Daniel
> 
> 

-- 
Djalal Harouni
http://opendz.org


More information about the systemd-devel mailing list