samba-bugs@samba.org
2006-Nov-28 12:56 UTC
DO NOT REPLY [Bug 4263] New: Symlinks gets corruped when rsyncd is used to 'put' the symlink.
https://bugzilla.samba.org/show_bug.cgi?id=4263 Summary: Symlinks gets corruped when rsyncd is used to 'put' the symlink. Product: rsync Version: 2.6.8 Platform: Sparc OS/Version: Solaris Status: NEW Severity: critical Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: bjorn.unden@se.atlascopco.com QAContact: rsync-qa@samba.org I get problem with symbolic links when I do a backup between two servers using rsyncd on one of them. When I get the backup everything works fine. See the GET-part belowe. But when I shall put it back to the original place in the first server, rsync strips off the initial '/' in the symlink and this will not work. See the PUT-part belowe. I have tryed it out a lot and it seems to work fine to 'GET' but not to 'PUT' when I use rsyncd. GET ===toos6<kalle> ls -al total 6 drwxrwxr-x 2 root other 512 Nov 27 19:15 . drwxrwxr-x 11 root other 512 Oct 25 14:40 .. lrwxrwxrwx 1 root other 47 Nov 27 19:15 LDAPBrowser -> /opt/ptc/Aphelion/SyntegraLDAPBrowser/ptclbe.sh toos22<bin> rsync -av toos6::ptc/kalle/LDAPBrowser /backup/pdmlink_061126/Aphelion_latest/bin receiving file list ... done LDAPBrowser -> /opt/ptc/Aphelion/SyntegraLDAPBrowser/ptclbe.sh sent 91 bytes received 149 bytes 160.00 bytes/sec total size is 47 speedup is 0.20 toos22<bin> ls -al total 6 drwxrwxr-x 2 root other 512 Nov 27 19:15 . drwxrwxr-x 11 root other 512 Oct 25 14:40 .. lrwxrwxrwx 1 root other 47 Nov 27 19:15 LDAPBrowser -> /opt/ptc/Aphelion/SyntegraLDAPBrowser/ptclbe.sh PUT ===toos22<bin> ls -al total 6 drwxrwxr-x 2 root other 512 Nov 27 19:15 . drwxrwxr-x 11 root other 512 Oct 25 14:40 .. lrwxrwxrwx 1 root other 47 Nov 26 23:00 LDAPBrowser -> /opt/ptc/Aphelion/SyntegraLDAPBrowser/ptclbe.sh toos22<bin> rsync -av /backup/pdmlink_061126/Aphelion_latest/bin/LDAPBrowser toos6::ptc/kalle building file list ... done LDAPBrowser -> /opt/ptc/Aphelion/SyntegraLDAPBrowser/ptclbe.sh sent 109 bytes received 22 bytes 262.00 bytes/sec total size is 49 speedup is 0.37 toos6<kalle> ls -al total 6 drwxrwxr-x 2 root other 512 Nov 27 19:15 . drwxrwxr-x 11 root other 512 Oct 25 14:40 .. lrwxrwxrwx 1 root other 47 Nov 27 19:15 LDAPBrowser -> opt/ptc/Aphelion/SyntegraLDAPBrowser/ptclbe.sh -- 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.
samba-bugs@samba.org
2006-Nov-28 16:08 UTC
DO NOT REPLY [Bug 4263] Change the daemon's symlink safety mode to allow absolute symlinks
https://bugzilla.samba.org/show_bug.cgi?id=4263 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |enhancement Status|NEW |ASSIGNED Summary|Symlinks gets corruped when |Change the daemon's symlink |rsyncd is used to 'put' the |safety mode to allow |symlink. |absolute symlinks Version|2.6.8 |3.0.0 ------- Comment #1 from wayned@samba.org 2006-11-28 10:08 MST ------- This is a safety feature when running the rsync daemon without chroot. The easiest way to work around it is to set "use chroot = yes" in the config file. I looked into improving the symlink safety mode to not modify an absolute symlink, but this will require changing rsync to chdir() into every destination directory when making changes (so that a user can't substitute a symlink for a directory in between a path's validity change and its use), so I deferred this change from 2.6.9 to a later release. If 3.0.0 gets changed to use more chdir() calls, I will revisit making a non-chroot daemon have a safe symlink mode that doesn't mangle absolute symlinks. Another, easier change would be to allow the config file to choose to accept unsafe symlinks in a non-chroot area. You can manually disable the code that sanitizes the symlinks by looking for a sanitize_path() call inside an #ifdef SUPPORT_LINKS section in flist.c -- if that call were commented out, the symlinks would not be changed by a receiving daemon. -- 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.
samba-bugs@samba.org
2007-Dec-15 03:45 UTC
DO NOT REPLY [Bug 4263] Change the daemon's symlink safety mode to allow absolute symlinks
https://bugzilla.samba.org/show_bug.cgi?id=4263 ------- Comment #2 from matt@mattmccutchen.net 2007-12-14 21:45 CST ------- If you use the "munge symlinks" feature recently added to the development rsync, you won't be able to follow the symlinks on the daemon but the daemon will regurgitate them verbatim. -- 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.
samba-bugs@samba.org
2007-Dec-15 17:42 UTC
DO NOT REPLY [Bug 4263] Change the daemon's symlink safety mode to allow absolute symlinks
https://bugzilla.samba.org/show_bug.cgi?id=4263 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #3 from wayned@samba.org 2007-12-15 11:42 CST ------- As Matt points out, this is now possible. -- 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.