5 Dec 2011 16:22
Re: secmodel_register(9) API
Christoph Badura <bad <at> bsd.de>
2011-12-05 15:22:33 GMT
2011-12-05 15:22:33 GMT
On Tue, Nov 29, 2011 at 02:51:38AM +0100, Jean-Yves Migeon wrote:
> A few weeks back I tried adding a sysctl knob to allow users to control
> their CPU affinity. However, while implementing checks to restrict usage
> of this sysctl, I hit a limitation regarding secmodel(9): the current
> design cannot allow a secmodel to query the state/properties of other
> secmodels.
That is by design. The idea behind splitting the decision process into
separate secmodels is to decouple the models and the decision making.
> So, when one wants to create sysctls that can only be changed when
> securelevel is below a certain level, you end up adding more hooks to
> secmodel_securelevel(9)...
That is intentional. Every time a new control is added all the secmodels
need to be examined if they need updating.
> which is problematic, because the sysctl does
> not necessarily belong to this secmodel (consider curtain and suser, as
> an exemple).
Uh, sysctls do not "belong to a secmodel". Whatever that is supposed to
mean.
> error = secmodel_eval("org.netbsd.secmodel.suser", "is-root",
> cred, &isroot, NULL);
> This one asks the suser module if the user cred is assumed to be
> root when evaluated by suser module. If the module is present, it
> will respond. If absent, the call will return an error.
(Continue reading)
RSS Feed