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
This commit is contained in:
Robert Watson 2002-07-22 12:51:06 +00:00
parent 6863982a02
commit 0b1040cb88
3 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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)

View File

@ -201,6 +201,8 @@ vn_open_cred(ndp, flagp, cmode, cred)
}
if (fmode & FREAD)
mode |= VREAD;
if (fmode & O_APPEND)
mode |= VAPPEND;
if (mode) {
error = VOP_ACCESS(vp, mode, cred, td);
if (error)