tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Addition to kauth(9) framework



> On Mon, Aug 29, 2011 at 12:13:38PM +0200, Aleksey Cheusov wrote:
> > we will lost our data. Data set by first listener will
> > be overriden by the second listerner.
> > This is not just waste of time.
> 
> Yes, but it is a design bug in the modules or in kauth
> and unrelated to the (un-)sharing, isn't it?

If sender (chroot(2)) cares about unsharing kauth_cred_t
structure, all listeners will set their data without any problem provided that 
kauth_key_t keys they use
are different. Key uniqueness is garanteed by
kauth_register_key.

Otherwise kauth_cred_copy should be used by listerner
and then (in my case) new cred should be distributed
to proc and LWPs.
This leads to unnecessary code in listerners.

IMHO the first variant is better.

> The data set operation needs to get a unique token, or the module > has to 
> prevent further sets and make sure it is the only
> listener - or whatever.
> 
> Martin

As for me limiting a number of listeners doesn't look like a good idea. This 
breaks kauth(9) design.

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de


Home | Main Index | Thread Index | Old Index