*****SPAM***** I: rsync --delete is unable to handle broken symlinks properly
SPAM: Start SpamAssassin results -- SPAM: This mail is probably spam. The original message has been altered SPAM: so you can recognise or block similar unwanted mail in future. SPAM: See http://spamassassin.org/tag/ for more details. SPAM: SPAM: Content analysis details: (5 hits, 5 required) SPAM: Hit! (2.0 points) Received via a relay in relays.osirusoft.com SPAM:[RBL check: found 235.250.118.62.relays.osirusoft.com., type: 127.0.0.4] SPAM: Hit! (3.0 points) DNSBL: sender is Confirmed Spam Source SPAM: SPAM: End of SpamAssassin results - --lCAWRPmW1mITcIfM Content-Type: multipart/mixed; boundary=tjCHc7DPkfUGtrlw Content-Disposition: inline --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings! rsync-2.5.5 is unable to remove broken symlinks properly when --delete option is used. The testcase is attached. -- ldv --tjCHc7DPkfUGtrlw Content-Type: application/x-sh Content-Disposition: attachment; filename=rsync-test_broken_symlinks.sh Content-Transfer-Encoding: quoted-printable #!/bin/sh -e=0A=0Amkdir -v src dst=0Aln -sv missing dst/broken=0A=0Arsync -= va --delete src/ dst/=0Aif test -L dst/broken; then=0A echo 'TEST FAILED: r= sync is unable to remove broken symlink.' 2=0Aexit 1=0Afi=0A --tjCHc7DPkfUGtrlw-- --lCAWRPmW1mITcIfM Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9M/9v9viEa8HiNCkRAiZsAJ9poO8/ibIhQm99JR11zrUSlSU75wCdH5R2 s68YCq5sCq2ih28hOExSQdI= =6Srk -END PGP SIGNATURE- --lCAWRPmW1mITcIfM-- -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Re: 2.6.2 rsync --daemon is not working for me
On Tue, Sep 28, 2004 at 08:55:33AM -0700, Wayne Davison wrote: On Tue, Sep 21, 2004 at 12:37:55PM +0500, Sergey Golovin wrote: I'm unable to write with remote rsync in daemon mode. The strace you included shows that it is the fork() call that is returning -1 (EAGAIN). So, you need to figure out why fork() isn't working -- e.g. what resource it thinks is temporarily unavailable. This problem appeared to be ALT Linux specific. One of our hardening patches introduced regression in recv mode. Here is hopefully fixed version of that patch, just in case: https://bugzilla.altlinux.org/attachment.cgi?id=619action=view -- ldv pgpEvOey24Uyb.pgp Description: PGP signature -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: patch for replacing non-printable chars in filenames
Hi, On Tue, Nov 23, 2004 at 05:29:57PM +0100, Paul Slootman wrote: There's a bug reported in Debian about the tty being screwed up by wierd filenames, see http://bugs.debian.org/bug=242300 On the one hand, find will also do this. On the other hand, ls will replace such chars with a question mark. Upon inspection, it appears to be fairly simple to also do this in rsync (in the rwrite() function). 1. find's output is mostly for another program's input, not for tty. 2. ls does --hide-control-chars by default only if isatty (STDOUT_FILENO). Here's a patch. Opinions? Perhaps don't do it unconditionally, i.e. offer some way to turn it off? I'd make it like ls, i.e. when descriptor is a tty; also I'd add some option to enforce --hide-control-chars also for non-tty. -- ldv pgpQQas3RA4cg.pgp Description: PGP signature -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and broken symlinks
Hi, On Thu, Dec 16, 2004 at 01:07:35AM -0800, Wayne Davison wrote: On Thu, Dec 16, 2004 at 01:38:42PM +0500, Yakov Hrebtov wrote: where is the message -- skipping non-regular file broken-link? I can only imagine that this is some kind of OS misfeature. Try running rsync under something like strace -f (or your OS's equivalent) and see what is going wrong with the system calls. If you see readlink() return -1 for the file, that would cause rsync to skip it as non-existent. Here is strace log for this case: $ strace -fF -e trace=readlink,access rsync -a src/ dst/ Process 1328 attached [pid 1328] --- SIGSTOP (Stopped (signal)) @ 0 (0) --- [pid 1327] access(., R_OK) = 0 [pid 1327] readlink(broken-link, missing, 4095) = 7 [pid 1327] access(broken-link, R_OK) = -1 ENOENT (No such file or directory) Process 1329 attached [pid 1329] --- SIGSTOP (Stopped (signal)) @ 0 (0) --- [pid 1329] --- SIGUSR2 (User defined signal 2) @ 0 (0) --- Process 1329 detached [pid 1328] --- SIGCHLD (Child exited) @ 0 (0) --- Process 1328 detached --- SIGCHLD (Child exited) @ 0 (0) --- -- ldv pgpiwfRhi6aXd.pgp Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and broken symlinks
Hi, On Thu, Dec 16, 2004 at 09:02:24AM -0800, Wayne Davison wrote: On Thu, Dec 16, 2004 at 02:34:02PM +0500, Yakov Hrebtov wrote: You see, readlink call is successful. But rsync then trying to access the referent of symlink... But referent doesnt exist. The only time that rsync calls access() on the files it is sending is when the ignore nonreadable parameter is set in a rsyncd.conf file (or if the default for this value was changed in the loadparam.c file from the normal value of False). So, if you're really doing a copy from an rsync daemon, check that daemon's setting of the ignore nonreadable parameter. If you're not talking to a daemon, you'll have to figure out how the value of sDefault.ignore_nonreadable got to be non-zero. I see, it happens due to the patched loadparam.c; I'll change that back. Thanks, -- ldv pgpSOQ84u90AT.pgp Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync and broken symlinks
Hi, On Thu, Dec 16, 2004 at 10:27:20PM +0100, Paul Slootman wrote: On Thu 16 Dec 2004, Wayne Davison wrote: As for the fix, one could argue that ignore nonreadable has a bug in it when dealing with symlinks -- if readlink() worked, the symlink was readable, so there is no need to call access() on it. The appended patch changes this so that rsync doesn't ever use access() on a symlink. Surely good fix, thanks. Just to be certain - readlink() is only called if --copy-links is NOT specified? In that case, I agree. Yes, if copy_links is set, then stat() is called instead. -- ldv pgpVoXvOUI5lz.pgp Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Restricting rsync over ssh
Hi, On Tue, Dec 28, 2004 at 04:53:45PM +0100, Bob wrote: I have very special needs and i wanted to use rsync over ssh. I don't know if a solution already exists for what i want to do. I want to provide rsync over ssh to my users. Howevern i want to have the following limitations : 1. No shell access 2. Limitting users to their home directories I was thinking to the folowing solution, but i don't know if it is secure enough : Create a dummy-shell sor ssh login that only allow the rsync --server --sender command. Then i get the path of the wanted files, and i appened it to the home directory of the user. Ex : the user requests /test, i give him : /home/usrname/test Then i uses the realpath function to canonicalize the path and i check that it really begins with /home/usrname to prevent users from getting files outside of their home directory. I execute the rsync command with the new built path... I think this should work but i would like to know what do you think about security. Use chroot(2) to get more robust solution. See also ftp://ftp.altlinux.org/pub/people/ldv/rshell/ -- ldv pgp4MXcXoSFp8.pgp Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Restricting rsync over ssh
On Tue, Dec 28, 2004 at 05:24:27PM +0100, Bob wrote: I would like to avoid using chroot because it implies my dummy-shell must run in suid root. Furthermore, it forces to create a jail with the binaries and libraries inside. I was thinking to this solution to avoid doing this. Is there any reason to avoid this jail solution? Do you think there are some security issues using realpath instead of chroot ? Yes, realpath introduces time-of-check-time-of-use race condition: during the check your canonical path is fine, then user changes some symlinks (using shell or via rsync) and gets out of his home directory. -- ldv pgpHhe5LoP5Cs.pgp Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsync 2.6.6pre1 released (ALERT: info on zlib security flaw)
On Fri, Jul 08, 2005 at 02:10:19PM -0700, Wayne Davison wrote: [I neglected to cross-post this from the rsync-announce list to the regular rsync mailing list when I sent this out yesterday.] There has been some talk about a zlib security problem that could let someone overflow the buffers in the zlib decompression code, potentially allowing someone to craft an exploit to execute arbitrary code. Since this is a decompression bug, this can only affect an rsync daemon if it allows uploads with the --compress option enabled. This bug (CAN-2005-2096) in zlib's inflate_table() is zlib-1.2.x only, zlib-1.1.4 does not contain that code and therefore not vulnerable. That is, rsync-2.6.5 is not vulnerable. -- ldv pgpjnbXsf8RpX.pgp Description: PGP signature -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html