diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index c61e2f45719..0fe684c8397 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.9 1997/11/06 05:58:29 csapuntz Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.10 1997/12/10 19:15:09 deraadt Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -124,7 +124,7 @@ vn_open(ndp, fmode, cmode) if ((error = VOP_ACCESS(vp, VREAD, cred, p)) != 0) goto bad; } - if (fmode & (FWRITE | O_TRUNC)) { + if ((fmode & (FWRITE | O_TRUNC)) == (FWRITE | O_TRUNC)) { if (vp->v_type == VDIR) { error = EISDIR; goto bad; |