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:
parent
6863982a02
commit
0b1040cb88
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user