Make sure we don't end up with VAPPEND without VWRITE, if someone calls open(2)

like this: open(..., O_APPEND).
This commit is contained in:
Edward Tomasz Napierala 2009-11-04 06:48:34 +00:00
parent 597954c813
commit 8fafa5cecf

View File

@ -213,7 +213,7 @@ restart:
if (fmode & FEXEC)
accmode |= VEXEC;
if (fmode & O_APPEND)
accmode |= VAPPEND;
accmode |= VWRITE | VAPPEND;
#ifdef MAC
error = mac_vnode_check_open(cred, vp, accmode);
if (error)