*BSD News Article 10651


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA425 ; Sun, 31 Jan 93 14:07:35 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!spool.mu.edu!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!email!mbirgmei
From: mbirgmei@email.tuwien.ac.at (Martin BIRGMEIER)
Subject: Re: NFS read errors since .2 patch kit
Message-ID: <1993Feb1.152154.22684@email.tuwien.ac.at>
Organization: Technical University of Vienna
References: <C1qvI5.K0L@world.std.com>
Date: Mon, 1 Feb 1993 15:21:54 GMT
Lines: 74

In article <C1qvI5.K0L@world.std.com> hd@world.std.com (HD Associates) writes:
>Since applying Nate's Beta-2 patch kit I've been getting NFS read
>errors on files I think I should be able to read.  In particular:
>
>A client exports a file system and a server mounts it;
>
>A process on the server can't read a file even though it is world
>readable.
[...]
>Peter Dufault
>HD Associates

Just about an hour after reading your article (and hoping it would not
pertain to me), exactly this bug bit me... I think I have chased it down
to the following:

============================== cut here ==============================
*** /usr/src/sys.386bsd/nfs/nfs_serv.c.VEXEC_ORIG	Mon Jan 25 12:06:38 1993
--- /usr/src/sys.386bsd/nfs/nfs_serv.c	Mon Feb  1 15:56:07 1993
***************
*** 373,379 ****
  	nfsm_srvstrsiz(cnt, NFS_MAXDATA);
  	if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
  		nfsm_reply(0);
! 	if (error = nfsrv_access(vp, VREAD | VEXEC, cred, p)) {
  		vput(vp);
  		nfsm_reply(0);
  	}
--- 373,379 ----
  	nfsm_srvstrsiz(cnt, NFS_MAXDATA);
  	if (error = nfsrv_fhtovp(fhp, TRUE, &vp, cred))
  		nfsm_reply(0);
! 	if (error = nfsrv_access(vp, VREAD, cred, p)) {
  		vput(vp);
  		nfsm_reply(0);
  	}
============================== cut here ==============================

I just don't know if it is kosher to do this...

While you are at patching, you might as well want to apply the following
one:

============================== cut here ==============================
*** /usr/src/sys.386bsd/nfs/nfs_vnops.c.VACCESS_ORIG	Thu Jan 16 05:45:01 1992
--- /usr/src/sys.386bsd/nfs/nfs_vnops.c	Mon Feb  1 13:11:16 1993
***************
*** 255,261 ****
  found:
  		;
  	}
! 	if ((vap->va_mode & mode) != 0)
  		return (0);
  	return (EACCES);
  }
--- 255,261 ----
  found:
  		;
  	}
! 	if ((vap->va_mode & mode) == mode)
  		return (0);
  	return (EACCES);
  }
============================== cut here ==============================

Oh well - I always thought it is better to have a system with sources
than a system without bugs :-) - but sometimes now I get the feeling
that working with, say, HPUX or SunOS or whatever else is nice, too.

Cheers,

Martin

Dept. of Comm. Engr./TU Vienna