Subject: Re: CVS commit: src/sys/kern
To: None <elad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: source-changes
Date: 09/13/2006 11:26:59
> Module Name:	src
> Committed By:	elad
> Date:		Tue Sep 12 07:51:30 UTC 2006
> 
> Modified Files:
> 	src/sys/kern: vfs_syscalls.c
> 
> Log Message:
> Oops, add forgotten 'if'.
> 
> From Geoff Wing, thanks!
> 
> 
> To generate a diff of this commit:
> cvs rdiff -r1.268 -r1.269 src/sys/kern/vfs_syscalls.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.

kauth_authorize_action and its wrappers return EPERM or such,
not KAUTH_RESULT_*.

ie. the correct usage is:
	error = kauth_authorize_action(...);
	if (error != 0) {
		return error;
	}

you seem to have this bug in several places.

YAMAMOTO Takashi