From owner-freebsd-commit Tue Jun 13 23:25:10 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA14096 for commit-outgoing; Tue, 13 Jun 1995 23:25:10 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA13874 for cvs-sys-outgoing; Tue, 13 Jun 1995 23:23:45 -0700 Received: (from joerg@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA13835 ; Tue, 13 Jun 1995 23:23:40 -0700 Date: Tue, 13 Jun 1995 23:23:40 -0700 From: Joerg Wunsch Message-Id: <199506140623.XAA13835@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/nfs nfs_subs.c Sender: commit-owner@FreeBSD.org Precedence: bulk joerg 95/06/13 23:23:39 Modified: sys/nfs nfs_subs.c Log: The duplicate information returned in fa_type and fa_mode is an ambiguity in the NFS version 2 protocol. VREG should be taken literally as a regular file. If a server intents to return some type information differently in the upper bits of the mode field (e.g. for sockets, or FIFOs), NFSv2 mandates fa_type to be VNON. Anyway, we leave the examination of the mode bits even in the VREG case to avoid breakage for bogus servers, but we make sure that there are actually type bits set in the upper part of fa_mode (and failing that, trust the va_type field). NFSv3 cleared the issue, and requires fa_mode to not contain any type information (while also introduing sockets and FIFOs for fa_type). The fix has been tested against a variety of NFS servers. It fixes problems with the ``Tropic'' NFS server for Windows, while apparently not breaking anything. Pointed-out by: scott@zorch.sf-bay.org (Scott Hazen Mueller)