Date: Sun, 11 Feb 2001 21:20:01 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/25013: mv(1) cannot move unresolvable symlinks across devices Message-ID: <200102120520.f1C5K1d05869@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/25013; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: mkamm@gmx.net Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/25013: mv(1) cannot move unresolvable symlinks across devices Date: Mon, 12 Feb 2001 16:18:49 +1100 (EST) On Sun, 11 Feb 2001 mkamm@gmx.net wrote: > Unresolvable symlinks cannot be moved across devices with mv(1). > ... > >Fix: > > The problem was introduced with a code snippet that protects against > moving mountpoints. Moving mountpoints is bad, because that would > trigger "cp -pRP /mountpoint newname". My patch invokes this code > snippet only if a directory is to be moved and bypasses it otherwise. > (My patch also tries to avoid redundant lstat(2) calls.) I think the "protection" should just be removed. POSIX.2 doesn't mention a special case for mountpoints (at least least in my old draft copy that doesn't specify mountpoints :-). Moving a huge directory may be a mistake whether or not the directory is a mountpoint. It is practically impossible to "protect" against moving mountpoints deep in the hierarchy. I think that POSIX.2 and/or BSD made a mistake here, and mv should never move across filesystems without being forced to. gnu mv still refuses to move across filesystems in the last version that I have handy (a Feb 26 1997 Redhat version running under FreeBSD; this also has emulation problems -- "mv /tmp/q /usr" attempted to move the directory to /compat/linux/usr/q). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102120520.f1C5K1d05869>