Subject: Re: CVS commit: src/sys/kern
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Elad Efrat <elad@NetBSD.org>
List: tech-kern
Date: 09/11/2006 15:26:22
YAMAMOTO Takashi wrote:

> no.  iiuc, yours is per-scope.

Oh - I see what you mean now.

> 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()?

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()'. :)

> listeners_have_not_been_initialized_yet() is a system global status.
> in this way, once you have finished the initialization,
> you can make "unknown" scopes all-deny by making the global flag false.

-e.

-- 
Elad Efrat