summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-07-22 12:51:06 +0000
committerrwatson <rwatson@FreeBSD.org>2002-07-22 12:51:06 +0000
commitfcb9022bbd197d29db9969eb8ddad8754296f8d0 (patch)
tree944d51416459b321e880adef34e272e5cabacd7c /sys/kern/vfs_extattr.c
parent28e1b1786ca3342d3a2e208c6af3dd9738aa87a9 (diff)
downloadFreeBSD-src-fcb9022bbd197d29db9969eb8ddad8754296f8d0.zip
FreeBSD-src-fcb9022bbd197d29db9969eb8ddad8754296f8d0.tar.gz
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
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c2
1 files changed, 2 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud