From owner-cvs-all Sat Jan 12 21:36: 9 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B706937B417; Sat, 12 Jan 2002 21:36:05 -0800 (PST) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0D5a5B98621; Sat, 12 Jan 2002 21:36:05 -0800 (PST) (envelope-from iedowse) Message-Id: <200201130536.g0D5a5B98621@freefall.freebsd.org> From: Ian Dowse Date: Sat, 12 Jan 2002 21:36:05 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/nfsserver nfs_serv.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2002/01/12 21:36:05 PST Modified files: sys/nfsserver nfs_serv.c Log: It is required by VOP_CREATE, VOP_MKNOD, VOP_SYMLINK and VOP_MKDIR that va_mode of the supplied attributes is filled in with a valid file mode (i.e not VNOVAL, and only ALLPERM bits set). However, some NFS server op functions didn't guarantee this for all possible request messages: If a V3 client chose not include to a mode specification, we could end up creating an ffs inode with mode 0177777, requiring a manual fsck on the next reboot. Fix this by setting va_mode to 0 before calling the VOP if a mode hasn't been supplied by the client. In nfsrv_symlink(), S_IFMT bits supplied by a V2 client could end up in the va_mode passed to VOP_SYMLINK with similar effects. We now use the macro nfstov_mode() to correctly mask the bits. Revision Changes Path 1.113 +9 -3 src/sys/nfsserver/nfs_serv.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message