From fcb9022bbd197d29db9969eb8ddad8754296f8d0 Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 22 Jul 2002 12:51:06 +0000 Subject: Set VAPPEND in open mode when O_APPEND is specified as an argument to open() of fhopen(). Currently this has no actual affect due to the treatment of VAPPEND in vaccess() and vaccess_acl() as a subset of VWRITE, but when MAC comes in, MAC will distinguish the two. Note: if any file systems are cutting their own permission models, they may wish to now take this into account. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs --- sys/kern/vfs_extattr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern/vfs_extattr.c') diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index b787bc2..2a8e247 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3221,6 +3221,8 @@ fhopen(td, uap) } if (fmode & FREAD) mode |= VREAD; + if (fmode & O_APPEND) + mode |= VAPPEND; if (mode) { error = VOP_ACCESS(vp, mode, td->td_ucred, td); if (error) -- cgit v1.1