Projects
openEuler:24.03:SP1:Everything:64G
rsync
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:rsync.spec
Changed
@@ -1,6 +1,6 @@ Name: rsync Version: 3.2.7 -Release: 4 +Release: 5 Summary: Fast incremental file transfer utility License: GPL-3.0-or-later URL: http://rsync.samba.org/ @@ -11,7 +11,8 @@ Source4: rsyncd.sysconfig Source5: rsyncd@.service -patch1: backport-Fix-overflow-of-sum2-buffer-for-sha1-rolling-checksu.patch +patch6000: backport-Fix-overflow-of-sum2-buffer-for-sha1-rolling-checksu.patch +patch6001: backport-Duplicate-argv-data-before-poptFreeContext.patch BuildRequires: git gcc systemd libacl-devel libattr-devel autoconf popt-devel BuildRequires: lz4-devel openssl-devel libzstd-devel @@ -86,6 +87,9 @@ %{_mandir}/man5/rsyncd.conf.5* %changelog +* Wed Oct 9 zhoupengcheng <zhoupengcheng11@huawei.com> - 3.2.7-5 +- backport patch from upstream + * Thu Jul 11 2024 Wenhua Huang <huangwenhua@kylinos.cn> - 3.2.7-4 - Type: bugfix - CVE:NA
View file
_service:tar_scm:backport-Duplicate-argv-data-before-poptFreeContext.patch
Added
@@ -0,0 +1,628 @@ +From 8990ad96de881f7332d16d32485f9d8b841a87d2 Mon Sep 17 00:00:00 2001 +From: Wayne Davison <wayne@opencoder.net> +Date: Tue, 22 Nov 2022 21:00:04 -0800 +Subject: PATCH Duplicate argv data before poptFreeContext(). + +--- + main.c | 13 ----- + options.c | 160 ++++++++++++++++++++++++++++++------------------------ + 2 files changed, 90 insertions(+), 83 deletions(-) + +diff --git a/main.c b/main.c +index d2a7b9b5..9f36904d 100644 +--- a/main.c ++++ b/main.c +@@ -1381,15 +1381,6 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv) + return MAX(exit_code, exit_code2); + } + +-static void dup_argv(char *argv) +-{ +- int i; +- +- for (i = 0; argvi; i++) +- argvi = strdup(argvi); +-} +- +- + /* Start a client for either type of remote connection. Work out + * whether the arguments request a remote shell or rsyncd connection, + * and call the appropriate connection function, then run_client. +@@ -1405,10 +1396,6 @@ static int start_client(int argc, char *argv) + int ret; + pid_t pid; + +- /* Don't clobber argv so that ps(1) can still show the right +- * command line. */ +- dup_argv(argv); +- + if (!read_batch) { /* for read_batch, NO source is specified */ + char *path = check_for_hostspec(argv0, &shell_machine, &rsync_port); + if (path) { /* source is remote */ +diff --git a/options.c b/options.c +index cfa3e1dc..ded0e7a3 100644 +--- a/options.c ++++ b/options.c +@@ -200,6 +200,7 @@ int remote_option_cnt = 0; + const char **remote_options = NULL; + const char *checksum_choice = NULL; + const char *compress_choice = NULL; ++static const char *empty_argv1; + + int quiet = 0; + int output_motd = 1; +@@ -1347,7 +1348,7 @@ char *alt_dest_opt(int type) + **/ + int parse_arguments(int *argc_p, const char ***argv_p) + { +- static poptContext pc; ++ poptContext pc; + const char *arg, **argv = *argv_p; + int argc = *argc_p; + int opt, want_dest_type; +@@ -1367,10 +1368,6 @@ int parse_arguments(int *argc_p, const char ***argv_p) + + /* TODO: Call poptReadDefaultConfig; handle errors. */ + +- /* The context leaks in case of an error, but if there's a +- * problem we always exit anyhow. */ +- if (pc) +- poptFreeContext(pc); + pc = poptGetContext(RSYNC_NAME, argc, argv, long_options, 0); + if (!am_server) { + poptReadDefaultConfig(pc, 0); +@@ -1413,7 +1410,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + strlcpy(err_buf, + "Attempt to hack rsync thwarted!\n", + sizeof err_buf); +- return 0; ++ goto cleanup; + } + #ifdef ICONV_OPTION + iconv_opt = NULL; +@@ -1459,7 +1456,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + if (tmpdir && strlen(tmpdir) >= MAXPATHLEN - 10) { + snprintf(err_buf, sizeof err_buf, + "the --temp-dir path is WAY too long.\n"); +- return 0; ++ goto cleanup; + } + + if (!daemon_opt) { +@@ -1469,8 +1466,16 @@ int parse_arguments(int *argc_p, const char ***argv_p) + exit_cleanup(RERR_SYNTAX); + } + +- *argv_p = argv = poptGetArgs(pc); +- *argc_p = argc = count_args(argv); ++ argv = poptGetArgs(pc); ++ argc = count_args(argv); ++ if (!argc) { ++ *argv_p = empty_argv; ++ *argc_p = 0; ++ } else if (poptDupArgv(argc, argv, argc_p, argv_p) != 0) ++ out_of_memory("parse_arguments"); ++ argv = *argv_p; ++ poptFreeContext(pc); ++ + am_starting_up = 0; + daemon_opt = 0; + am_daemon = 1; +@@ -1525,7 +1530,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + case 'a': + if (refused_archive_part) { + create_refuse_error(refused_archive_part); +- return 0; ++ goto cleanup; + } + if (!recurse) /* preserve recurse == 2 */ + recurse = 1; +@@ -1595,7 +1600,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + case 'P': + if (refused_partial || refused_progress) { + create_refuse_error(refused_partial ? refused_partial : refused_progress); +- return 0; ++ goto cleanup; + } + do_progress = 1; + keep_partial = 1; +@@ -1630,7 +1635,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + if (*arg != '-') { + snprintf(err_buf, sizeof err_buf, + "Remote option must start with a dash: %s\n", arg); +- return 0; ++ goto cleanup; + } + if (remote_option_cnt+2 >= remote_option_alloc) { + remote_option_alloc += 16; +@@ -1672,27 +1677,27 @@ int parse_arguments(int *argc_p, const char ***argv_p) + ssize_t size; + arg = poptGetOptArg(pc); + if ((size = parse_size_arg(arg, 'b', "block-size", 0, max_blength, False)) < 0) +- return 0; ++ goto cleanup; + block_size = (int32)size; + break; + } + + case OPT_MAX_SIZE: + if ((max_size = parse_size_arg(max_size_arg, 'b', "max-size", 0, -1, False)) < 0) +- return 0; ++ goto cleanup; + max_size_arg = strdup(do_big_num(max_size, 0, NULL)); + break; + + case OPT_MIN_SIZE: + if ((min_size = parse_size_arg(min_size_arg, 'b', "min-size", 0, -1, False)) < 0) +- return 0; ++ goto cleanup; + min_size_arg = strdup(do_big_num(min_size, 0, NULL)); + break; + + case OPT_BWLIMIT: { + ssize_t size = parse_size_arg(bwlimit_arg, 'K', "bwlimit", 512, -1, True); + if (size < 0) +- return 0; ++ goto cleanup; + bwlimit_arg = strdup(do_big_num(size, 0, NULL)); + bwlimit = (size + 512) / 1024; + break; +@@ -1721,7 +1726,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + snprintf(err_buf, sizeof err_buf, + "ERROR: the %s option conflicts with the %s option\n", + alt_dest_opt(want_dest_type), alt_dest_opt(0)); +- return 0; ++ goto cleanup; + } + alt_dest_type = want_dest_type; + +@@ -1729,7 +1734,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + snprintf(err_buf, sizeof err_buf, + "ERROR: at most %d %s args may be specified\n", + MAX_BASIS_DIRS, alt_dest_opt(0)); +- return 0; ++ goto cleanup; + } + /* We defer sanitizing this arg until we know what + * our destination directory is going to be. */ +@@ -1742,7 +1747,7 @@ int parse_arguments(int *argc_p, const char ***argv_p) + snprintf(err_buf, sizeof err_buf, + "Invalid argument passed to --chmod (%s)\n", + arg); +- return 0; ++ goto cleanup; + } + break; + +@@ -1761,11 +1766,11 @@ int parse_arguments(int *argc_p, const char ***argv_p) + if (usermap_via_chown) { + snprintf(err_buf, sizeof err_buf,
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/rsync.git</param> - <param name="revision">openEuler-24.03-LTS-Next</param> + <param name="revision">openEuler-24.03-LTS-SP1</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2