components/rsync/patches/15730984.patch
author klauw <ken.lauw@oracle.com>
Wed, 24 Jul 2013 13:38:40 -0700
changeset 1406 bad4899167db
parent 1351 5c589218fa09
child 1817 ff42a83716c4
permissions -rw-r--r--
16973738 Deliver 64-bit binaries for the rsync command 16973753 Enable ASLR support for rsync command
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
     1
--- rsync-3.0.9/main.c.orig	2011-06-18 12:44:47.000000000 -0700
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     2
+++ rsync-3.0.9/main.c	2013-07-03 17:44:42.596018396 -0700
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     3
@@ -26,6 +26,7 @@
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     4
 #if defined CONFIG_LOCALE && defined HAVE_LOCALE_H
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     5
 #include <locale.h>
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     6
 #endif
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     7
+#include <libgen.h>
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     8
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
     9
 extern int verbose;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    10
 extern int dry_run;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    11
@@ -1100,7 +1101,7 @@
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    12
 	for (i = 0; argv[i]; i++) {
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    13
 		if (!(argv[i] = strdup(argv[i]))) {
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    14
 			rprintf (FERROR, "out of memory at %s(%d)\n",
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    15
-				 __FILE__, __LINE__);
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    16
+				 basename(__FILE__), __LINE__);
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    17
 			return RERR_MALLOC;
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    18
 		}
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    19
 	}
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    20
--- rsync-3.0.9/cleanup.c.orig	2011-02-21 10:20:58.000000000 -0800
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    21
+++ rsync-3.0.9/cleanup.c	2013-07-03 18:10:38.003756993 -0700
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    22
@@ -21,6 +21,7 @@
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    23
  */
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    24
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    25
 #include "rsync.h"
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    26
+#include <libgen.h>
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    27
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    28
 extern int am_server;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    29
 extern int am_daemon;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    30
@@ -126,7 +127,7 @@
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    31
 		if (verbose > 3) {
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    32
 			rprintf(FINFO,
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    33
 				"[%s] _exit_cleanup(code=%d, file=%s, line=%d): entered\n",
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    34
-				who_am_i(), code, file, line);
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    35
+				who_am_i(), code, basename((char *)file), line);
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    36
 		}
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    37
 
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    38
 		/* FALLTHROUGH */
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    39
@@ -202,7 +203,7 @@
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    40
 			rprintf(FINFO,
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    41
 				"[%s] _exit_cleanup(code=%d, file=%s, line=%d): "
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    42
 				"about to call exit(%d)\n",
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    43
-				who_am_i(), unmodified_code, file, line, code);
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    44
+				who_am_i(), unmodified_code, basename((char *)file), line, code);
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    45
 		}
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    46
 
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    47
 		/* FALLTHROUGH */
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    48
--- rsync-3.0.9/t_stub.c.orig	2011-02-21 11:32:48.000000000 -0800
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    49
+++ rsync-3.0.9/t_stub.c	2013-07-03 17:44:42.597023354 -0700
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    50
@@ -20,6 +20,7 @@
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    51
  */
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    52
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    53
 #include "rsync.h"
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    54
+#include <libgen.h>
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    55
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    56
 int modify_window = 0;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    57
 int module_id = -1;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    58
@@ -54,7 +55,7 @@
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    59
  void _exit_cleanup(int code, const char *file, int line)
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    60
 {
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    61
 	fprintf(stderr, "exit(%d): %s(%d)\n",
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    62
-		code, file, line);
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    63
+		code, basename((char *)file), line);
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    64
 	exit(code);
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    65
 }
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    66
 
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    67
--- rsync-3.0.9/log.c.orig	2011-01-29 19:25:53.000000000 -0800
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    68
+++ rsync-3.0.9/log.c	2013-07-03 18:12:34.878333604 -0700
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    69
@@ -21,6 +21,7 @@
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    70
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    71
 #include "rsync.h"
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    72
 #include "ifuncs.h"
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    73
+#include <libgen.h>
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    74
 
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    75
 extern int verbose;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    76
 extern int dry_run;
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    77
@@ -829,10 +830,10 @@
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    78
 		/* VANISHED is not an error, only a warning */
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    79
 		if (code == RERR_VANISHED) {
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    80
 			rprintf(FWARNING, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n",
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    81
-				name, code, file, line, who_am_i(), RSYNC_VERSION);
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    82
+				name, code, basename((char *)file), line, who_am_i(), RSYNC_VERSION);
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    83
 		} else {
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    84
 			rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s=%s]\n",
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    85
-				name, code, file, line, who_am_i(), RSYNC_VERSION);
1406
bad4899167db 16973738 Deliver 64-bit binaries for the rsync command
klauw <ken.lauw@oracle.com>
parents: 1351
diff changeset
    86
+				name, code, basename((char *)file), line, who_am_i(), RSYNC_VERSION);
1351
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    87
 		}
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    88
 	}
5c589218fa09 15752593 SUNBT7107925 bump rsync to 3.0.9
klauw <ken.lauw@oracle.com>
parents:
diff changeset
    89
 }