Date: Sun, 27 Apr 1997 17:10:48 -0700 (PDT) From: chiuk@indiana.edu To: freebsd-gnats-submit@freebsd.org Subject: bin/3399: mv of symbolic link can move directory instead of link Message-ID: <199704280010.RAA07332@hub.freebsd.org> Resent-Message-ID: <199704280020.RAA07669@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704280010.RAA07332>