Date: Fri, 17 Mar 1995 23:06:07 -0800 From: Scott Hazen Mueller <scott@zorch.sf-bay.org> To: bugs@FreeBSD.org Subject: bug in kernel NFS Message-ID: <199503180706.XAA00310@zorch.sf-bay.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503180706.XAA00310>