From owner-freebsd-bugs Sun Apr 27 17:20:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA07687 for bugs-outgoing; Sun, 27 Apr 1997 17:20:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA07669; Sun, 27 Apr 1997 17:20:02 -0700 (PDT) Resent-Date: Sun, 27 Apr 1997 17:20:02 -0700 (PDT) Resent-Message-Id: <199704280020.RAA07669@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.ORG, Received:(from nobody@localhost) by.hub.freebsd.org.id.RAA07332;Sun; (8.8.5/8.8.5);, 27 Apr 1997 17:10:48.-0700 (PDT) Message-Id: <199704280010.RAA07332@hub.freebsd.org> Date: Sun, 27 Apr 1997 17:10:48 -0700 (PDT) From: chiuk@indiana.edu To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: bin/3399: mv of symbolic link can move directory instead of link Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 3399 >Category: bin >Synopsis: mv of symbolic link can move directory instead of link >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 27 17:20:01 PDT 1997 >Last-Modified: >Originator: Kenneth Chiu >Organization: Indiana University >Release: 2.2.1-RELEASE >Environment: FreeBSD bakery.bloomington.nsisw.com 2.2.1-RELEASE FreeBSD 2.2.1-RELEASE #0: Tue Mar 25 15:12:02 GMT 1997 jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC i386 >Description: If a symbolic link is entered with a trailing /, the directory it references instead of the link is moved. This could cause loss of data, if someone assumes that the original directory was not affected. >How-To-Repeat: % mkdir /tmp/dir % touch /tmp/dir/foo % ln -s /tmp/dir % mkdir dest % mv dir/ dest # only occurs with trailing slash % ls /tmp/dir ls: /tmp/dir: No such file or directory >Fix: >Audit-Trail: >Unformatted: