mac_check_vnode_setflags() bug?
mike halderman
mrh at nosc.mil
Wed Mar 5 17:39:41 GMT 2003
Looks like mac_check_vnode_setflags() is called with the flags from
an uninitialized struct vattr. Wouldn't it make more sense to pass
the flags that are to be set on the vnode? Maybe this is just a typo.
-mike
--- ../../sys.orig/kern/vfs_syscalls.c Wed Mar 5 10:44:56 2003
+++ ./vfs_syscalls.c Wed Mar 5 10:47:17 2003
@@ -1943,7 +1943,7 @@
VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
#ifdef MAC
- error = mac_check_vnode_setflags(td->td_ucred, vp, vattr.va_flags);
+ error = mac_check_vnode_setflags(td->td_ucred, vp, flags);
if (error == 0) {
#endif
VATTR_NULL(&vattr);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-discuss" in the body of the message
More information about the trustedbsd-discuss
mailing list