Subject: Re: CVS commit: src/sys/secmodel/bsd44
To: YAMAMOTO Takashi <>
From: Elad Efrat <>
List: tech-kern
Date: 11/08/2006 01:10:33
YAMAMOTO Takashi wrote:

> seems sane to me.  but i don't claim i understand these drivers.
> a minor nit:
> i think it's better to do
> 	error = kauth_foo();
> 	if (error)
> 		return error;
> rather than
> 	error = kauth_foo();
> 	if (error)
> 		return EPERM;

there are no such constructs in the code, though. :)

I just replaced:

	if (securelevel > 1)


	if (kauth_foo() != 0)

also note that some constructs actually set EPERM as the retval for the
function and break. do you still think we should convert those that use
the above construct to the one you suggest?


Elad Efrat