New in-kernel privilege API: priv(9)

Max Laier max at love2party.net
Mon Sep 25 16:44:57 PDT 2006


On Saturday 23 September 2006 11:26, Robert Watson wrote:
> On Thu, 14 Sep 2006, Max Laier wrote:
> > Right now, prison_priv_check() is looking rather scary to me.  If
> > something else wants to decide on finer granularity, alright, but in
> > my opinion it's easier (more obvious) to keep the "normal"
> > information in the .h file where the privileges are defined and
> > described - as we are aiming for centralization of the decision and
> > information.  On top of that the caller could mask off ALLOW_IN_JAIL
> > if they think it's not appropriate in a special use case of the
> > privilege.
>
> The attached version of the kern_jail.c diff removes all the extra
> commented out privileges that aren't granted, and were largely there as
> development scaffolding to make sure I considered all privileges.  Does
> this seem a bit less scary?

Yes.  The argument about modules getting out of sync already had me 
convinced that encoding things in the value isn't the best idea.  The 
cleaned up version of kern_jail.c now really gives a good example what we 
gain by this centralization.

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20060925/1a0e8e44/attachment.pgp


More information about the freebsd-arch mailing list