samba-bugs@samba.org
2007-Jul-02 01:14 UTC
DO NOT REPLY [Bug 4757] New: Daemon mis-logs paths if module path in rsyncd.conf is relative
https://bugzilla.samba.org/show_bug.cgi?id=4757 Summary: Daemon mis-logs paths if module path in rsyncd.conf is relative Product: rsync Version: 3.0.0 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: hashproduct+rsync@gmail.com QAContact: rsync-qa@samba.org I set up an rsync daemon in /home/matt/test/daemon-log-paths/daemon with this rsyncd.conf: log file = rsyncd.log transfer logging = yes log format = %i %f pid file = rsyncd.pid port = 3142 use chroot = no [module] path = dir/ read only = false auth users = user secrets file = module.secrets Then I pushed a directory to it as follows: [matt@mattlaptop2 daemon-log-paths]$ pwd /home/matt/test/daemon-log-paths [matt@mattlaptop2 daemon-log-paths]$ ls -l src total 0 -rw------- 1 matt matt 0 2007-07-01 18:06 a [matt@mattlaptop2 daemon-log-paths]$ ls -l daemon/dir/subdir total 0 -rw------- 1 matt matt 0 2007-07-01 18:06 b [matt@mattlaptop2 daemon-log-paths]$ ~/rsync/rsync/rsync -rt --del src/ rsync://user@localhost:3142/module/subdir/ Password: [matt@mattlaptop2 daemon-log-paths]$ The resulting rsyncd.log was: 2007/07/01 21:04:23 [8458] rsyncd version 3.0.0cvs starting, listening on port 3142 2007/07/01 21:05:17 [8499] connect from localhost (127.0.0.1) 2007/07/01 21:05:18 [8499] rsync to module/subdir/ from user@localhost (127.0.0.1) 2007/07/01 21:05:18 [8499] receiving file list 2007/07/01 21:05:18 [8499] *deleting me/matt/test/daemon-log-paths/daemon/dir/subdir/b 2007/07/01 21:05:18 [8499] .d..t...... me/matt/test/daemon-log-paths/daemon/dir/subdir/. 2007/07/01 21:05:18 [8499] >f+++++++++ me/matt/test/daemon-log-paths/daemon/dir/subdir/a 2007/07/01 21:05:18 [8499] sent 96 bytes received 183 bytes total size 0 I expected the logged paths to be relative to the root of the module as per Wayne's remarks at http://lists.samba.org/archive/rsync/2007-June/017896.html , but instead they are absolute paths missing the first few characters. The trouble is that rsync sets module_dirlen to the length of the module path as given in rsyncd.conf at line 371 of clientserver.c but then uses it as an index into curr_dir at line 535 of log.c . curr_dir begins with the absolute, symlink-free path of the module, but if the path in rsyncd.conf is relative or uses symlinks, skipping its length in curr_dir is meaningless. To fix the bug, rsync needs to set module_dirlen to the length of its current directory right after it chdirs into the module. -- 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-Jul-02 02:01 UTC
DO NOT REPLY [Bug 4757] Daemon mis-logs paths if module path in rsyncd.conf is relative
https://bugzilla.samba.org/show_bug.cgi?id=4757 ------- Comment #1 from wayned@samba.org 2007-07-01 21:02 CST ------- It is not valid for the path to be relative. -- 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-Jul-02 12:14 UTC
DO NOT REPLY [Bug 4757] Daemon mis-logs paths if module path in rsyncd.conf is relative
https://bugzilla.samba.org/show_bug.cgi?id=4757 ------- Comment #2 from hashproduct+rsync@gmail.com 2007-07-02 07:14 CST ------- Bummer. Please document that in the rsyncd.conf man page. -- 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-Jul-14 22:35 UTC
DO NOT REPLY [Bug 4757] Daemon mis-logs paths if module path in rsyncd.conf is relative
https://bugzilla.samba.org/show_bug.cgi?id=4757 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from wayned@samba.org 2007-07-14 17:35 CST ------- I decided to add code to figure out the absolute path of a relative-path module. Should be fixed now. -- 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.
Apparently Analagous Threads
- DO NOT REPLY [Bug 7489] New: rsyncd segfaults using daemon exclude filter
- Pulling multiple sources from a daemon
- rsyncd server daemon not allowing connections
- [Bug 13364] rsyncd clips trims relative symlinks outside of source tree
- rsyncd.conf without --daemon?