Subject: CVS commit: [elad-kernelauth] src/sys/nfs
To: None <source-changes@NetBSD.org>
From: Elad Efrat <elad@netbsd.org>
List: source-changes
Date: 03/10/2006 22:10:21
Module Name: src
Committed By: elad
Date: Fri Mar 10 22:10:21 UTC 2006
Modified Files:
src/sys/nfs [elad-kernelauth]: nfs_socket.c
Log Message:
Okay, what I've done here is pretty bogus, and trying to use kauth_cred_t
as something it's not. Then again, it was part of a fast sweep so I have
good excuses. :)
DON'T kauth_cred_zero() and then kauth_cred_hold(); that's guaranteed to
trip over trying to lock an uninitialized lock. Also, kauth_cred_t now
contains more than just a struct ucred, so treat it properly.
Use a call to kauth_cred_copy() to ensure we have reference count of
one, and sprinkle some DIAGNOSTIC check to let us know if we ever leak
memory.
Also, don't forget to set proper values for the real/saved user- and
group-ids.
This should be tested at some point...
To generate a diff of this commit:
cvs rdiff -r1.126.4.2 -r1.126.4.3 src/sys/nfs/nfs_socket.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.