[Bug 8856] --hard-links does not handle hard-linked symlinks correctly on FreeBSD

samba-bugs at samba.org samba-bugs at samba.org
Mon Nov 17 03:32:00 MST 2014


https://bugzilla.samba.org/show_bug.cgi?id=8856

--- Comment #8 from sylvain at ilm-informatique.fr ---
To expand on the previous post : POSIX previously mandated that link() resolve
the target (as FreeBSD does), but some systems (including Linux) did not. So in
the last standard linkat() was added (with a new parameter) to disambiguate. So
if linkat() is available it should be used, it's available at least on FreeBSD
>= 8.0 (released 23 July 2010) and on Linux >= 2.6.18 (released 20 September
2006) and glibc >= 2.4.

Sources: 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html
http://manpages.ubuntu.com/manpages/trusty/man2/link.2.html
http://manpages.ubuntu.com/manpages/trusty/man2/linkat.2.html
https://www.freebsd.org/cgi/man.cgi?query=link&sektion=2&manpath=FreeBSD+10.1-RELEASE+and+Ports&arch=default&format=html

I've patched configure.ac and syscall.c of rsync 3.1.1 to use linkat() on my
FreeBSD 9.1 system and I haven't have any problems (including with dry run,
contrary to the previous post).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the rsync mailing list