23210083 Upgrade rsync to 3.1.2 s11u3-sru
authorjulian.yuen@oracle.com <julian.yuen@oracle.com>
Wed, 27 Jul 2016 11:41:47 -0700
branchs11u3-sru
changeset 6487 6e536698eac2
parent 6485 ece7ffdcd26b
child 6494 220a038bdfd5
23210083 Upgrade rsync to 3.1.2
components/rsync/Makefile
components/rsync/patches/15730984.patch
components/rsync/patches/rsync.1.patch
components/rsync/patches/rsyncd.conf.5.patch
components/rsync/patches/z21762187.patch
--- a/components/rsync/Makefile	Wed Jul 27 01:12:27 2016 -0700
+++ b/components/rsync/Makefile	Wed Jul 27 11:41:47 2016 -0700
@@ -20,22 +20,21 @@
 #
 
 #
-# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
-
 COMPONENT_NAME=		rsync
-COMPONENT_VERSION=	3.1.1
+COMPONENT_VERSION=	3.1.2
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_PROJECT_URL=	http://rsync.samba.org/
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621
+    sha256:ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2
 COMPONENT_ARCHIVE_URL=	http://rsync.samba.org/ftp/rsync/src/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/rsync
 
-TPNO=			21574
+TPNO=			28346
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
--- a/components/rsync/patches/15730984.patch	Wed Jul 27 01:12:27 2016 -0700
+++ b/components/rsync/patches/15730984.patch	Wed Jul 27 11:41:47 2016 -0700
@@ -30,23 +30,16 @@
  
  extern int am_server;
  extern int am_daemon;
-@@ -134,7 +135,7 @@
- 		if (DEBUG_GTE(EXIT, 2)) {
- 			rprintf(FINFO,
- 				"[%s] _exit_cleanup(code=%d, file=%s, line=%d): entered\n",
--				who_am_i(), code, file, line);
-+				who_am_i(), code, basename((char *)file), line);
- 		}
- 
- 		/* FALLTHROUGH */
-@@ -233,7 +234,7 @@
+--- Originals/cleanup.c	2016-07-13 15:37:38.279157151 -0700
++++ rsync-3.1.2/cleanup.c	2016-07-13 15:42:51.107529619 -0700
+@@ -235,7 +235,7 @@
  			rprintf(FINFO,
  				"[%s] _exit_cleanup(code=%d, file=%s, line=%d): "
- 				"about to call exit(%d)\n",
--				who_am_i(), first_code, exit_file, exit_line, exit_code);
-+				who_am_i(), first_code, basename((char *)exit_file), exit_line, exit_code);
+ 				"about to call exit(%d)%s\n",
+-				who_am_i(), first_code, exit_file, exit_line, exit_code,
++				who_am_i(), first_code, basename((char*)exit_file), exit_line, exit_code,
+ 				dry_run ? " (DRY RUN)" : "");
  		}
- 
  		/* FALLTHROUGH */
 --- rsync-3.1.0/t_stub.c.orig	Tue Jun 11 18:06:53 2013
 +++ rsync-3.1.0/t_stub.c	Mon Mar 17 14:58:24 2014
--- a/components/rsync/patches/rsync.1.patch	Wed Jul 27 01:12:27 2016 -0700
+++ b/components/rsync/patches/rsync.1.patch	Wed Jul 27 11:41:47 2016 -0700
@@ -2630,3 +2630,14 @@
  .PP 
  .SH "AUTHOR"
  
+--- Originals/rsync.1	2016-07-21 14:45:17.710613575 -0700
++++ rsync-3.1.2/rsync.1	2016-07-21 14:46:22.376038151 -0700
+@@ -999,7 +999,7 @@
+ but does not conflict with \fB\-\-sparse\fP (since it is always extending a
+ file's length).
+ .IP 
+-The use of \fB\-\-append\fP can be dangerous if you aren\(cq\&t 100% sure that the files
++The use of \fB\-\-append\fP can be dangerous if you aren't 100% sure that the files
+ that are longer have only grown by the appending of data onto the end.  You
+ should thus use include/exclude/filter rules to ensure that such a transfer is
+ only affecting files that you know to be growing via appended data.
--- a/components/rsync/patches/rsyncd.conf.5.patch	Wed Jul 27 01:12:27 2016 -0700
+++ b/components/rsync/patches/rsyncd.conf.5.patch	Wed Jul 27 11:41:47 2016 -0700
@@ -125,21 +125,23 @@
  if the module is not read\-only).
  .IP 
  When this parameter is enabled, rsync will not attempt to map users and groups
-@@ -231,12 +231,12 @@
- used by these library functions (traditionally /etc/passwd and
- /etc/group, but perhaps additional dynamic libraries as well).
+--- Originals/rsyncd.conf.5	2016-07-13 16:09:42.215845487 -0700
++++ rsync-3.1.2/rsyncd.conf.5	2016-07-13 16:53:18.177437237 -0700
+@@ -222,12 +222,12 @@
+ being enabled (disabling name lookups).  See below for what a chroot needs in
+ order for name lookups to succeed.
  .IP 
--If you copy the necessary resources into the module\(cq\&s chroot area, you
+-If you copy library resources into the module\(cq\&s chroot area, you
 -should protect them through your OS\(cq\&s normal user/group or ACL settings (to
 -prevent the rsync module\(cq\&s user from being able to change them), and then
 -hide them from the user\(cq\&s view via \(dq\&exclude\(dq\& (see how in the discussion of
-+If you copy the necessary resources into the module's chroot area, you
++If you copy library resources into the module's chroot area, you
 +should protect them through your OS's normal user/group or ACL settings (to
 +prevent the rsync module's user from being able to change them), and then
 +hide them from the user's view via "exclude" (see how in the discussion of
  that parameter).  At that point it will be safe to enable the mapping of users
--and groups by name using the \(dq\&numeric ids\(dq\& daemon parameter (see below).
-+and groups by name using the "numeric ids" daemon parameter (see below).
+-and groups by name using this \(dq\&numeric ids\(dq\& daemon parameter.
++and groups by name using this "numeric ids" daemon parameter.
  .IP 
  Note also that you are free to setup custom user/group information in the
  chroot area that is different from your normal system.  For example, you
@@ -798,3 +800,42 @@
  .PP 
  .nf 
      &include /path/rsyncd.d 
+--- Originals/rsyncd.conf.5	2016-07-21 14:55:35.736602459 -0700
++++ rsync-3.1.2/rsyncd.conf.5	2016-07-21 14:57:35.408104081 -0700
+@@ -85,7 +85,7 @@
+ .PP 
+ The first parameters in the file (before a [module] header) are the
+ global parameters.
+-Rsync also allows for the use of a \(dq\&[global]\(dq\& module name to indicate the
++Rsync also allows for the use of a "global" module name to indicate the
+ start of one or more global\-parameter sections (the name must be lower case).
+ .PP 
+ You may also include any module parameters in the global part of the
+@@ -155,7 +155,7 @@
+ name contains whitespace, each internal sequence of whitespace will be
+ changed into a single space, while leading or trailing whitespace will be
+ discarded.
+-Also, the name cannot be \(dq\&global\(dq\& as that exact name indicates that
++Also, the name cannot be "global" as that exact name indicates that
+ global parameters follow (see above).
+ .PP 
+ As with GLOBAL PARAMETERS, you may use references to environment variables in
+@@ -218,7 +218,7 @@
+ The default for "use chroot" is true, and is the safer choice (especially
+ if the module is not read\-only).
+ .IP 
+-When this parameter is enabled, the \(dq\&numeric\-ids\(dq\& option will also default to
++When this parameter is enabled, the "numeric-ids" option will also default to
+ being enabled (disabling name lookups).  See below for what a chroot needs in
+ order for name lookups to succeed.
+ .IP 
+@@ -241,7 +241,7 @@
+ the \fB\-\-numeric\-ids\fP command\-line option.  By default, this parameter is
+ enabled for chroot modules and disabled for non\-chroot modules.
+ Also keep in mind that uid/gid preservation requires the module to be
+-running as root (see \(dq\&uid\(dq\&) or for \(dq\&fake super\(dq\& to be configured.
++running as root (see "uid") or for "fake super" to be configured.
+ .IP 
+ A chroot\-enabled module should not have this parameter enabled unless you've
+ taken steps to ensure that the module has the necessary resources it needs
+
--- a/components/rsync/patches/z21762187.patch	Wed Jul 27 01:12:27 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-Fix for CVE-2014-9512 from upstream at https://rsync.samba.org 
-
---- rsync-3.1.1/flist.c.old	2015-09-04 14:58:04.610748249 -0700
-+++ rsync-3.1.1/flist.c	2015-09-04 15:02:22.838695225 -0700
-@@ -2435,8 +2435,9 @@
- 	return flist;
- }
- 
--struct file_list *recv_file_list(int f)
-+struct file_list *recv_file_list(int f, int dir_ndx)
- {
-+       const char *good_dirname = NULL;
- 	struct file_list *flist;
- 	int dstart, flags;
- 	int64 start_read;
-@@ -2491,6 +2492,23 @@
- 
- 		flist_expand(flist, 1);
- 		file = recv_file_entry(f, flist, flags);
-+               if (inc_recurse) {
-+                       static const char empty_dir[] = "\0";
-+                       const char *cur_dir = file->dirname ? file->dirname : empty_dir;
-+                       if (relative_paths && *cur_dir == '/')
-+                               cur_dir++;
-+                       if (cur_dir != good_dirname) {
-+                               const char *d = dir_ndx >= 0 ? f_name(dir_flist->files[dir_ndx], NULL) : empty_dir;
-+                               if (strcmp(cur_dir, d) != 0) {
-+                                       rprintf(FERROR,
-+                                               "ABORTING due to invalid dir prefix from sender: %s (should be: %s)\n",
-+                                               cur_dir, d);
-+                                       exit_cleanup(RERR_PROTOCOL);
-+                               }
-+                               good_dirname = cur_dir;
-+                       }
-+               }
-+
- 
- 		if (S_ISREG(file->mode)) {
- 			/* Already counted */
-@@ -2615,7 +2633,7 @@
- 			rprintf(FINFO, "[%s] receiving flist for dir %d\n",
- 				who_am_i(), ndx);
- 		}
--		flist = recv_file_list(f);
-+		flist = recv_file_list(f, ndx);
- 		flist->parent_ndx = ndx;
- 	}
- }
---- rsync-3.1.1/io.c.old	2015-09-04 14:58:15.706192874 -0700
-+++ rsync-3.1.1/io.c	2015-09-04 15:05:23.471180002 -0700
-@@ -1685,7 +1685,7 @@
- 				rprintf(FINFO, "[%s] receiving flist for dir %d\n",
- 					who_am_i(), ndx);
- 			}
--			flist = recv_file_list(iobuf.in_fd);
-+			flist = recv_file_list(iobuf.in_fd, ndx);
- 			flist->parent_ndx = ndx;
- #ifdef SUPPORT_HARD_LINKS
- 			if (preserve_hard_links)
---- rsync-3.1.1/main.c.old	2015-09-04 14:58:24.905761717 -0700
-+++ rsync-3.1.1/main.c	2015-09-04 15:07:00.835145092 -0700
-@@ -1010,7 +1010,7 @@
- 		filesfrom_fd = -1;
- 	}
- 
--	flist = recv_file_list(f_in);
-+	flist = recv_file_list(f_in, -1);
- 	if (!flist) {
- 		rprintf(FERROR,"server_recv: recv_file_list error\n");
- 		exit_cleanup(RERR_FILESELECT);
-@@ -1184,7 +1184,7 @@
- 
- 	if (write_batch && !am_server)
- 		start_write_batch(f_in);
--	flist = recv_file_list(f_in);
-+	flist = recv_file_list(f_in, -1);
- 	if (inc_recurse && file_total == 1)
- 		recv_additional_file_list(f_in);
- 
---- rsync-3.1.1/rsync.c.old	2015-09-04 14:58:51.928552530 -0700
-+++ rsync-3.1.1/rsync.c	2015-09-04 15:07:59.696578389 -0700
-@@ -364,7 +364,7 @@
- 		}
- 		/* Send all the data we read for this flist to the generator. */
- 		start_flist_forward(ndx);
--		flist = recv_file_list(f_in);
-+		flist = recv_file_list(f_in, ndx);
- 		flist->parent_ndx = ndx;
- 		stop_flist_forward();
- 	}
---- rsync-3.1.1/proto.h.old     2015-09-04 17:46:09.133140046 -0700
-+++ rsync-3.1.1/proto.h 2015-09-04 17:45:12.510951663 -0700
-@@ -89,7 +89,7 @@
- void unmake_file(struct file_struct *file);
- void send_extra_file_list(int f, int at_least);
- struct file_list *send_file_list(int f, int argc, char *argv[]);
--struct file_list *recv_file_list(int f);
-+struct file_list *recv_file_list(int f, int dir_ndx);
- void recv_additional_file_list(int f);
- int flist_find(struct file_list *flist, struct file_struct *f);
- int flist_find_ignore_dirness(struct file_list *flist, struct file_struct *f);