From: niklas Date: Tue, 28 Jan 1997 18:50:21 +0000 (+0000) Subject: Put back lost VOP_GETATTR call, but in a better place X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=48aab2201bffba15b710bcbd9e86e0153a09fb8c;p=openbsd Put back lost VOP_GETATTR call, but in a better place --- 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;