summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfs/nfs_serv.c')
-rw-r--r--sys/nfs/nfs_serv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index ba8b2d891f2..d18d4fc6937 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.8 1996/12/14 15:36:50 deraadt Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.9 1997/01/28 18:50:21 niklas Exp $ */
/* $NetBSD: nfs_serv.c,v 1.25 1996/03/02 15:55:52 jtk Exp $ */
/*
@@ -3302,6 +3302,7 @@ nfsrv_access(vp, flags, cred, rdonly, p, override)
{
struct vattr vattr;
int error;
+
if (flags & VWRITE) {
/* Just vn_writechk() changed to check rdonly */
/*
@@ -3333,6 +3334,7 @@ nfsrv_access(vp, flags, cred, rdonly, p, override)
* on files that are already open).
*/
if (override && (error == EPERM || error == EACCES) &&
+ VOP_GETATTR(vp, &vattr, cred, p) == 0 &&
cred->cr_uid == vattr.va_uid)
error = 0;
return error;