*BSD News Article 21767


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!xlink.net!subnet.sub.net!flatlin!bad
From: bad@flatlin.ka.sub.org (Christoph Badura)
Subject: NetBSD-0.9: patch to vfs_bio to fix a couple of NFS problems
Organization: Guru Systems/Funware Department
Date: Sat, 2 Oct 1993 17:11:47 GMT
Message-ID: <CEA53o.n7@flatlin.ka.sub.org>
Summary: fix a typo in vfs_bio.c:breada()
Keywords: NetBSD-0.9, BSD/386, NFS, weak authentification, breada
Lines: 37

The following patch fixes a typo in vfs_bio.c:breada() that's the
root of various NFS problems.  The bugs causes every read-ahead block
to not have proper credentials attached to it.  This leads to
interoperability problems with some NFS servers because every other
NFS read request doesn't carry any credentials too.  Symptoms of this
bug include failure to communicate with BSD/386 1.0 based NFS servers
and "NFS weak authentification from xxx.xxx.xxx.xxx" messages in the
syslog of other NFS servers.

Thanks to Vernon Schryver for supplying a trace that showed what was
going on on the wire.

*** vfs_bio.c,1	Sat Aug  7 03:55:47 1993
--- vfs_bio.c	Fri Oct  1 19:29:48 1993
***************
*** 217,223 ****
  	if ((rabp->b_flags & B_CACHE) == 0 || (rabp->b_flags & B_INVAL) != 0) {
  		rabp->b_flags |= B_READ | B_ASYNC;
  		rabp->b_flags &= ~(B_DONE|B_ERROR|B_INVAL);
! 		if (cred != NOCRED && bp->b_rcred  == NOCRED) {
  			crhold(cred);
  			rabp->b_rcred = cred;
  		}
--- 217,223 ----
  	if ((rabp->b_flags & B_CACHE) == 0 || (rabp->b_flags & B_INVAL) != 0) {
  		rabp->b_flags |= B_READ | B_ASYNC;
  		rabp->b_flags &= ~(B_DONE|B_ERROR|B_INVAL);
! 		if (cred != NOCRED && rabp->b_rcred  == NOCRED) {
  			crhold(cred);
  			rabp->b_rcred = cred;
  		}

-- 
    Christoph Badura  ---  bad@flatlin.ka.sub.org  ---  +49 721 606137

Personally, I don't care whether someone is cool enough to quote Doug
Gwyn--I only care whether Doug Gwyn is cool enough to quote. -- Larry Wall