PERFORCE change 15700 for review
Robert Watson
rwatson at freebsd.org
Thu Aug 8 21:56:25 GMT 2002
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15700
Change 15700 by rwatson at rwatson_paprika on 2002/08/08 14:56:24
In vn_rdwr(), use the saved_cred to authorize calls into
VOP_READ() and VOP_WRITE(), except in the case where no saved_cred
is provided, in which case we authorize using active_cred.
This provides compability with the old behavior by making
sure a credential is always available. It should always also
be the same credential seen previously.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/kern/vfs_vnops.c#43 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/kern/vfs_vnops.c#43 (text+ko) ====
@@ -378,6 +378,7 @@
struct uio auio;
struct iovec aiov;
struct mount *mp;
+ struct ucred *cred;
int error;
if ((ioflg & IO_NODELOCKED) == 0) {
@@ -414,6 +415,11 @@
}
#endif
if (error == 0) {
+ if (saved_cred)
+ cred = saved_cred;
+ else
+ cred = active_cred;
+
if (rw == UIO_READ)
error = VOP_READ(vp, &auio, ioflg, saved_cred);
else
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list