[Bug 2913] New: rsync of symlinks on >=bsd needs lutimes(2) and lchmod(2)

samba-bugs at samba.org samba-bugs at samba.org
Sun Jul 24 08:16:26 GMT 2005


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

           Summary: rsync of symlinks on >=bsd needs lutimes(2) and
                    lchmod(2)
           Product: rsync
           Version: 2.6.5
          Platform: All
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: rsync at cpe-24-95-91-210.columbus.res.rr.com
         QAContact: rsync-qa at samba.org


on at least freebsd, symlinks have settable
 times/perms as well as u/g/flags.

true, use of a symlink is time/perm/u/g/flag agnostic
 however, unsynchronized time/perm do cause problems
 elsewhere on systems that have the above syscalls. ie:
  1 - find <path> -newer <stampfile> -ls
   print if any/all types, rather than a single, are newer
  2 - find <path> -perm +7022 -ls
   print if any/all types, rather than a single, are not isolated

rsync created slinks earn the time of the symlink(2) call
 by rsync. further, an lutimes(2) run elsewhere against the
 slink is not picked up by later rsync runs. both break ex1.
similarly, rsync ignores both umask and src perms when
 creatings slinks. neither are updated in later runs. breaking ex2.

rm -r ./dstdir
srcdir:
lrwxrwx---  1 u  g  1 Jul 24 03:29:58 2005 a -> b
-rw-r-----  1 u  g  0 Jul 24 03:29:58 2005 b
prw-rw----  1 u  g  0 Jul 24 03:29:58 2005 fifo
srwxrwx---  1 u  g  0 Jul 24 03:29:58 2005 sockfile

umask 0022
[root] rsync -axv --delete ./srcdir/ ./dstdir/
dstdir:
lrwxrwxrwx  1 u  g    1 Jul 24 03:30:36 2005 a -> b
-rw-r-----  1 u  g    0 Jul 24 03:29:58 2005 b
prw-rw----  1 u  g    0 Jul 24 03:29:58 2005 fifo
srwxrwx---  1 u  g    0 Jul 24 03:29:58 2005 sockfile

last time i looked this required passing the
source stat structure through to the affected
rsync functions and extending the fn to use it
with the above syscalls, perhaps ifdef'd if not
present.

reply only to bugzilla/rsync list, thx.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list