From owner-freebsd-bugs Fri Mar 17 23:40:47 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA20271 for bugs-outgoing; Fri, 17 Mar 1995 23:40:47 -0800 Received: from suntan.Tandem.com (suntan.tandem.com [192.216.221.8]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id XAA20265 for ; Fri, 17 Mar 1995 23:40:46 -0800 Received: from zorch.sf-bay.org by suntan.Tandem.com (4.1/suntan5.950313) for bugs@freebsd.org id AA27635; Fri, 17 Mar 95 23:39:57 PST Received: (from root@localhost) by zorch.sf-bay.org (8.6.9/8.6.9) id XAA00310 for bugs@freebsd.org; Fri, 17 Mar 1995 23:06:07 -0800 Date: Fri, 17 Mar 1995 23:06:07 -0800 From: Scott Hazen Mueller Message-Id: <199503180706.XAA00310@zorch.sf-bay.org> To: bugs@FreeBSD.org Subject: bug in kernel NFS Sender: bugs-owner@FreeBSD.org Precedence: bulk 2.0 Release (I reported a bug against libc/rpc earlier today, same release). nfs/nfs_subs.c: code seems to assume that file type information is lurking in the high bits of fa_mode; this is (likely) true if the server is UNIX, but not so true if the server is not (e.g. MS Windows). The code replaces the type field received over the wire with the high bits of the mode field; my inelegant solution is to require that there be something in the high bits of the mode field before replacing the original type value. \scott *** nfs_subs.c Fri Mar 17 22:50:42 1995 --- nfs_subs.c.orig Fri Mar 17 23:05:46 1995 *************** *** 711,717 **** fp = (struct nfsv2_fattr *)cp2; vtyp = nfstov_type(fp->fa_type); vmode = fxdr_unsigned(u_short, fp->fa_mode); ! if ((vtyp == VNON || vtyp == VREG) && vmode > 4096 ) vtyp = IFTOVT(vmode); if (isnq) { rdev = fxdr_unsigned(long, fp->fa_nqrdev); --- 711,717 ---- fp = (struct nfsv2_fattr *)cp2; vtyp = nfstov_type(fp->fa_type); vmode = fxdr_unsigned(u_short, fp->fa_mode); ! if (vtyp == VNON || vtyp == VREG) vtyp = IFTOVT(vmode); if (isnq) { rdev = fxdr_unsigned(long, fp->fa_nqrdev);