On 5/10/06, Jim Meyering <[EMAIL PROTECTED]> wrote:
Thanks to Joshua for the report and to Eric for pursuing it.
There is indeed a bug.
Before the fix, mv would unnecessarily unlink the destination symlink:
$ rm -rf s[12]; ln -s / s1; ln -s /tmp s2; strace -qe unlink /bin/mv -T s1 s2
unlink("s2") = 0
With the fix, it doesn't call unlink:
$ rm -rf s[12]; ln -s / s1; ln -s /tmp s2; strace -qe unlink ./mv -T s1 s2
$
Thanks guys. The patch doesn't apply to 5.94 so I can't tell if it worked.
If you're curious this came from me trying to get mv to do
sys_rename("source", "target") when target existed and was a directory.
I'm quite certain that I am far outside of POSIX here though because I
expect the rename to succeed in this case.
Yeah, ln -d works, no privileges required.
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils