Re: rsync 2.6.1 released (including security note)
On Sat 01 May 2004, Albert Chin wrote: Anyone ever come up with a patch for the chroot fix against 2.5? The patch below should do it. Note that line numbers may be off. Paul Slootman --- rsync-2.5.5-orig/options.c 2002-03-19 21:16:42.0 +0100 +++ rsync-2.5.5/options.c 2004-04-28 17:18:49.0 +0200 @@ -21,6 +21,8 @@ #include rsync.h #include popt.h +extern int sanitize_paths; + int make_backups = 0; /** @@ -767,6 +769,15 @@ if (opt_ignore_existing am_sender) args[ac++] = --ignore-existing; + if (sanitize_paths) { + if (tmpdir) + sanitize_path(tmpdir, NULL); + if (compare_dest) + sanitize_path(compare_dest, NULL); + if (backup_dir) + sanitize_path(backup_dir, NULL); + } + if (tmpdir) { args[ac++] = --temp-dir; args[ac++] = tmpdir; -- 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 2.6.1 released (including security note)
On Sun, May 02, 2004 at 01:15:57PM +0200, Paul Slootman wrote: The patch below should do it. Note that line numbers may be off. You placed the extra sanitize calls in server_options() instead of parse_arguments(). Since the args need to be sanitized on reception, the latter function is the right spot. Attached is a patch generated from 2.5.7. ..wayne.. --- rsync-2.5.7/options.c 2003-01-27 19:11:57.0 -0800 +++ options.c 2004-05-02 09:27:10.0 -0700 @@ -21,6 +21,8 @@ #include rsync.h #include popt.h +extern int sanitize_paths; + int make_backups = 0; /** @@ -615,6 +617,15 @@ int parse_arguments(int *argc, const cha } } + if (sanitize_paths) { + if (tmpdir) + sanitize_path(tmpdir, NULL); + if (compare_dest) + sanitize_path(compare_dest, NULL); + if (backup_dir) + sanitize_path(backup_dir, NULL); + } + if (write_batch read_batch) { snprintf(err_buf,sizeof(err_buf), write-batch and read-batch can not be used together\n); -- 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: 2.6.2 patch for AIX
On Sat, May 01, 2004 at 09:27:37PM -0500, Albert Chin wrote: The IBM C compiler on AIX doesn't like a trailing comma after the last enum constant. Thanks -- I've patched the version in CVS. ..wayne.. -- 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: install-strip issue
On Sat, May 01, 2004 at 10:59:23PM +, Christian Weisgerber wrote: Renaming the variable will take care of this. Seems like a reasonable change. Thanks -- I've checked it in. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
rsync 2.6.2: clean up compilation warnings
While building rsync 2.6.2 on my x86 Linux system using gcc 3.3.3, I observed a number of warnings from popt.c/h about ignoring qualifiers on return types. On further investigation, it looks like a few functions are declaring their return types as const char * const. The first const is appropriate (the chars pointed to by this pointer are const), but the second is bogus (the value returned is const, which is meaningless since the value is copied) and is the cause of the warnings. The patch below removes the spurious consts and silences the warnings. Jeremy diff -uwr rsync-2.6.2-old/popt/popt.c rsync-2.6.2/popt/popt.c --- rsync-2.6.2-old/popt/popt.c 2004-01-27 10:27:05.0 -0600 +++ rsync-2.6.2/popt/popt.c 2004-05-02 13:22:53.0 -0500 @@ -1128,7 +1128,7 @@ /[EMAIL PROTECTED]@*/ } -const char *const poptStrerror(const int error) +const char * poptStrerror(const int error) { switch (error) { case POPT_ERROR_NOARG: diff -uwr rsync-2.6.2-old/popt/popt.h rsync-2.6.2/popt/popt.h --- rsync-2.6.2-old/popt/popt.h 2004-01-27 10:27:05.0 -0600 +++ rsync-2.6.2/popt/popt.h 2004-05-02 13:23:01.0 -0500 @@ -373,7 +373,7 @@ * @return error string */ /[EMAIL PROTECTED]@*/ -/[EMAIL PROTECTED]@*/ const char *const poptStrerror(const int error) +/[EMAIL PROTECTED]@*/ const char * poptStrerror(const int error) /[EMAIL PROTECTED]/; /[EMAIL PROTECTED]@*/ diff -uwr rsync-2.6.2-old/popt/popthelp.c rsync-2.6.2/popt/popthelp.c --- rsync-2.6.2-old/popt/popthelp.c 2004-01-27 10:27:05.0 -0600 +++ rsync-2.6.2/popt/popthelp.c 2004-05-02 13:23:52.0 -0500 @@ -63,7 +63,7 @@ /** * @param tableoption(s) */ -/[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ static const char *const +/[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ static const char * getTableTranslationDomain(/[EMAIL PROTECTED]@*/ const struct poptOption *table) /[EMAIL PROTECTED]/ { @@ -81,7 +81,7 @@ * @param opt option(s) * @param translation_domain translation domain */ -/[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ static const char *const +/[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ static const char * getArgDescrip(const struct poptOption * opt, /[EMAIL PROTECTED]@*/ /* FIX: wazzup? */ /[EMAIL PROTECTED]@*/ UNUSED(const char * translation_domain)) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
ssh+rsync to Windows
After doing a lot of reading and search this lists' archieve I'm stuck! I'm trying to run a seemingly simply rsync from my RH9 box to an XP desktop. I have rsync 2.5.7 on the RH9 and rsync 2.6.0 on XP with Cygwin. ssh is working using key authentication. Anonymous rsync to XP works from RH9. I'm trying to get the rsync to run over ssh. Here's what I've tried. First attempt My /etc/rsyncd.conf file on XP looks like: use chroot = false strict modes = false log file = /var/log/rsyncd.log transfer logging = true pid file = /var/run/rsyncd.pid [util] path /cygdrive/e/util comment = various utilities The man page on rsync states: RUNNING AN RSYNC SERVER An rsync server is configured using a config file. Please see the rsyncd.conf(5) man page for more information. By default the configu- ration file is called /etc/rsyncd.conf, unless rsync is running over a remote shell program and is not running as root; in that case, the default name is rsyncd.conf in the current directory on the remote com- puter (typically $HOME). So I copy /etc/rsyncd.conf to /home/Administrator on XP From the rh9 box I ran: [EMAIL PROTECTED] root]# rsync -n -avvv --rsh ssh [EMAIL PROTECTED]:util/ xxx/ opening connection using ssh -l Administrator xp rsync --server --sender -vvvnlogDtpr . util/ receiving file list ... server_sender starting pid=2864 link_stat /home/Administrator/util/. failed: No such file or directory received 0 names done recv_file_list done client: nothing to do: perhaps you need to specify some filenames or the --recursive option? rsync error: some files could not be transferred (code 23) at main.c(636) _exit_cleanup(code=0, file=main.c, line=636): about to call exit(23) It appears that rsync is not reading the $HOME/rsyncd.conf. I've checked the permissions of $HOME/rsyncd.conf and the Administrator owns the file w/ read write access. Does any have any experience or explanation for this?? Second attempt- I then tried to setup a root user in the following manner. In /etc/passwd I duplicated the Administrator line and changed the name to root and the UID:GID to 0:0 like this: root:unused_by_nt/2000/xp:0:0:U-TOY\Administrator,S-1-5-21-583907252-789336058-1060284298-500:/home/Administrator:/bin/bash Then in /etc/group I duplicaetd the Administrators line and changed the name to root and the GID to 0 like this: root:S-1-5-32-544:0: I could then run ssh [EMAIL PROTECTED] and login without any problems. I then ran : [EMAIL PROTECTED] root]# rsync -n -avvv --rsh ssh [EMAIL PROTECTED]:util/ xxx/ opening connection using ssh -l root xp rsync --server --sender -vvvnlogDtpr . util/ setgid: Invalid argument rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(165) _exit_cleanup(code=12, file=io.c, line=165): about to call exit(12) So at this point I'm stuck! If anyone has any ideas, experience, or insights with either one of these scenarios, I would appreciate the help. -- Scott LeFevre -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
SEGV on FreeBSD 4.8-STABLE with 2.6.2
I'm getting a SEGV on a FreeBSD 4.8-STABLE box. The client is Solaris 9/SPARC. Both boxes run 2.6.2. The command I'm running is: $ rsync -arHRv --numeric-ids --delete --exclude=/opt/dist/cdrom \ [paths] [server]:[path] If I whittle down what appears in [paths], then it works. $ gdb rsync rsync.core gdb bt #0 0x280faf0d in strncmp () from /usr/lib/libc.so.4 #1 0x7 in ?? () #2 0x80597f7 in send_file_name (f=-1, flist=0x808a100, fname=0xbfbfe994 etc/opt/TWWfsw, recursive=1, base_flags=1) at flist.c:929 #3 0x805a2fc in send_file_list (f=-1, argc=0, argv=0xbfbffa44) at flist.c:1178 #4 0x804c0ff in delete_files (flist=0x808a0c0) at receiver.c:102 #5 0x805177e in do_recv (f_in=0, f_out=1, flist=0x808a0c0, local_name=0x0) at main.c:426 #6 0x8051bae in do_server_recv (f_in=0, f_out=1, argc=1, argv=0x808a064) at main.c:547 #7 0x8051ca9 in start_server (f_in=0, f_out=1, argc=2, argv=0x808a060) at main.c:577 #8 0x8052a89 in main (argc=2, argv=0x808a060) at main.c:1041 Based on #2, seems the SEGV is in make_file but #1 doesn't show the function name and line number. Odd. -- albert chin ([EMAIL PROTECTED]) -- 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: ssh+rsync to Windows
On Sun, May 02, 2004 at 01:53:48PM -0500, Scott LeFevre wrote: It appears that rsync is not reading the $HOME/rsyncd.conf. That's because you didn't tell rsync to talk to a daemon. Switch from single-colon to double-colon syntax if you want to do that. ..wayne.. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
(fwd from psdasilva@esoterica.pt) rsync: Request for a feature
- Forwarded message from Paulo da Silva [EMAIL PROTECTED] - From: Paulo da Silva [EMAIL PROTECTED] Subject: rsync: Request for a feature Date: Sun, 02 May 2004 17:09:11 +0100 To: [EMAIL PROTECTED] User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040317 X-Spam-Status: No, hits=-0.9 required=3.2 tests=BAYES_10 autolearn=ham version=2.63 Hi. 1st. of all thank you for mantaining this very useful program. It helps me a lot in a lot of tasks that would be otherwise very tedious and time consuming. However, I think that a small feature could make it yet more powerfull when used as a backup tool. The idea was to have a switch so that files could be kept compressed at the destination. These compressed files could be then restored the same way specifing a switch telling that source files are to be uncompressed. Files with known extensions (.gz, .zip, ...) should not be compressed/uncompressed. All files must keep the original names unchanged. Ex. export RSYNC_COMPRESSED_EXTS=.gz .zip ... ;# Extensions from files not to be compressed Backup: rsync -av --delete --zip MyDir/ BackupDir Restore: rsync -av --delete --unzip BackupDir/ MyDir This is only a sugestion. You may find a better solution. Thank you. Paulo da Silva - End forwarded message - -- Martin signature.asc Description: Digital 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: SEGV on FreeBSD 4.8-STABLE with 2.6.2
On Sun, May 02, 2004 at 03:33:03PM -0500, Albert Chin wrote: I'm getting a SEGV on a FreeBSD 4.8-STABLE box. The client is Solaris 9/SPARC. Both boxes run 2.6.2. The command I'm running is: $ rsync -arHRv --numeric-ids --delete --exclude=/opt/dist/cdrom \ [paths] [server]:[path] If I whittle down what appears in [paths], then it works. When the --delete option iterates over all the specified [paths] it clears the delete-file_list after each one. This makes the lastdir pointer no longer valid. The appended patch fixes this bug and also a similar bug that could affect the batch code. Thanks for the report. ..wayne.. --- flist.c 29 Apr 2004 19:37:15 - 1.218 +++ flist.c 3 May 2004 01:24:10 - 1.220 @@ -539,6 +539,7 @@ void receive_file_entry(struct file_stru rdev_major = 0; uid = 0, gid = 0; *lastname = '\0'; + lastdir_len = -1; return; } @@ -745,7 +746,7 @@ struct file_struct *make_file(char *fnam char *basename, *dirname, *bp; unsigned short flags = 0; - if (!flist) /* lastdir isn't valid if flist is NULL */ + if (!flist || !flist-count)/* Ignore lastdir when invalid. */ lastdir_len = -1; if (strlcpy(thisname, fname, sizeof thisname) -- 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: SEGV on FreeBSD 4.8-STABLE with 2.6.2
On Sun, May 02, 2004 at 06:26:16PM -0700, Wayne Davison wrote: On Sun, May 02, 2004 at 03:33:03PM -0500, Albert Chin wrote: I'm getting a SEGV on a FreeBSD 4.8-STABLE box. The client is Solaris 9/SPARC. Both boxes run 2.6.2. The command I'm running is: $ rsync -arHRv --numeric-ids --delete --exclude=/opt/dist/cdrom \ [paths] [server]:[path] If I whittle down what appears in [paths], then it works. When the --delete option iterates over all the specified [paths] it clears the delete-file_list after each one. This makes the lastdir pointer no longer valid. The appended patch fixes this bug and also a similar bug that could affect the batch code. Thanks. This fixes the problem. -- albert chin ([EMAIL PROTECTED]) -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
gzip-rsyncable.diff
Hi, I currently create large (500MB-2.5GB) tar.gz files that I am trying to get to rsync better. After doing some research by reading a lecture presented by the original author of rsync and googling the list archives, I have concluded that the gzip-rsyncable.diff is the best way to get gzipped files to rsync nicely. The only version I could find of this patch is available here: http://rsync.samba.org/ftp/unpacked/rsync/patches/gzip-rsyncable.diff Since the patch was created a while ago and is not part of the default gzip yet, I was wondering if rsync users on this list had any opinions on the patch regarding its effectiveness and/or any problems it may cause with gzip. Is this patch the way to go, or am I better off trying out a different compression algorithm (not gzip related) altogether? Thanks, Mike -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
CVS update: rsync/patches
Date: Sun May 2 16:24:36 2004 Author: wayned Update of /data/cvs/rsync/patches In directory dp.samba.org:/tmp/cvs-serv9717/patches Added Files: checksum-seed.diff Log Message: Craig Barratt's --checksum-seed option. Revisions: checksum-seed.diff NONE = 1.1 http://www.samba.org/cgi-bin/cvsweb/rsync/patches/checksum-seed.diff?rev=1.1 ___ rsync-cvs mailing list [EMAIL PROTECTED] http://lists.samba.org/mailman/listinfo/rsync-cvs
CVS update: rsync
Date: Sun May 2 16:34:33 2004 Author: wayned Update of /data/cvs/rsync In directory dp.samba.org:/tmp/cvs-serv12628 Modified Files: rsync.h Log Message: Got rid of trailing comma in an enum. Revisions: rsync.h 1.199 = 1.200 http://www.samba.org/cgi-bin/cvsweb/rsync/rsync.h.diff?r1=1.199r2=1.200 ___ rsync-cvs mailing list [EMAIL PROTECTED] http://lists.samba.org/mailman/listinfo/rsync-cvs
CVS update: rsync
Date: Sun May 2 16:52:52 2004 Author: wayned Update of /data/cvs/rsync In directory dp.samba.org:/tmp/cvs-serv16143 Modified Files: Makefile.in Log Message: Renamed variable STRIP to INSTALL_STRIP to avoid an accidental match with an environment variable in OpenBSD. Revisions: Makefile.in 1.98 = 1.99 http://www.samba.org/cgi-bin/cvsweb/rsync/Makefile.in.diff?r1=1.98r2=1.99 ___ rsync-cvs mailing list [EMAIL PROTECTED] http://lists.samba.org/mailman/listinfo/rsync-cvs
CVS update: rsync
Date: Mon May 3 01:18:07 2004 Author: wayned Update of /data/cvs/rsync In directory dp.samba.org:/tmp/cvs-serv15304 Modified Files: flist.c Log Message: Fixed crash bug that can affect --delete in certain circumstances. Revisions: flist.c 1.218 = 1.219 http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c.diff?r1=1.218r2=1.219 ___ rsync-cvs mailing list [EMAIL PROTECTED] http://lists.samba.org/mailman/listinfo/rsync-cvs