Subject: Re: CVS commit: [elad-kernelauth] src/sys/nfs
To: None <source-changes@NetBSD.org>
From: Elad Efrat <elad@NetBSD.org>
List: source-changes
Date: 03/11/2006 00:43:19
A little note about this...

The comment above nfsrv_setcred() says "copy credentials making sure
that the result can be compared with memcmp()", which seems wrong (I
am not too familiar with NFS code to indicate *why* this is needed).

Can anyone who knows NFS shed some light on why it needs to be able
to compare credentials with memcmp()? if these comparisons are only
done locally, perhaps via NFSW_SAMECRED(), there is (or should be) a
cleaner solution.

-e.

Elad Efrat wrote:
> Module Name:	src
> Committed By:	elad
> Date:		Fri Mar 10 22:38:09 UTC 2006
> 
> Modified Files:
> 	src/sys/nfs [elad-kernelauth]: nfs_socket.c nfs_subs.c nfs_syscalls.c
> 	    nfs_var.h
> 
> Log Message:
> Cleanup more interface abuse.
> 
> Make nfsrv_setcred() take a kauth_cred_t * as outcred. The original code
> just modified it directly; we can't do that, nor do we want to.
> 
> Get rid of another case of kauth_cred_zero() followed by kauth_cred_hold()
> and use kauth_cred_clone() to make sure we don't leave out important
> members.
> 
> Add another DIAGNOSTIC check for reference count of above one.
> 
> Again, this should be tested.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -r1.126.4.3 -r1.126.4.4 src/sys/nfs/nfs_socket.c
> cvs rdiff -r1.158.4.2 -r1.158.4.3 src/sys/nfs/nfs_subs.c
> cvs rdiff -r1.88.8.3 -r1.88.8.4 src/sys/nfs/nfs_syscalls.c
> cvs rdiff -r1.58.8.1 -r1.58.8.2 src/sys/nfs/nfs_var.h
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 


-- 
Elad Efrat