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 23:59:42
> > the simplest one would be:
> > 
> > 	boolean_t
> > 	listeners_have_not_been_initialized_yet()
> > 	{
> > 		return number_of_listeners_loaded_in_this_system == 0;
> > 	}
> 
> Is there a point for having a count? How about:
> 
> 	(global in kern_auth.c)
> 	static boolean_t have_listeners = 0;
> 
> 	(in kauth_listen_scope)
> 	have_listeners = TRUE;
> 
> 	(in kauth_authorize_action)
> 	if (have_listeners == FALSE)
> 		/* whatever */

they behave differently only when all listeners are unloaded.
in that case i'm not sure what's a desired behaviour.

YAMAMOTO Takashi