samba-bugs@samba.org
2005-Jul-24 08:20 UTC
[Bug 2913] New: rsync of symlinks on >=bsd needs lutimes(2) and lchmod(2)
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@samba.org ReportedBy: rsync@cpe-24-95-91-210.columbus.res.rr.com QAContact: rsync-qa@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.
Possibly Parallel Threads
- [Bug 2913] rsync of symlinks on >=bsd needs lutimes(2) and lchmod(2)
- DO NOT REPLY [Bug 4745] New: Use lchmod and lutimes whenever possible
- lchmod for osx (was: Symlinks in OS X (10.4.1))
- [Bug 2933] regression with hardlinked devices
- [Bug 1657] New: tests/functional/acl/nontrivial/ zfs_acl_cp_001_pos causes panic