From owner-cvs-sys Mon Dec 30 23:10:22 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id XAA18761 for cvs-sys-outgoing; Mon, 30 Dec 1996 23:10:22 -0800 (PST) Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id XAA18754; Mon, 30 Dec 1996 23:10:20 -0800 (PST) Date: Mon, 30 Dec 1996 23:10:20 -0800 (PST) From: Bill Paul Message-Id: <199612310710.XAA18754@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/nfs nfs_vnops.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 96/12/30 23:10:20 Modified: sys/nfs nfs_vnops.c Log: Fix (properly, I hope) 'panic: sillyrename dir' crash that can happen if you do: % cd /nfsdir % mkdir -p foo/foo % mv foo/foo . nfs_sillyrename() self-destructs if you try to sillyrename a directory, however nfs_rename() can be coerced into doing just that by the above sequence of commands. To avoid this, nfs_rename() now checks that v_type of the 'destination' vnode != VDIR before attempting the sillyrename. The server correctly handles this particular situation by returning ENOTEMPTY on the rename() attempt. I asked if this was the correct fix for this on -hackers but nobody ever answered. This is a 2.2 candidate. Revision Changes Path 1.39 +3 -2 src/sys/nfs/nfs_vnops.c