[SCM] The rsync repository. - branch b3.0.x updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Mon Sep 6 10:57:45 MDT 2010


The branch, b3.0.x has been updated
       via  c463617 Some quoting fixes/improvements.
       via  6abb59a If we create an off_t type, define SIZEOF_OFF_T.
       via  d79bc5c Fix rsync_xal_set reference in an error.
       via  10cd07c Avoid infinite loop if the file's length is negative. Fixes bug 4664.
      from  62e9eb7 Mention need of wildcard support in make. See bug 7625.

;a=shortlog;h=b3.0.x


- Log -----------------------------------------------------------------
commit c463617443f999befe1b20cc5b3ffb484dee025b
Author: Wayne Davison <wayned at samba.org>
Date:   Mon Sep 6 08:41:46 2010 -0700

    Some quoting fixes/improvements.

commit 6abb59adf61a64a9353c8477bc23a701ba7e139e
Author: Wayne Davison <wayned at samba.org>
Date:   Mon Sep 6 08:25:19 2010 -0700

    If we create an off_t type, define SIZEOF_OFF_T.

commit d79bc5c791f443528405ad112a7aacae1b1655b1
Author: Wayne Davison <wayned at samba.org>
Date:   Mon Sep 6 08:09:20 2010 -0700

    Fix rsync_xal_set reference in an error.

commit 10cd07c22555768819cdc3a00f1c51d3d7d777a7
Author: Wayne Davison <wayned at samba.org>
Date:   Sat Aug 21 11:26:21 2010 -0700

    Avoid infinite loop if the file's length is negative.
    Fixes bug 4664.

-----------------------------------------------------------------------

Summary of changes:
 generator.c |    6 ++++++
 rsync.h     |    2 ++
 support/lsh |    6 +++---
 xattrs.c    |    2 +-
 4 files changed, 12 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/generator.c b/generator.c
index 3467cfa..635fcb9 100644
--- a/generator.c
+++ b/generator.c
@@ -761,6 +761,12 @@ static void sum_sizes_sqroot(struct sum_struct *sum, int64 len)
 	int s2length;
 	int64 l;
 
+	if (len < 0) {
+		/* The file length overflowed our int64 var, so we can't process this file. */
+		sum->count = -1; /* indicate overflow error */
+		return;
+	}
+
 	if (block_size)
 		blength = block_size;
 	else if (len <= BLOCK_SIZE * BLOCK_SIZE)
diff --git a/rsync.h b/rsync.h
index d804d49..5f914d1 100644
--- a/rsync.h
+++ b/rsync.h
@@ -430,6 +430,8 @@ typedef unsigned int mode_t;
 #endif
 #ifndef HAVE_OFF_T
 typedef long off_t;
+#undef SIZEOF_OFF_T
+#define SIZEOF_OFF_T SIZEOF_LONG
 #endif
 #ifndef HAVE_SIZE_T
 typedef unsigned int size_t;
diff --git a/support/lsh b/support/lsh
index 2017126..65488dc 100755
--- a/support/lsh
+++ b/support/lsh
@@ -13,7 +13,7 @@ do_cd=y # Default path is user's home dir, just like ssh.
 while : ; do
     case "$1" in
     -l) user="$2"; shift; shift ;;
-    -l*) user=`echo $1 | sed 's/^-l//'`; shift ;;
+    -l*) user=`echo "$1" | sed 's/^-l//'`; shift ;;
     --no-cd) do_cd=n; shift ;;
     -*) shift ;;
     localhost) shift; break ;;
@@ -22,9 +22,9 @@ while : ; do
 done
 
 if [ "$user" ]; then
-    prefix="sudo -H -u $user"
+    prefix="sudo -H -u '$user'"
     if [ $do_cd = y ]; then
-	home=`perl -e "print((getpwnam("$user"))[7])"`
+	home=`perl -e "print((getpwnam('$user'))[7])"`
 	# Yeah, this may fail, but attempts to get sudo to cd are harder.
 	cd $home
     fi
diff --git a/xattrs.c b/xattrs.c
index 773ac0d..a0b2583 100644
--- a/xattrs.c
+++ b/xattrs.c
@@ -857,7 +857,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
 		if (i == xalp->count) {
 			if (sys_lremovexattr(fname, name) < 0) {
 				rsyserr(FERROR_XFER, errno,
-					"rsync_xal_clear: lremovexattr(\"%s\",\"%s\") failed",
+					"rsync_xal_set: lremovexattr(\"%s\",\"%s\") failed",
 					fname, name);
 				ret = -1;
 			} else /* make sure caller sets mtime */


-- 
The rsync repository.


More information about the rsync-cvs mailing list