Subject: Re: CVS commit: src/sys/kern
To: None <elad@NetBSD.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 09/11/2006 22:13:35
> > well, whether per-scope or global is not a fundamental point, actually.
> > essentially, my suggestion was to replace the following code
> > in kauth_authorize_action
> > 
> > 	if (SIMPLEQ_EMPTY(&scope->listenq))
> > 		return (0);
> > 
> > with
> > 
> > 	if (listeners_have_not_been_initialized_yet())
> > 		return (0);
> 
> How do you want to address that? add a boolean that'll be modified on
> first entry to kauth_listen_scope()?

the simplest one would be:

	boolean_t
	listeners_have_not_been_initialized_yet()
	{
		return number_of_listeners_loaded_in_this_system == 0;
	}

another simple way is having a explict knob which can be turned off
from userland (eg. by syscall), and turn it off after loading lkms.

> Btw, now we don't even allow that because if you don't choose a security
> model in the config file (conf/std actually..) you'll end up with an
> undefined reference to 'secmodel_start()'. :)

you can have no-op secmodel whose secmodel_start is empty. :)

YAMAMOTO Takashi