summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-28 18:50:22 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-28 18:50:22 +0000
commitbde0cdbcaab0d81ae4728f4b41ebe9629b76577d (patch)
tree5d210acbe933e4891e8cdb97b68ca64e9fa0e4e8 /sys
parent52f8126c711c5f2ca4405d7ce28fd1a99b1795f4 (diff)
Put back lost VOP_GETATTR call, but in a better place
Diffstat (limited to 'sys')
-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;