commit cc6e650193902fce57cd168f143249594366ab3f Author: Toshaan Bharvani Date: Fri Oct 28 14:48:42 2022 +0200 initial package creation Signed-off-by: Toshaan Bharvani diff --git a/SOURCES/rsync-3.2.2-runtests.patch b/SOURCES/rsync-3.2.2-runtests.patch new file mode 100644 index 0000000..0f682e5 --- /dev/null +++ b/SOURCES/rsync-3.2.2-runtests.patch @@ -0,0 +1,12 @@ +diff --git a/runtests.sh.old b/runtests.sh +index ecb383e..1cd1d1a 100755 +--- a/runtests.sh.old ++++ b/runtests.sh +@@ -276,6 +276,7 @@ do + + case "$testscript" in + *hardlinks*) TESTRUN_TIMEOUT=600 ;; ++ *default-acls*) continue ;; + *) TESTRUN_TIMEOUT=300 ;; + esac + diff --git a/SOURCES/rsync-3.2.2-ssl-verify-hostname.patch b/SOURCES/rsync-3.2.2-ssl-verify-hostname.patch new file mode 100644 index 0000000..8319561 --- /dev/null +++ b/SOURCES/rsync-3.2.2-ssl-verify-hostname.patch @@ -0,0 +1,22 @@ +From Mon Sep 17 00:00:00 2001 +From: Matt McCutchen +Date: Wed, 26 Aug 2020 12:16:08 -0400 + +rsync-ssl: Verify the hostname in the certificate when using openssl. +--- + rsync-ssl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rsync-ssl b/rsync-ssl +index 8101975a..46701af1 100755 +--- a/rsync-ssl ++++ b/rsync-ssl +@@ -129,7 +129,7 @@ function rsync_ssl_helper { + fi + + if [[ $RSYNC_SSL_TYPE == openssl ]]; then +- exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -connect $hostname:$port ++ exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port + elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then + exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_opts $hostname:$port + else diff --git a/SOURCES/rsync-3.2.3-append-mode.patch b/SOURCES/rsync-3.2.3-append-mode.patch new file mode 100644 index 0000000..aa5645f --- /dev/null +++ b/SOURCES/rsync-3.2.3-append-mode.patch @@ -0,0 +1,36 @@ +diff --git a/rsync.1.md b/rsync.1.md +index ec971ecc..7bb4c5a1 100644 +--- a/rsync.1.md ++++ b/rsync.1.md +@@ -949,7 +949,9 @@ your home directory (remove the '=' for that). + existing content in the file (it only verifies the content that it is + appending). Rsync skips any files that exist on the receiving side that + are not shorter than the associated file on the sending side (which means +- that new files are trasnferred). ++ that new files are trasnferred). It also skips any files whose size on the ++ sending side gets shorter during the send negotiations (rsync warns about a ++ "diminished" file when this happens). + + This does not interfere with the updating of a file's non-content + attributes (e.g. permissions, ownership, etc.) when the file does not need +diff --git a/sender.c b/sender.c +index 94761c26..9cfca134 100644 +--- a/sender.c ++++ b/sender.c +@@ -362,6 +362,16 @@ void send_files(int f_in, int f_out) + exit_cleanup(RERR_FILEIO); + } + ++ if (append_mode > 0 && st.st_size < F_LENGTH(file)) { ++ rprintf(FWARNING, "skipped diminished file: %s\n", ++ full_fname(fname)); ++ free_sums(s); ++ close(fd); ++ if (protocol_version >= 30) ++ send_msg_int(MSG_NO_SEND, ndx); ++ continue; ++ } ++ + if (IS_DEVICE(st.st_mode) && st.st_size == 0) + st.st_size = get_device_size(fd, fname); + diff --git a/SOURCES/rsync-3.2.3-cve-2018-25032.patch b/SOURCES/rsync-3.2.3-cve-2018-25032.patch new file mode 100644 index 0000000..e82e29c --- /dev/null +++ b/SOURCES/rsync-3.2.3-cve-2018-25032.patch @@ -0,0 +1,343 @@ +From 5c44459c3b28a9bd3283aaceab7c615f8020c531 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Tue, 17 Apr 2018 22:09:22 -0700 +Subject: [PATCH] Fix a bug that can crash deflate on some input when using + Z_FIXED. + +This bug was reported by Danilo Ramos of Eideticom, Inc. It has +lain in wait 13 years before being found! The bug was introduced +in zlib 1.2.2.2, with the addition of the Z_FIXED option. That +option forces the use of fixed Huffman codes. For rare inputs with +a large number of distant matches, the pending buffer into which +the compressed data is written can overwrite the distance symbol +table which it overlays. That results in corrupted output due to +invalid distances, and can result in out-of-bound accesses, +crashing the application. + +The fix here combines the distance buffer and literal/length +buffers into a single symbol buffer. Now three bytes of pending +buffer space are opened up for each literal or length/distance +pair consumed, instead of the previous two bytes. This assures +that the pending buffer cannot overwrite the symbol table, since +the maximum fixed code compressed length/distance is 31 bits, and +since there are four bytes of pending space for every three bytes +of symbol space. +--- + deflate.c | 74 ++++++++++++++++++++++++++++++++++++++++--------------- + deflate.h | 25 +++++++++---------- + trees.c | 50 +++++++++++-------------------------- + 3 files changed, 79 insertions(+), 70 deletions(-) + +diff --git a/zlib/deflate.c b/zlib/deflate.c +index 425babc00..19cba873a 100644 +--- a/zlib/deflate.c ++++ b/zlib/deflate.c +@@ -255,11 +255,6 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + int wrap = 1; + static const char my_version[] = ZLIB_VERSION; + +- ushf *overlay; +- /* We overlay pending_buf and d_buf+l_buf. This works since the average +- * output size for (length,distance) codes is <= 24 bits. +- */ +- + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; +@@ -329,9 +324,47 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + +- overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); +- s->pending_buf = (uchf *) overlay; +- s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); ++ /* We overlay pending_buf and sym_buf. This works since the average size ++ * for length/distance pairs over any compressed block is assured to be 31 ++ * bits or less. ++ * ++ * Analysis: The longest fixed codes are a length code of 8 bits plus 5 ++ * extra bits, for lengths 131 to 257. The longest fixed distance codes are ++ * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest ++ * possible fixed-codes length/distance pair is then 31 bits total. ++ * ++ * sym_buf starts one-fourth of the way into pending_buf. So there are ++ * three bytes in sym_buf for every four bytes in pending_buf. Each symbol ++ * in sym_buf is three bytes -- two for the distance and one for the ++ * literal/length. As each symbol is consumed, the pointer to the next ++ * sym_buf value to read moves forward three bytes. From that symbol, up to ++ * 31 bits are written to pending_buf. The closest the written pending_buf ++ * bits gets to the next sym_buf symbol to read is just before the last ++ * code is written. At that time, 31*(n-2) bits have been written, just ++ * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at ++ * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1 ++ * symbols are written.) The closest the writing gets to what is unread is ++ * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and ++ * can range from 128 to 32768. ++ * ++ * Therefore, at a minimum, there are 142 bits of space between what is ++ * written and what is read in the overlain buffers, so the symbols cannot ++ * be overwritten by the compressed data. That space is actually 139 bits, ++ * due to the three-bit fixed-code block header. ++ * ++ * That covers the case where either Z_FIXED is specified, forcing fixed ++ * codes, or when the use of fixed codes is chosen, because that choice ++ * results in a smaller compressed block than dynamic codes. That latter ++ * condition then assures that the above analysis also covers all dynamic ++ * blocks. A dynamic-code block will only be chosen to be emitted if it has ++ * fewer bits than a fixed-code block would for the same set of symbols. ++ * Therefore its average symbol length is assured to be less than 31. So ++ * the compressed data for a dynamic block also cannot overwrite the ++ * symbols from which it is being constructed. ++ */ ++ ++ s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4); ++ s->pending_buf_size = (ulg)s->lit_bufsize * 4; + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { +@@ -340,8 +373,12 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, + deflateEnd (strm); + return Z_MEM_ERROR; + } +- s->d_buf = overlay + s->lit_bufsize/sizeof(ush); +- s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; ++ s->sym_buf = s->pending_buf + s->lit_bufsize; ++ s->sym_end = (s->lit_bufsize - 1) * 3; ++ /* We avoid equality with lit_bufsize*3 because of wraparound at 64K ++ * on 16 bit machines and because stored blocks are restricted to ++ * 64K-1 bytes. ++ */ + + s->level = level; + s->strategy = strategy; +@@ -552,7 +589,7 @@ int ZEXPORT deflatePrime (strm, bits, value) + + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + s = strm->state; +- if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) ++ if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) + return Z_BUF_ERROR; + do { + put = Buf_size - s->bi_valid; +@@ -1113,7 +1150,6 @@ int ZEXPORT deflateCopy (dest, source) + #else + deflate_state *ds; + deflate_state *ss; +- ushf *overlay; + + + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { +@@ -1133,8 +1169,7 @@ int ZEXPORT deflateCopy (dest, source) + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); +- overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); +- ds->pending_buf = (uchf *) overlay; ++ ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4); + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { +@@ -1148,8 +1183,7 @@ int ZEXPORT deflateCopy (dest, source) + zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); +- ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); +- ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; ++ ds->sym_buf = ds->pending_buf + ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; +@@ -1771,7 +1771,7 @@ local block_state deflate_fast(s, flush) + FLUSH_BLOCK(s, 1); + return finish_done; + } +- if (s->last_lit) ++ if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; + } +@@ -1912,7 +1912,7 @@ local block_state deflate_slow(s, flush) + FLUSH_BLOCK(s, 1); + return finish_done; + } +- if (s->last_lit) ++ if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; + } +@@ -1987,7 +1987,7 @@ local block_state deflate_rle(s, flush) + FLUSH_BLOCK(s, 1); + return finish_done; + } +- if (s->last_lit) ++ if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; + } +@@ -2026,7 +2026,7 @@ local block_state deflate_huff(s, flush) + FLUSH_BLOCK(s, 1); + return finish_done; + } +- if (s->last_lit) ++ if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; + } +diff --git a/zlib/deflate.h b/zlib/deflate.h +index 23ecdd312..d4cf1a98b 100644 +--- a/zlib/deflate.h ++++ b/zlib/deflate.h +@@ -217,7 +217,7 @@ typedef struct internal_state { + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + +- uchf *l_buf; /* buffer for literals or lengths */ ++ uchf *sym_buf; /* buffer for distances and literals/lengths */ + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for +@@ -239,13 +239,8 @@ typedef struct internal_state { + * - I can't count above 4 + */ + +- uInt last_lit; /* running index in l_buf */ +- +- ushf *d_buf; +- /* Buffer for distances. To simplify the code, d_buf and l_buf have +- * the same number of elements. To use different lengths, an extra flag +- * array would be necessary. +- */ ++ uInt sym_next; /* running index in sym_buf */ ++ uInt sym_end; /* symbol table full when sym_next reaches this */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ +@@ -317,20 +317,22 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, + + # define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ +- s->d_buf[s->last_lit] = 0; \ +- s->l_buf[s->last_lit++] = cc; \ ++ s->sym_buf[s->sym_next++] = 0; \ ++ s->sym_buf[s->sym_next++] = 0; \ ++ s->sym_buf[s->sym_next++] = cc; \ + s->dyn_ltree[cc].Freq++; \ +- flush = (s->last_lit == s->lit_bufsize-1); \ ++ flush = (s->sym_next == s->sym_end); \ + } + # define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (length); \ + ush dist = (distance); \ +- s->d_buf[s->last_lit] = dist; \ +- s->l_buf[s->last_lit++] = len; \ ++ s->sym_buf[s->sym_next++] = dist; \ ++ s->sym_buf[s->sym_next++] = dist >> 8; \ ++ s->sym_buf[s->sym_next++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ +- flush = (s->last_lit == s->lit_bufsize-1); \ ++ flush = (s->sym_next == s->sym_end); \ + } + #else + # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +diff --git a/zlib/trees.c b/zlib/trees.c +index 4f4a65011..decaeb7c3 100644 +--- a/zlib/trees.c ++++ b/zlib/trees.c +@@ -416,7 +416,7 @@ local void init_block(s) + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; +- s->last_lit = s->matches = 0; ++ s->sym_next = s->matches = 0; + } + + #define SMALLEST 1 +@@ -948,7 +948,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, +- s->last_lit)); ++ s->sym_next / 3)); + + if (static_lenb <= opt_lenb) opt_lenb = static_lenb; + +@@ -1017,8 +1017,9 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc) + unsigned dist; /* distance of matched string */ + unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ + { +- s->d_buf[s->last_lit] = (ush)dist; +- s->l_buf[s->last_lit++] = (uch)lc; ++ s->sym_buf[s->sym_next++] = dist; ++ s->sym_buf[s->sym_next++] = dist >> 8; ++ s->sym_buf[s->sym_next++] = lc; + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; +@@ -1033,30 +1034,7 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc) + s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } +- +-#ifdef TRUNCATE_BLOCK +- /* Try to guess if it is profitable to stop the current block here */ +- if ((s->last_lit & 0x1fff) == 0 && s->level > 2) { +- /* Compute an upper bound for the compressed length */ +- ulg out_length = (ulg)s->last_lit*8L; +- ulg in_length = (ulg)((long)s->strstart - s->block_start); +- int dcode; +- for (dcode = 0; dcode < D_CODES; dcode++) { +- out_length += (ulg)s->dyn_dtree[dcode].Freq * +- (5L+extra_dbits[dcode]); +- } +- out_length >>= 3; +- Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +- s->last_lit, in_length, out_length, +- 100L - out_length*100L/in_length)); +- if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; +- } +-#endif +- return (s->last_lit == s->lit_bufsize-1); +- /* We avoid equality with lit_bufsize because of wraparound at 64K +- * on 16 bit machines and because stored blocks are restricted to +- * 64K-1 bytes. +- */ ++ return (s->sym_next == s->sym_end); + } + + /* =========================================================================== +@@ -1069,13 +1047,14 @@ local void compress_block(s, ltree, dtree) + { + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ +- unsigned lx = 0; /* running index in l_buf */ ++ unsigned sx = 0; /* running index in sym_buf */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + +- if (s->last_lit != 0) do { +- dist = s->d_buf[lx]; +- lc = s->l_buf[lx++]; ++ if (s->sym_next != 0) do { ++ dist = s->sym_buf[sx++] & 0xff; ++ dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; ++ lc = s->sym_buf[sx++]; + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); +@@ -1100,11 +1079,10 @@ local void compress_block(s, ltree, dtree) + } + } /* literal or match pair ? */ + +- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ +- Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, +- "pendingBuf overflow"); ++ /* Check that the overlay between pending_buf and sym_buf is ok: */ ++ Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); + +- } while (lx < s->last_lit); ++ } while (sx < s->sym_next); + + send_code(s, END_BLOCK, ltree); + } diff --git a/SOURCES/rsync-3.2.3-cve-2022-29154.patch b/SOURCES/rsync-3.2.3-cve-2022-29154.patch new file mode 100644 index 0000000..3e228d0 --- /dev/null +++ b/SOURCES/rsync-3.2.3-cve-2022-29154.patch @@ -0,0 +1,1085 @@ +diff --git a/exclude.c b/exclude.c +index e095744..7906caa 100644 +--- a/exclude.c ++++ b/exclude.c +@@ -25,18 +25,26 @@ + + extern int am_server; + extern int am_sender; ++extern int am_generator; + extern int eol_nulls; + extern int io_error; ++extern int xfer_dirs; ++extern int recurse; + extern int local_server; + extern int prune_empty_dirs; + extern int ignore_perishable; ++extern int old_style_args; ++extern int relative_paths; + extern int delete_mode; + extern int delete_excluded; + extern int cvs_exclude; + extern int sanitize_paths; + extern int protocol_version; ++extern int read_batch; ++extern int list_only; + extern int module_id; + ++extern char *filesfrom_host; + extern char curr_dir[MAXPATHLEN]; + extern unsigned int curr_dir_len; + extern unsigned int module_dirlen; +@@ -44,8 +51,10 @@ extern unsigned int module_dirlen; + filter_rule_list filter_list = { .debug_type = "" }; + filter_rule_list cvs_filter_list = { .debug_type = " [global CVS]" }; + filter_rule_list daemon_filter_list = { .debug_type = " [daemon]" }; ++filter_rule_list implied_filter_list = { .debug_type = " [implied]" }; + + int saw_xattr_filter = 0; ++int trust_sender_filter = 0; + + /* Need room enough for ":MODS " prefix plus some room to grow. */ + #define MAX_RULE_PREFIX (16) +@@ -288,6 +297,233 @@ static void add_rule(filter_rule_list *listp, const char *pat, unsigned int pat_ + } + } + ++/* If the wildcards failed, the remote shell might give us a file matching the literal ++ * wildcards. Since "*" & "?" already match themselves, this just needs to deal with ++ * failed "[foo]" idioms. ++ */ ++static void maybe_add_literal_brackets_rule(filter_rule const *based_on, int arg_len) ++{ ++ filter_rule *rule; ++ const char *arg = based_on->pattern, *cp; ++ char *p; ++ int cnt = 0; ++ ++ if (arg_len < 0) ++ arg_len = strlen(arg); ++ ++ for (cp = arg; *cp; cp++) { ++ if (*cp == '\\' && cp[1]) { ++ cp++; ++ } else if (*cp == '[') ++ cnt++; ++ } ++ if (!cnt) ++ return; ++ ++ rule = new0(filter_rule); ++ rule->rflags = based_on->rflags; ++ rule->u.slash_cnt = based_on->u.slash_cnt; ++ p = rule->pattern = new_array(char, arg_len + cnt + 1); ++ for (cp = arg; *cp; ) { ++ if (*cp == '\\' && cp[1]) { ++ *p++ = *cp++; ++ } else if (*cp == '[') ++ *p++ = '\\'; ++ *p++ = *cp++; ++ } ++ *p++ = '\0'; ++ ++ rule->next = implied_filter_list.head; ++ implied_filter_list.head = rule; ++ if (DEBUG_GTE(FILTER, 3)) { ++ rprintf(FINFO, "[%s] add_implied_include(%s%s)\n", who_am_i(), rule->pattern, ++ rule->rflags & FILTRULE_DIRECTORY ? "/" : ""); ++ } ++} ++ ++static char *partial_string_buf = NULL; ++static int partial_string_len = 0; ++void implied_include_partial_string(const char *s_start, const char *s_end) ++{ ++ partial_string_len = s_end - s_start; ++ if (partial_string_len <= 0 || partial_string_len >= MAXPATHLEN) { /* too-large should be impossible... */ ++ partial_string_len = 0; ++ return; ++ } ++ if (!partial_string_buf) ++ partial_string_buf = new_array(char, MAXPATHLEN); ++ memcpy(partial_string_buf, s_start, partial_string_len); ++} ++ ++void free_implied_include_partial_string() ++{ ++ if (partial_string_buf) { ++ free(partial_string_buf); ++ partial_string_buf = NULL; ++ } ++ partial_string_len = 0; /* paranoia */ ++} ++ ++/* Each arg the client sends to the remote sender turns into an implied include ++ * that the receiver uses to validate the file list from the sender. */ ++void add_implied_include(const char *arg, int skip_daemon_module) ++{ ++ filter_rule *rule; ++ int arg_len, saw_wild = 0, saw_live_open_brkt = 0, backslash_cnt = 0; ++ int slash_cnt = 1; /* We know we're adding a leading slash. */ ++ const char *cp; ++ char *p; ++ if (am_server || old_style_args || list_only || read_batch || filesfrom_host != NULL) ++ return; ++ if (partial_string_len) { ++ arg_len = strlen(arg); ++ if (partial_string_len + arg_len >= MAXPATHLEN) { ++ partial_string_len = 0; ++ return; /* Should be impossible... */ ++ } ++ memcpy(partial_string_buf + partial_string_len, arg, arg_len + 1); ++ partial_string_len = 0; ++ arg = partial_string_buf; ++ } ++ if (skip_daemon_module) { ++ if ((cp = strchr(arg, '/')) != NULL) ++ arg = cp + 1; ++ else ++ arg = ""; ++ } ++ if (relative_paths) { ++ if ((cp = strstr(arg, "/./")) != NULL) ++ arg = cp + 3; ++ } else if ((cp = strrchr(arg, '/')) != NULL) { ++ arg = cp + 1; ++ if (*arg == '.' && arg[1] == '\0') ++ arg++; ++ } ++ arg_len = strlen(arg); ++ if (arg_len) { ++ if (strpbrk(arg, "*[?")) { ++ /* We need to add room to escape backslashes if wildcard chars are present. */ ++ for (cp = arg; (cp = strchr(cp, '\\')) != NULL; cp++) ++ arg_len++; ++ saw_wild = 1; ++ } ++ arg_len++; /* Leave room for the prefixed slash */ ++ rule = new0(filter_rule); ++ if (!implied_filter_list.head) ++ implied_filter_list.head = implied_filter_list.tail = rule; ++ else { ++ rule->next = implied_filter_list.head; ++ implied_filter_list.head = rule; ++ } ++ rule->rflags = FILTRULE_INCLUDE + (saw_wild ? FILTRULE_WILD : 0); ++ p = rule->pattern = new_array(char, arg_len + 1); ++ *p++ = '/'; ++ for (cp = arg; *cp; ) { ++ switch (*cp) { ++ case '\\': ++ if (cp[1] == ']') { ++ if (!saw_wild) ++ cp++; /* A \] in a non-wild filter causes a problem, so drop the \ . */ ++ } else if (!strchr("*[?", cp[1])) { ++ backslash_cnt++; ++ if (saw_wild) ++ *p++ = '\\'; ++ } ++ *p++ = *cp++; ++ break; ++ case '/': ++ if (p[-1] == '/') { /* This is safe because of the initial slash. */ ++ cp++; ++ break; ++ } ++ if (relative_paths) { ++ filter_rule const *ent; ++ int found = 0; ++ *p = '\0'; ++ for (ent = implied_filter_list.head; ent; ent = ent->next) { ++ if (ent != rule && strcmp(ent->pattern, rule->pattern) == 0) { ++ found = 1; ++ break; ++ } ++ } ++ if (!found) { ++ filter_rule *R_rule = new0(filter_rule); ++ R_rule->rflags = FILTRULE_INCLUDE | FILTRULE_DIRECTORY; ++ /* Check if our sub-path has wildcards or escaped backslashes */ ++ if (saw_wild && strpbrk(rule->pattern, "*[?\\")) ++ R_rule->rflags |= FILTRULE_WILD; ++ R_rule->pattern = strdup(rule->pattern); ++ R_rule->u.slash_cnt = slash_cnt; ++ R_rule->next = implied_filter_list.head; ++ implied_filter_list.head = R_rule; ++ if (DEBUG_GTE(FILTER, 3)) { ++ rprintf(FINFO, "[%s] add_implied_include(%s/)\n", ++ who_am_i(), R_rule->pattern); ++ } ++ if (saw_live_open_brkt) ++ maybe_add_literal_brackets_rule(R_rule, -1); ++ } ++ } ++ slash_cnt++; ++ *p++ = *cp++; ++ break; ++ case '[': ++ saw_live_open_brkt = 1; ++ *p++ = *cp++; ++ break; ++ default: ++ *p++ = *cp++; ++ break; ++ } ++ } ++ *p = '\0'; ++ rule->u.slash_cnt = slash_cnt; ++ arg = rule->pattern; ++ arg_len = p - arg; /* We recompute it due to backslash weirdness. */ ++ if (DEBUG_GTE(FILTER, 3)) ++ rprintf(FINFO, "[%s] add_implied_include(%s)\n", who_am_i(), rule->pattern); ++ if (saw_live_open_brkt) ++ maybe_add_literal_brackets_rule(rule, arg_len); ++ } ++ ++ if (recurse || xfer_dirs) { ++ /* Now create a rule with an added "/" & "**" or "*" at the end */ ++ rule = new0(filter_rule); ++ rule->rflags = FILTRULE_INCLUDE | FILTRULE_WILD; ++ if (recurse) ++ rule->rflags |= FILTRULE_WILD2; ++ /* We must leave enough room for / * * \0. */ ++ if (!saw_wild && backslash_cnt) { ++ /* We are appending a wildcard, so now the backslashes need to be escaped. */ ++ p = rule->pattern = new_array(char, arg_len + backslash_cnt + 3 + 1); ++ for (cp = arg; *cp; ) { ++ if (*cp == '\\') ++ *p++ = '\\'; ++ *p++ = *cp++; ++ } ++ } else { ++ p = rule->pattern = new_array(char, arg_len + 3 + 1); ++ if (arg_len) { ++ memcpy(p, arg, arg_len); ++ p += arg_len; ++ } ++ } ++ if (p[-1] != '/') ++ *p++ = '/'; ++ *p++ = '*'; ++ if (recurse) ++ *p++ = '*'; ++ *p = '\0'; ++ rule->u.slash_cnt = slash_cnt + 1; ++ rule->next = implied_filter_list.head; ++ implied_filter_list.head = rule; ++ if (DEBUG_GTE(FILTER, 3)) ++ rprintf(FINFO, "[%s] add_implied_include(%s)\n", who_am_i(), rule->pattern); ++ if (saw_live_open_brkt) ++ maybe_add_literal_brackets_rule(rule, p - rule->pattern); ++ } ++} ++ + /* This frees any non-inherited items, leaving just inherited items on the list. */ + static void pop_filter_list(filter_rule_list *listp) + { +@@ -702,11 +938,12 @@ static void report_filter_result(enum logcode code, char const *name, + filter_rule const *ent, + int name_flags, const char *type) + { ++ int log_level = am_sender || am_generator ? 1 : 3; ++ + /* If a trailing slash is present to match only directories, + * then it is stripped out by add_rule(). So as a special +- * case we add it back in here. */ +- +- if (DEBUG_GTE(FILTER, 1)) { ++ * case we add it back in the log output. */ ++ if (DEBUG_GTE(FILTER, log_level)) { + static char *actions[2][2] + = { {"show", "hid"}, {"risk", "protect"} }; + const char *w = who_am_i(); +@@ -714,7 +951,7 @@ static void report_filter_result(enum logcode code, char const *name, + : name_flags & NAME_IS_DIR ? "directory" + : "file"; + rprintf(code, "[%s] %sing %s %s because of pattern %s%s%s\n", +- w, actions[*w!='s'][!(ent->rflags & FILTRULE_INCLUDE)], ++ w, actions[*w=='g'][!(ent->rflags & FILTRULE_INCLUDE)], + t, name, ent->pattern, + ent->rflags & FILTRULE_DIRECTORY ? "/" : "", type); + } +@@ -886,6 +1123,7 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr, + } + switch (ch) { + case ':': ++ trust_sender_filter = 1; + rule->rflags |= FILTRULE_PERDIR_MERGE + | FILTRULE_FINISH_SETUP; + /* FALL THROUGH */ +diff --git a/flist.c b/flist.c +index 5a1e424..4e9dd10 100644 +--- a/flist.c ++++ b/flist.c +@@ -72,6 +72,7 @@ extern int need_unsorted_flist; + extern int sender_symlink_iconv; + extern int output_needs_newline; + extern int sender_keeps_checksum; ++extern int trust_sender_filter; + extern int unsort_ndx; + extern uid_t our_uid; + extern struct stats stats; +@@ -82,8 +83,7 @@ extern char curr_dir[MAXPATHLEN]; + + extern struct chmod_mode_struct *chmod_modes; + +-extern filter_rule_list filter_list; +-extern filter_rule_list daemon_filter_list; ++extern filter_rule_list filter_list, implied_filter_list, daemon_filter_list; + + #ifdef ICONV_OPTION + extern int filesfrom_convert; +@@ -971,6 +971,19 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x + exit_cleanup(RERR_UNSUPPORTED); + } + ++ if (*thisname != '.' || thisname[1] != '\0') { ++ int filt_flags = S_ISDIR(mode) ? NAME_IS_DIR : NAME_IS_FILE; ++ if (!trust_sender_filter /* a per-dir filter rule means we must trust the sender's filtering */ ++ && filter_list.head && check_filter(&filter_list, FINFO, thisname, filt_flags) < 0) { ++ rprintf(FERROR, "ERROR: rejecting excluded file-list name: %s\n", thisname); ++ exit_cleanup(RERR_PROTOCOL); ++ } ++ if (implied_filter_list.head && check_filter(&implied_filter_list, FINFO, thisname, filt_flags) <= 0) { ++ rprintf(FERROR, "ERROR: rejecting unrequested file-list name: %s\n", thisname); ++ exit_cleanup(RERR_PROTOCOL); ++ } ++ } ++ + if (inc_recurse && S_ISDIR(mode)) { + if (one_file_system) { + /* Room to save the dir's device for -x */ +diff --git a/io.c b/io.c +index b50a066..6d0a389 100644 +--- a/io.c ++++ b/io.c +@@ -373,6 +373,7 @@ static void forward_filesfrom_data(void) + free_xbuf(&ff_xb); + if (ff_reenable_multiplex >= 0) + io_start_multiplex_out(ff_reenable_multiplex); ++ free_implied_include_partial_string(); + } + return; + } +@@ -414,6 +415,7 @@ static void forward_filesfrom_data(void) + while (s != eob) { + if (*s++ == '\0') { + ff_xb.len = s - sob - 1; ++ add_implied_include(sob, 0); + if (iconvbufs(ic_send, &ff_xb, &iobuf.out, flags) < 0) + exit_cleanup(RERR_PROTOCOL); /* impossible? */ + write_buf(iobuf.out_fd, s-1, 1); /* Send the '\0'. */ +@@ -429,6 +431,7 @@ static void forward_filesfrom_data(void) + ff_lastchar = '\0'; + else { + /* Handle a partial string specially, saving any incomplete chars. */ ++ implied_include_partial_string(sob, s); + flags &= ~ICB_INCLUDE_INCOMPLETE; + if (iconvbufs(ic_send, &ff_xb, &iobuf.out, flags) < 0) { + if (errno == E2BIG) +@@ -445,13 +448,17 @@ static void forward_filesfrom_data(void) + char *f = ff_xb.buf + ff_xb.pos; + char *t = ff_xb.buf; + char *eob = f + len; ++ char *cur = t; + /* Eliminate any multi-'\0' runs. */ + while (f != eob) { + if (!(*t++ = *f++)) { ++ add_implied_include(cur, 0); ++ cur = t; + while (f != eob && *f == '\0') + f++; + } + } ++ implied_include_partial_string(cur, t); + ff_lastchar = f[-1]; + if ((len = t - ff_xb.buf) != 0) { + /* This will not circle back to perform_io() because we only get +diff --git a/main.c b/main.c +index 46b97b5..f124a2d 100644 +--- a/main.c ++++ b/main.c +@@ -48,6 +48,7 @@ extern int called_from_signal_handler; + extern int need_messages_from_generator; + extern int kluge_around_eof; + extern int got_xfer_error; ++extern int old_style_args; + extern int msgs2stderr; + extern int module_id; + extern int read_only; +@@ -87,6 +88,7 @@ extern BOOL shutting_down; + extern int backup_dir_len; + extern int basis_dir_cnt; + extern int default_af_hint; ++extern int trust_sender_filter; + extern struct stats stats; + extern char *stdout_format; + extern char *logfile_format; +@@ -102,7 +104,7 @@ extern char curr_dir[MAXPATHLEN]; + extern char backup_dir_buf[MAXPATHLEN]; + extern char *basis_dir[MAX_BASIS_DIRS+1]; + extern struct file_list *first_flist; +-extern filter_rule_list daemon_filter_list; ++extern filter_rule_list daemon_filter_list, implied_filter_list; + + uid_t our_uid; + gid_t our_gid; +@@ -611,11 +613,7 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in + rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n"); + exit_cleanup(RERR_SYNTAX); + } +- if (**remote_argv == '-') { +- if (asprintf(args + argc++, "./%s", *remote_argv++) < 0) +- out_of_memory("do_cmd"); +- } else +- args[argc++] = *remote_argv++; ++ args[argc++] = safe_arg(NULL, *remote_argv++); + remote_argc--; + } + } +@@ -642,6 +640,7 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in + #ifdef ICONV_CONST + setup_iconv(); + #endif ++ trust_sender_filter = 1; + } else if (local_server) { + /* If the user didn't request --[no-]whole-file, force + * it on, but only if we're not batch processing. */ +@@ -1080,6 +1079,7 @@ static int do_recv(int f_in, int f_out, char *local_name) + } + + am_generator = 1; ++ implied_filter_list.head = implied_filter_list.tail = NULL; + flist_receiving_enabled = True; + + io_end_multiplex_in(MPLX_SWITCHING); +@@ -1475,6 +1475,10 @@ static int start_client(int argc, char *argv[]) + rsync_port = 0; + } + ++ /* A local transfer doesn't unbackslash anything, so leave the args alone. */ ++ if (local_server) ++ old_style_args = 2; ++ + if (!rsync_port && remote_argc && !**remote_argv) /* Turn an empty arg into a dot dir. */ + *remote_argv = "."; + +@@ -1500,6 +1504,8 @@ static int start_client(int argc, char *argv[]) + char *dummy_host; + int dummy_port = rsync_port; + int i; ++ if (filesfrom_fd < 0) ++ add_implied_include(remote_argv[0], daemon_connection); + /* For remote source, any extra source args must have either + * the same hostname or an empty hostname. */ + for (i = 1; i < remote_argc; i++) { +@@ -1523,6 +1529,7 @@ static int start_client(int argc, char *argv[]) + if (!rsync_port && !*arg) /* Turn an empty arg into a dot dir. */ + arg = "."; + remote_argv[i] = arg; ++ add_implied_include(arg, daemon_connection); + } + } + +diff --git a/receiver.c b/receiver.c +index 9df603f..3182e2d 100644 +--- a/receiver.c ++++ b/receiver.c +@@ -584,10 +584,13 @@ int recv_files(int f_in, int f_out, char *local_name) + if (DEBUG_GTE(RECV, 1)) + rprintf(FINFO, "recv_files(%s)\n", fname); + +- if (daemon_filter_list.head && (*fname != '.' || fname[1] != '\0') +- && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0) { +- rprintf(FERROR, "attempt to hack rsync failed.\n"); +- exit_cleanup(RERR_PROTOCOL); ++ if (daemon_filter_list.head && (*fname != '.' || fname[1] != '\0')) { ++ int filt_flags = S_ISDIR(file->mode) ? NAME_IS_DIR : NAME_IS_FILE; ++ if (check_filter(&daemon_filter_list, FLOG, fname, filt_flags) < 0) { ++ rprintf(FERROR, "ERROR: rejecting file transfer request for daemon excluded file: %s\n", ++ fname); ++ exit_cleanup(RERR_PROTOCOL); ++ } + } + + #ifdef SUPPORT_XATTRS +diff --git a/options.c b/options.c +index 3e530c2..7582236 100644 +--- a/options.c ++++ b/options.c +@@ -99,6 +99,7 @@ int filesfrom_fd = -1; + char *filesfrom_host = NULL; + int eol_nulls = 0; + int protect_args = -1; ++int old_style_args = -1; + int human_readable = 1; + int recurse = 0; + int mkpath_dest_arg = 0; +@@ -287,7 +288,7 @@ static struct output_struct debug_words[COUNT_DEBUG+1] = { + DEBUG_WORD(DELTASUM, W_SND|W_REC, "Debug delta-transfer checksumming (levels 1-4)"), + DEBUG_WORD(DUP, W_REC, "Debug weeding of duplicate names"), + DEBUG_WORD(EXIT, W_CLI|W_SRV, "Debug exit events (levels 1-3)"), +- DEBUG_WORD(FILTER, W_SND|W_REC, "Debug filter actions (levels 1-2)"), ++ DEBUG_WORD(FILTER, W_SND|W_REC, "Debug filter actions (levels 1-3)"), + DEBUG_WORD(FLIST, W_SND|W_REC, "Debug file-list operations (levels 1-4)"), + DEBUG_WORD(FUZZY, W_REC, "Debug fuzzy scoring (levels 1-2)"), + DEBUG_WORD(GENR, W_REC, "Debug generator functions"), +@@ -575,7 +576,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, + OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE, + OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE, + OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, OPT_STDERR, +- OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, ++ OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS, + OPT_STOP_AFTER, OPT_STOP_AT, + OPT_REFUSED_BASE = 9000}; + +@@ -779,6 +780,8 @@ static struct poptOption long_options[] = { + {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 }, + {"from0", '0', POPT_ARG_VAL, &eol_nulls, 1, 0, 0}, + {"no-from0", 0, POPT_ARG_VAL, &eol_nulls, 0, 0, 0}, ++ {"old-args", 0, POPT_ARG_NONE, 0, OPT_OLD_ARGS, 0, 0}, ++ {"no-old-args", 0, POPT_ARG_VAL, &old_style_args, 0, 0, 0}, + {"protect-args", 's', POPT_ARG_VAL, &protect_args, 1, 0, 0}, + {"no-protect-args", 0, POPT_ARG_VAL, &protect_args, 0, 0, 0}, + {"no-s", 0, POPT_ARG_VAL, &protect_args, 0, 0, 0}, +@@ -1605,6 +1608,13 @@ int parse_arguments(int *argc_p, const char ***argv_p) + compress_choice = NULL; + break; + ++ case OPT_OLD_ARGS: ++ if (old_style_args <= 0) ++ old_style_args = 1; ++ else ++ old_style_args++; ++ break; ++ + case 'M': + arg = poptGetOptArg(pc); + if (*arg != '-') { +@@ -1914,6 +1924,21 @@ int parse_arguments(int *argc_p, const char ***argv_p) + max_alloc = size; + } + ++ if (old_style_args < 0) { ++ if (!am_server && protect_args <= 0 && (arg = getenv("RSYNC_OLD_ARGS")) != NULL && *arg) { ++ protect_args = 0; ++ old_style_args = atoi(arg); ++ } else ++ old_style_args = 0; ++ } else if (old_style_args) { ++ if (protect_args > 0) { ++ snprintf(err_buf, sizeof err_buf, ++ "--protect-args conflicts with --old-args.\n"); ++ return 0; ++ } ++ protect_args = 0; ++ } ++ + if (protect_args < 0) { + if (am_server) + protect_args = 0; +@@ -2451,6 +2476,71 @@ int parse_arguments(int *argc_p, const char ***argv_p) + } + + ++static char SPLIT_ARG_WHEN_OLD[1]; ++ ++/** ++ * Do backslash quoting of any weird chars in "arg", append the resulting ++ * string to the end of the "opt" (which gets a "=" appended if it is not ++ * an empty or NULL string), and return the (perhaps malloced) result. ++ * If opt is NULL, arg is considered a filename arg that allows wildcards. ++ * If it is "" or any other value, it is considered an option. ++ **/ ++char *safe_arg(const char *opt, const char *arg) ++{ ++#define SHELL_CHARS "!#$&;|<>(){}\"' \t\\" ++#define WILD_CHARS "*?[]" /* We don't allow remote brace expansion */ ++ BOOL is_filename_arg = !opt; ++ char *escapes = is_filename_arg ? SHELL_CHARS : WILD_CHARS SHELL_CHARS; ++ BOOL escape_leading_dash = is_filename_arg && *arg == '-'; ++ BOOL escape_leading_tilde = 0; ++ int len1 = opt && *opt ? strlen(opt) + 1 : 0; ++ int len2 = strlen(arg); ++ int extras = escape_leading_dash ? 2 : 0; ++ char *ret; ++ if (!protect_args && old_style_args < 2 && (!old_style_args || (!is_filename_arg && opt != SPLIT_ARG_WHEN_OLD))) { ++ const char *f; ++ if (!old_style_args && *arg == '~' && (relative_paths || !strchr(arg, '/'))) { ++ extras++; ++ escape_leading_tilde = 1; ++ } ++ for (f = arg; *f; f++) { ++ if (strchr(escapes, *f)) ++ extras++; ++ } ++ } ++ if (!len1 && !extras) ++ return (char*)arg; ++ ret = new_array(char, len1 + len2 + extras + 1); ++ if (len1) { ++ memcpy(ret, opt, len1-1); ++ ret[len1-1] = '='; ++ } ++ if (escape_leading_dash) { ++ ret[len1++] = '.'; ++ ret[len1++] = '/'; ++ extras -= 2; ++ } ++ if (!extras) ++ memcpy(ret + len1, arg, len2); ++ else { ++ const char *f = arg; ++ char *t = ret + len1; ++ if (escape_leading_tilde) ++ *t++ = '\\'; ++ while (*f) { ++ if (*f == '\\') { ++ if (!is_filename_arg || !strchr(WILD_CHARS, f[1])) ++ *t++ = '\\'; ++ } else if (strchr(escapes, *f)) ++ *t++ = '\\'; ++ *t++ = *f++; ++ } ++ } ++ ret[len1+len2+extras] = '\0'; ++ return ret; ++} ++ ++ + /** + * Construct a filtered list of options to pass through from the + * client to the server. +@@ -2633,9 +2723,7 @@ void server_options(char **args, int *argc_p) + set++; + else + set = iconv_opt; +- if (asprintf(&arg, "--iconv=%s", set) < 0) +- goto oom; +- args[ac++] = arg; ++ args[ac++] = safe_arg("--iconv", set); + } + #endif + +@@ -2701,33 +2789,24 @@ void server_options(char **args, int *argc_p) + } + + if (backup_dir) { ++ /* This split idiom allows for ~/path expansion via the shell. */ + args[ac++] = "--backup-dir"; +- args[ac++] = backup_dir; ++ args[ac++] = safe_arg("", backup_dir); + } + + /* Only send --suffix if it specifies a non-default value. */ +- if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) { +- /* We use the following syntax to avoid weirdness with '~'. */ +- if (asprintf(&arg, "--suffix=%s", backup_suffix) < 0) +- goto oom; +- args[ac++] = arg; +- } ++ if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) ++ args[ac++] = safe_arg("--suffix", backup_suffix); + +- if (checksum_choice) { +- if (asprintf(&arg, "--checksum-choice=%s", checksum_choice) < 0) +- goto oom; +- args[ac++] = arg; +- } ++ if (checksum_choice) ++ args[ac++] = safe_arg("--checksum-choice", checksum_choice); + + if (do_compression == CPRES_ZLIBX) + args[ac++] = "--new-compress"; + else if (compress_choice && do_compression == CPRES_ZLIB) + args[ac++] = "--old-compress"; +- else if (compress_choice) { +- if (asprintf(&arg, "--compress-choice=%s", compress_choice) < 0) +- goto oom; +- args[ac++] = arg; +- } ++ else if (compress_choice) ++ args[ac++] = safe_arg("--compress-choice", compress_choice); + + if (am_sender) { + if (max_delete > 0) { +@@ -2736,14 +2815,10 @@ void server_options(char **args, int *argc_p) + args[ac++] = arg; + } else if (max_delete == 0) + args[ac++] = "--max-delete=-1"; +- if (min_size >= 0) { +- args[ac++] = "--min-size"; +- args[ac++] = min_size_arg; +- } +- if (max_size >= 0) { +- args[ac++] = "--max-size"; +- args[ac++] = max_size_arg; +- } ++ if (min_size >= 0) ++ args[ac++] = safe_arg("--min-size", min_size_arg); ++ if (max_size >= 0) ++ args[ac++] = safe_arg("--max-size", max_size_arg); + if (delete_before) + args[ac++] = "--delete-before"; + else if (delete_during == 2) +@@ -2767,17 +2842,12 @@ void server_options(char **args, int *argc_p) + if (do_stats) + args[ac++] = "--stats"; + } else { +- if (skip_compress) { +- if (asprintf(&arg, "--skip-compress=%s", skip_compress) < 0) +- goto oom; +- args[ac++] = arg; +- } ++ if (skip_compress) ++ args[ac++] = safe_arg("--skip-compress", skip_compress); + } + +- if (max_alloc_arg && max_alloc != DEFAULT_MAX_ALLOC) { +- args[ac++] = "--max-alloc"; +- args[ac++] = max_alloc_arg; +- } ++ if (max_alloc_arg && max_alloc != DEFAULT_MAX_ALLOC) ++ args[ac++] = safe_arg("--max-alloc", max_alloc_arg); + + /* --delete-missing-args needs the cooperation of both sides, but + * the sender can handle --ignore-missing-args by itself. */ +@@ -2802,7 +2872,7 @@ void server_options(char **args, int *argc_p) + if (partial_dir && am_sender) { + if (partial_dir != tmp_partialdir) { + args[ac++] = "--partial-dir"; +- args[ac++] = partial_dir; ++ args[ac++] = safe_arg("", partial_dir); + } + if (delay_updates) + args[ac++] = "--delay-updates"; +@@ -2825,17 +2895,11 @@ void server_options(char **args, int *argc_p) + args[ac++] = "--use-qsort"; + + if (am_sender) { +- if (usermap) { +- if (asprintf(&arg, "--usermap=%s", usermap) < 0) +- goto oom; +- args[ac++] = arg; +- } ++ if (usermap) ++ args[ac++] = safe_arg("--usermap", usermap); + +- if (groupmap) { +- if (asprintf(&arg, "--groupmap=%s", groupmap) < 0) +- goto oom; +- args[ac++] = arg; +- } ++ if (groupmap) ++ args[ac++] = safe_arg("--groupmap", groupmap); + + if (ignore_existing) + args[ac++] = "--ignore-existing"; +@@ -2846,7 +2910,7 @@ void server_options(char **args, int *argc_p) + + if (tmpdir) { + args[ac++] = "--temp-dir"; +- args[ac++] = tmpdir; ++ args[ac++] = safe_arg("", tmpdir); + } + + if (basis_dir[0]) { +@@ -2856,7 +2920,7 @@ void server_options(char **args, int *argc_p) + */ + for (i = 0; i < basis_dir_cnt; i++) { + args[ac++] = alt_dest_opt(0); +- args[ac++] = basis_dir[i]; ++ args[ac++] = safe_arg("", basis_dir[i]); + } + } + } +@@ -2877,7 +2941,7 @@ void server_options(char **args, int *argc_p) + if (files_from && (!am_sender || filesfrom_host)) { + if (filesfrom_host) { + args[ac++] = "--files-from"; +- args[ac++] = files_from; ++ args[ac++] = safe_arg("", files_from); + if (eol_nulls) + args[ac++] = "--from0"; + } else { +@@ -2923,7 +2987,7 @@ void server_options(char **args, int *argc_p) + exit_cleanup(RERR_SYNTAX); + } + for (j = 1; j <= remote_option_cnt; j++) +- args[ac++] = (char*)remote_options[j]; ++ args[ac++] = safe_arg(SPLIT_ARG_WHEN_OLD, remote_options[j]); + } + + *argc_p = ac; +diff --git a/clientserver.c b/clientserver.c +index 48c15a6..feca9c8 100644 +--- a/clientserver.c ++++ b/clientserver.c +@@ -47,6 +47,7 @@ extern int protocol_version; + extern int io_timeout; + extern int no_detach; + extern int write_batch; ++extern int old_style_args; + extern int default_af_hint; + extern int logfile_format_has_i; + extern int logfile_format_has_o_or_i; +@@ -288,20 +289,45 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char + + sargs[sargc++] = "."; + ++ if (!old_style_args) ++ snprintf(line, sizeof line, " %.*s/", modlen, modname); ++ + while (argc > 0) { + if (sargc >= MAX_ARGS - 1) { + arg_overflow: + rprintf(FERROR, "internal: args[] overflowed in do_cmd()\n"); + exit_cleanup(RERR_SYNTAX); + } +- if (strncmp(*argv, modname, modlen) == 0 +- && argv[0][modlen] == '\0') ++ if (strncmp(*argv, modname, modlen) == 0 && argv[0][modlen] == '\0') + sargs[sargc++] = modname; /* we send "modname/" */ +- else if (**argv == '-') { +- if (asprintf(sargs + sargc++, "./%s", *argv) < 0) +- out_of_memory("start_inband_exchange"); +- } else +- sargs[sargc++] = *argv; ++ else { ++ char *arg = *argv; ++ int extra_chars = *arg == '-' ? 2 : 0; /* a leading dash needs a "./" prefix. */ ++ /* If --old-args was not specified, make sure that the arg won't split at a mod name! */ ++ if (!old_style_args && (p = strstr(arg, line)) != NULL) { ++ do { ++ extra_chars += 2; ++ } while ((p = strstr(p+1, line)) != NULL); ++ } ++ if (extra_chars) { ++ char *f = arg; ++ char *t = arg = new_array(char, strlen(arg) + extra_chars + 1); ++ if (*f == '-') { ++ *t++ = '.'; ++ *t++ = '/'; ++ } ++ while (*f) { ++ if (*f == ' ' && strncmp(f, line, modlen+2) == 0) { ++ *t++ = '['; ++ *t++ = *f++; ++ *t++ = ']'; ++ } else ++ *t++ = *f++; ++ } ++ *t = '\0'; ++ } ++ sargs[sargc++] = arg; ++ } + argv++; + argc--; + } +diff --git a/rsync.1 b/rsync.1 +index e0e13cf..e363827 100644 +--- a/rsync.1 ++++ b/rsync.1 +@@ -194,32 +194,27 @@ the hostname omitted. For instance, all these work: + .nf + rsync -av host:file1 :file2 host:file{3,4} /dest/ + rsync -av host::modname/file{1,2} host::modname/file3 /dest/ +-rsync -av host::modname/file1 ::modname/file{3,4} ++rsync -av host::modname/file1 ::modname/file{3,4} /dest/ + .fi + .RE + .P +-Older versions of rsync required using quoted spaces in the SRC, like these +-examples: ++Starting this version of rsync, filenames are passed to a remote shell ++in such a way as to preserve the characters you give it. ++Thus, if you ask for a file with spaces in the name, that's what the ++remote rsync looks for: + .RS 4 + .P + .nf +-rsync -av host:'dir1/file1 dir2/file2' /dest +-rsync host::'modname/dir1/file1 modname/dir2/file2' /dest ++rsync -aiv host:'a simple file.pdf' /dest/ + .fi + .RE + .P +-This word-splitting still works (by default) in the latest rsync, but is not as +-easy to use as the first method. +-.P +-If you need to transfer a filename that contains whitespace, you can either +-specify the \fB\-\-protect-args\fP (\fB\-s\fP) option, or you'll need to escape the +-whitespace in a way that the remote shell will understand. For instance: +-.RS 4 +-.P +-.nf +-rsync -av host:'file\\ name\\ with\\ spaces' /dest +-.fi +-.RE ++If you use scripts that have been written to manually apply extra quoting to ++the remote rsync args (or to require remote arg splitting), you can ask rsync ++to let your script handle the extra escaping. This is done by either adding ++the \fB\-\-old\-args\fP option to the rsync runs in the script (which requires ++a new rsync) or exporting \fBRSYNC_OLD_ARGS\fP=1 and \fBRSYNC_PROTECT_ARGS\fP=0 ++(which works with old or new rsync versions). + .P + .SH "CONNECTING TO AN RSYNC DAEMON" + .P +@@ -427,6 +422,7 @@ detailed description below for a complete description. + --append append data onto shorter files + --append-verify --append w/old data in file checksum + --dirs, -d transfer directories without recursing ++--old-dirs, --old-d works like --dirs when talking to old rsync + --mkpath create the destination's path component + --links, -l copy symlinks as symlinks + --copy-links, -L transform symlink into referent file/dir +@@ -515,6 +511,7 @@ detailed description below for a complete description. + --include-from=FILE read include patterns from FILE + --files-from=FILE read list of source-file names from FILE + --from0, -0 all *-from/filter files are delimited by 0s ++--old-args disable the modern arg-protection idiom + --protect-args, -s no space-splitting; wildcard chars only + --copy-as=USER[:GROUP] specify user & optional group for the copy + --address=ADDRESS bind address for outgoing socket to daemon +@@ -1950,11 +1947,10 @@ Be cautious using this, as it is possible to toggle an option that will + cause rsync to have a different idea about what data to expect next over + the socket, and that will make it fail in a cryptic fashion. + .IP +-Note that it is best to use a separate \fB\-\-remote-option\fP for each option +-you want to pass. This makes your usage compatible with the +-\fB\-\-protect-args\fP option. If that option is off, any spaces in your remote +-options will be split by the remote shell unless you take steps to protect +-them. ++Note that you should use a separate \fB\-M\fP for each remote option you ++want to pass. On older rsync versions, the presence of any spaces in the ++remote-option arg could cause it to be split into separate remote args, but ++this requires the use of \fB\-\-old\-args\fP in this version of rsync. + .IP + When performing a local transfer, the "local" side is the sender and the + "remote" side is the receiver. +@@ -2169,26 +2165,64 @@ terminated by a null ('\\0') character, not a NL, CR, or CR+LF. This + affects \fB\-\-exclude-from\fP, \fB\-\-include-from\fP, \fB\-\-files-from\fP, and any merged + files specified in a \fB\-\-filter\fP rule. It does not affect \fB\-\-cvs-exclude\fP + (since all names read from a .cvsignore file are split on whitespace). ++.IP "\fB\-\-old\-args\fP" ++This option tells rsync to stop trying to protect the arg values from ++unintended word-splitting or other misinterpretation by using its new ++backslash-escape idiom. The newest default is for remote filenames to only ++allow wildcards characters to be interpretated by the shell while ++protecting other shell-interpreted characters (and the args of options get ++even wildcards escaped). The only active wildcard characters on the remote ++side are: `*`, `?`, `[`, & `]`. ++.IP ++If you have a script that wants to use old-style arg splitting in the ++filenames, specify this option once. If the remote shell has a problem ++with any backslash escapes, specify the option twice. ++.IP ++You may also control this setting via the RSYNC_OLD_ARGS environment ++variable. If it has the value "1", rsync will default to a single-option ++setting. If it has the value "2" (or more), rsync will default to a ++repeated-option setting. If it is "0", you'll get the default escaping ++behavior. The environment is always overridden by manually specified ++positive or negative options (the negative is \fB\-\-no\-old\-args\fP). ++.IP ++Note that this option also disables the extra safety check added in this ++version of rsync, ++that ensures that a remote sender isn't including extra top-level items in ++the file-list that you didn't request. This side-effect is necessary ++because we can't know for sure what names to expect when the remote shell ++is interpreting the args. ++.IP ++This option conflicts with the \fB\-\-protect\-args\fP option. ++.IP + .IP "\fB\-\-protect-args\fP, \fB\-s\fP" + This option sends all filenames and most options to the remote rsync +-without allowing the remote shell to interpret them. This means that +-spaces are not split in names, and any non-wildcard special characters are +-not translated (such as \fB~\fP, \fB$\fP, \fB;\fP, \fB&\fP, etc.). Wildcards are expanded +-on the remote host by rsync (instead of the shell doing it). ++without allowing the remote shell to interpret them. Wildcards are ++expanded on the remote host by rsync instead of the shell doing it. ++.IP ++This is similar to the new-style backslash-escaping of args that was added ++in this version of rsync, but supports some extra features and doesn't ++rely on backslash escaping in the remote shell. + .IP + If you use this option with \fB\-\-iconv\fP, the args related to the remote side + will also be translated from the local to the remote character-set. The + translation happens before wild-cards are expanded. See also the + \fB\-\-files-from\fP option. + .IP +-You may also control this option via the RSYNC_PROTECT_ARGS environment +-variable. If this variable has a non-zero value, this option will be +-enabled by default, otherwise it will be disabled by default. Either state ++You may also control this setting via the RSYNC_PROTECT_ARGS environment ++variable. If it has a non-zero value, this setting will be enabled ++by default, otherwise it will be disabled by default. Either state + is overridden by a manually specified positive or negative version of this + option (note that \fB\-\-no-s\fP and \fB\-\-no-protect-args\fP are the negative +-versions). Since this option was first introduced in 3.0.0, you'll need to +-make sure it's disabled if you ever need to interact with a remote rsync +-that is older than that. ++versions). This environment variable is also superseded by a non-zero ++\fBRSYNC_OLD_ARGS\fP export. ++.IP ++You may need to disable this option when interacting with an older rsync ++(one prior to 3.0.0). ++.IP ++This option conflicts with the \fB\-\-old\-args\fP option. ++.IP ++Note that this option is incompatible with the use of the restricted rsync ++script (`rrsync`) since it hides options from the script's inspection. + .IP + Rsync can also be configured (at build time) to have this option enabled by + default (with is overridden by both the environment and the command-line). +@@ -2675,7 +2708,10 @@ super-user (see also the \fB\-\-fake-super\fP option). For the \fB\-\-groupmap\ + option to have any effect, the \fB\-g\fP (\fB\-\-groups\fP) option must be used (or + implied), and the receiver will need to have permissions to set that group. + .IP +-If your shell complains about the wildcards, use \fB\-\-protect-args\fP (\fB\-s\fP). ++An older rsync client may need to use \fB\-\-protect\-args\fP (\fB\-s\fP) ++to avoid a complaint about wildcard characters, but a modern rsync handles ++this automatically. ++.IP + .IP "\fB\-\-chown=USER:GROUP\fP" + This option forces all files to be owned by USER with group GROUP. This is + a simpler interface than using \fB\-\-usermap\fP and \fB\-\-groupmap\fP directly, but +@@ -2685,8 +2721,11 @@ will occur. If GROUP is empty, the trailing colon may be omitted, but if + USER is empty, a leading colon must be supplied. + .IP + If you specify "\fB\-\-chown=foo:bar\fP", this is exactly the same as specifying +-"\fB\-\-usermap=*:foo\ \-\-groupmap=*:bar\fP", only easier. If your shell complains +-about the wildcards, use \fB\-\-protect-args\fP (\fB\-s\fP). ++"\fB\-\-usermap=*:foo\ \-\-groupmap=*:bar\fP", only easier. ++.IP ++An older rsync client may need to use \fB\-\-protect\-args\fP (\fB\-s\fP) to avoid a ++complaint about wildcard characters, but a modern rsync handles this ++automatically. + .IP "\fB\-\-timeout=SECONDS\fP" + This option allows you to set a maximum I/O timeout in seconds. If no data + is transferred for the specified time then rsync will exit. The default is +@@ -4233,10 +4272,24 @@ The CVSIGNORE environment variable supplements any ignore patterns in + .IP "\fBRSYNC_ICONV\fP" + Specify a default \fB\-\-iconv\fP setting using this environment variable. (First + supported in 3.0.0.) ++.IP "\fBRSYNC_OLD_ARGS\fP" ++Specify a "1" if you want the \fB\-\-old\-args\fP option to be enabled by default, ++a "2" (or more) if you want it to be enabled in the option-repeated state, ++or a "0" to make sure that it is disabled by default. When this environment ++variable is set to a non-zero value, it supersedes the \fBRSYNC_PROTECT_ARGS\fP ++variable. ++.IP ++This variable is ignored if \fB\-\-old\-args\fP, \fB\-\-no\-old\-args\fP, or ++\fB\-\-protect\-args\fP is specified on the command line. + .IP "\fBRSYNC_PROTECT_ARGS\fP" + Specify a non-zero numeric value if you want the \fB\-\-protect-args\fP option to + be enabled by default, or a zero value to make sure that it is disabled by + default. (First supported in 3.1.0.) ++.IP ++This variable is ignored if \fB\-\-protect\-args\fP, \fB\-\-no\-protect\-args\fP, ++or \fB\-\-old\-args\fP is specified on the command line. ++.IP ++This variable is ignored if \fBRSYNC_OLD_ARGS\fP is set to a non-zero value. + .IP "\fBRSYNC_RSH\fP" + The RSYNC_RSH environment variable allows you to override the default shell + used as the transport for rsync. Command line options are permitted after diff --git a/SOURCES/rsync-3.2.3-lchmod.patch b/SOURCES/rsync-3.2.3-lchmod.patch new file mode 100644 index 0000000..e8aa0a6 --- /dev/null +++ b/SOURCES/rsync-3.2.3-lchmod.patch @@ -0,0 +1,53 @@ +diff --git a/syscall.c b/syscall.c +index b9c3b4ef..11d10e4a 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -227,27 +227,35 @@ int do_open(const char *pathname, int flags, mode_t mode) + #ifdef HAVE_CHMOD + int do_chmod(const char *path, mode_t mode) + { ++ static int switch_step = 0; + int code; + if (dry_run) return 0; + RETURN_ERROR_IF_RO_OR_LO; ++ switch (switch_step) { + #ifdef HAVE_LCHMOD +- code = lchmod(path, mode & CHMOD_BITS); +-#else +- if (S_ISLNK(mode)) { ++#include "case_N.h" ++ if ((code = lchmod(path, mode & CHMOD_BITS)) == 0 || errno != ENOTSUP) ++ break; ++ switch_step++; ++#endif ++ ++#include "case_N.h" ++ if (S_ISLNK(mode)) { + # if defined HAVE_SETATTRLIST +- struct attrlist attrList; +- uint32_t m = mode & CHMOD_BITS; /* manpage is wrong: not mode_t! */ ++ struct attrlist attrList; ++ uint32_t m = mode & CHMOD_BITS; /* manpage is wrong: not mode_t! */ + +- memset(&attrList, 0, sizeof attrList); +- attrList.bitmapcount = ATTR_BIT_MAP_COUNT; +- attrList.commonattr = ATTR_CMN_ACCESSMASK; +- code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW); ++ memset(&attrList, 0, sizeof attrList); ++ attrList.bitmapcount = ATTR_BIT_MAP_COUNT; ++ attrList.commonattr = ATTR_CMN_ACCESSMASK; ++ code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW); + # else +- code = 1; ++ code = 1; + # endif +- } else +- code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */ +-#endif /* !HAVE_LCHMOD */ ++ } else ++ code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */ ++ break; ++ } + if (code != 0 && (preserve_perms || preserve_executability)) + return code; + return 0; diff --git a/SOURCES/rsyncd.conf b/SOURCES/rsyncd.conf new file mode 100644 index 0000000..6e058aa --- /dev/null +++ b/SOURCES/rsyncd.conf @@ -0,0 +1,20 @@ +# /etc/rsyncd: configuration file for rsync daemon mode + +# See rsyncd.conf man page for more options. + +# configuration example: + +# uid = nobody +# gid = nobody +# use chroot = yes +# max connections = 4 +# pid file = /var/run/rsyncd.pid +# exclude = lost+found/ +# transfer logging = yes +# timeout = 900 +# ignore nonreadable = yes +# dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 + +# [ftp] +# path = /home/ftp +# comment = ftp export area diff --git a/SOURCES/rsyncd.service b/SOURCES/rsyncd.service new file mode 100644 index 0000000..d2d6362 --- /dev/null +++ b/SOURCES/rsyncd.service @@ -0,0 +1,12 @@ +[Unit] +Description=fast remote file copy program daemon +ConditionPathExists=/etc/rsyncd.conf +Wants=network-online.target +After=network-online.target + +[Service] +EnvironmentFile=/etc/sysconfig/rsyncd +ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS" + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/rsyncd.socket b/SOURCES/rsyncd.socket new file mode 100644 index 0000000..7306ad0 --- /dev/null +++ b/SOURCES/rsyncd.socket @@ -0,0 +1,10 @@ +[Unit] +Description=Rsync Server Socket +Conflicts=rsyncd.service + +[Socket] +ListenStream=873 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/SOURCES/rsyncd.sysconfig b/SOURCES/rsyncd.sysconfig new file mode 100644 index 0000000..90a5a43 --- /dev/null +++ b/SOURCES/rsyncd.sysconfig @@ -0,0 +1 @@ +OPTIONS="" diff --git a/SOURCES/rsyncd@.service b/SOURCES/rsyncd@.service new file mode 100644 index 0000000..89f9621 --- /dev/null +++ b/SOURCES/rsyncd@.service @@ -0,0 +1,8 @@ +[Unit] +Description=fast remote file copy program daemon +ConditionPathExists=/etc/rsyncd.conf + +[Service] +EnvironmentFile=/etc/sysconfig/rsyncd +ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS" +StandardInput=socket diff --git a/SPECS/rsync.spec b/SPECS/rsync.spec new file mode 100644 index 0000000..da08fed --- /dev/null +++ b/SPECS/rsync.spec @@ -0,0 +1,698 @@ +%global _hardened_build 1 + +%define isprerelease 0 +%define _lto_cflags %{nil} + +%if %isprerelease +%define prerelease pre1 +%endif + +Summary: A program for synchronizing files over a network +Name: rsync +Version: 3.2.3 +Release: 9%{?dist}.2 +URL: https://rsync.samba.org/ + +Source0: https://download.samba.org/pub/rsync/src/rsync-%{version}%{?prerelease}.tar.gz +Source1: https://download.samba.org/pub/rsync/src/rsync-patches-%{version}%{?prerelease}.tar.gz +Source2: rsyncd.socket +Source3: rsyncd.service +Source4: rsyncd.conf +Source5: rsyncd.sysconfig +Source6: rsyncd@.service + +BuildRequires: make +BuildRequires: gcc gcc-c++ +BuildRequires: libacl-devel, libattr-devel, autoconf, popt-devel, systemd +BuildRequires: lz4-devel openssl-devel libzstd-devel +#Added virtual provide for zlib due to https://fedoraproject.org/wiki/Bundled_Libraries?rd=Packaging:Bundled_Libraries +Provides: bundled(zlib) = 1.2.8 +License: GPLv3+ + +#Added temporarily until new rebase +Patch0: rsync-3.2.2-ssl-verify-hostname.patch +#Added due to rhbz#1873975 - default-acls test fail on s390x due to libacl +Patch1: rsync-3.2.2-runtests.patch +Patch2: rsync-3.2.3-lchmod.patch +Patch3: rsync-3.2.3-append-mode.patch +Patch4: rsync-3.2.3-cve-2018-25032.patch +Patch5: rsync-3.2.3-cve-2022-29154.patch + +%description +Rsync uses a reliable algorithm to bring remote and host files into +sync very quickly. Rsync is fast because it just sends the differences +in the files over the network instead of sending the complete +files. Rsync is often used as a very powerful mirroring process or +just as a more capable replacement for the rcp command. A technical +report which describes the rsync algorithm is included in this +package. + +%package daemon +Summary: Service for anonymous access to rsync +BuildArch: noarch +Requires: %{name} = %{version}-%{release} +%{?systemd_requires} +%description daemon +Rsync can be used to offer read only access to anonymous clients. This +package provides the anonymous rsync service. + +%prep +# TAG: for pre versions use + +%if %isprerelease +%setup -q -n rsync-%{version}%{?prerelease} +%setup -q -b 1 -n rsync-%{version}%{?prerelease} +%else +%setup -q +%setup -q -b 1 +%endif + +#Enable --copy-devices parameter +patch -p1 -i patches/copy-devices.diff + +%patch0 -p1 -b .verify-hostname +%patch1 -p1 -b .runtests +%patch2 -p1 -b .lchmod +%patch3 -p1 -b .append-mode +%patch4 -p1 -b .cve-2018-25032 +%patch5 -p1 -b .cve-2022-29154 + +%build +%configure --disable-xxhash +# --with-included-zlib=no temporary disabled because of #1043965 + +%{make_build} + +%check +make check +chmod -x support/* + +%install +%{make_install} INSTALLCMD='install -p' INSTALLMAN='install -p' + +install -D -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd.service +install -D -m644 %{SOURCE2} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd.socket +install -D -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/rsyncd.conf +install -D -m644 %{SOURCE5} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/rsyncd +install -D -m644 %{SOURCE6} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd@.service + +%files +%license COPYING +%doc support/ tech_report.tex +%{_bindir}/%{name} +%{_bindir}/%{name}-ssl +%{_mandir}/man1/%{name}.1* +%{_mandir}/man1/%{name}-ssl.1* +%{_mandir}/man5/rsyncd.conf.5* +%config(noreplace) %{_sysconfdir}/rsyncd.conf + +%files daemon +%config(noreplace) %{_sysconfdir}/sysconfig/rsyncd +%{_unitdir}/rsyncd.socket +%{_unitdir}/rsyncd.service +%{_unitdir}/rsyncd@.service + +%post daemon +%systemd_post rsyncd.service + +%preun daemon +%systemd_preun rsyncd.service + +%postun daemon +%systemd_postun_with_restart rsyncd.service + +%changelog +* Mon Aug 15 2022 Michal Ruprich - 3.2.3-9.2 +- Resolves: #2111176 - remote arbitrary files write inside the directories of connecting peers + +* Thu Apr 21 2022 Michal Ruprich - 3.2.3-9.1 +- Resolves: #2074784 - A flaw found in zlib v1.2.2.2 through zlib v1.2.11 when compressing certain inputs + +* Tue Aug 10 2021 Mohan Boddu - 3.2.3-9 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jun 16 2021 Mohan Boddu - 3.2.3-8 +- Rebuilt for RHEL 9 BETA for openssl 3.0 + Related: rhbz#1971065 + +* Mon May 31 2021 Michal Ruprich - 3.2.3-7 +- Resolves: #1955008 - rsync segfaults in --append mode when file on sender is large (> 2GB) and gets truncated + +* Fri Apr 16 2021 Mohan Boddu - 3.2.3-6 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.2.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Dec 08 2020 Michal Ruprich - 3.2.3-4 +- Resolves: #1894485 - rsync is unable to set permissions when chrooted +- Getting rid of deprecated makeinstall macro + +* Fri Nov 20 2020 Michal Ruprich - 3.2.3-3 +- Disabling LTO as a temporary measure for rhbz#1898912 + +* Thu Nov 19 2020 Michal Ruprich - 3.2.3-2 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Mon Aug 31 2020 Michal Ruprich - 3.2.3-1 +- New version 3.2.3 +- Removed upstream patches acls.diff and xattrs.diff + +* Sat Aug 01 2020 Fedora Release Engineering - 3.2.2-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 3.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 21 2020 Michal Ruprich - 3.2.2-1 +- New version 3.2.2 + +* Thu Jan 30 2020 Fedora Release Engineering - 3.1.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 10 2019 Michal Ruprich - 3.1.3-10 +- Enabling upstream test suite during build rhbz#1533846 + +* Fri Jul 26 2019 Fedora Release Engineering - 3.1.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Apr 15 2019 Michal Ruprich - 3.1.3-8 +- Resolves: #1452187 - move man page rsyncd.conf(5) from rsync-daemon to rsync package +- Moving the config file as well + +* Tue Mar 19 2019 Michal Ruprich - 3.1.3-7 +- Resolves: #1683737 - [abrt] rsync: utf8_internal_loop(): rsync killed by SIGSEGV + +* Sat Feb 02 2019 Fedora Release Engineering - 3.1.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 02 2019 Michal Ruprich - 3.1.3-5 +- Fix for rhbz#1586346 - rsyncd.service fails to start at boot if address is configured + +* Sat Jul 14 2018 Fedora Release Engineering - 3.1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Igor Gnatenko - 3.1.3-3 +- Escape macros in %%changelog + +* Tue Jan 30 2018 Michal Ruprich - 3.1.3-2 +- removed dependencies on systemd-units + +* Mon Jan 29 2018 Michal Ruprich - 3.1.3-1 +- new version 3.1.3 +- Resolves CVE-2018-5764 + +* Thu Aug 03 2017 Fedora Release Engineering - 3.1.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.1.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 28 2017 Michal Ruprich - 3.1.2-5 +- Resolves: #1459681 - rpmscripts for rsyncd.service are in the wrong package + +* Wed May 03 2017 Michal Ruprich - 3.1.2-4 +- Added virtual provide for zlib library + +* Sat Feb 11 2017 Fedora Release Engineering - 3.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 3.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 08 2016 Luboš Uhliarik - 3.1.2-1 +- new version 3.1.2 + +* Mon Nov 09 2015 Luboš Uhliarik - 3.1.1-8 +- Resolves: #1233893 - added noatime patch + +* Thu Jun 18 2015 Fedora Release Engineering - 3.1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 18 2014 Fedora Release Engineering - 3.1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 13 2014 Pavel Šimerda - 3.1.1-5 +- Related: #1123813 - fix rsync-daemon subpackage dependencywq + +* Wed Aug 13 2014 Pavel Šimerda - 3.1.1-4 +- Related: #1123813 - build rsync-daemon as noarch + +* Tue Aug 12 2014 Pavel Šimerda - 3.1.1-3 +- Resolves: #1123813 - Reduce dependencies + +* Mon Aug 4 2014 Tom Callaway - 3.1.1-2 +- fix license handling + +* Wed Jun 25 2014 Michal Luscon - 3.1.1-1 +- Update to latest upstream version 3.1.1 + +* Sun Jun 08 2014 Fedora Release Engineering - 3.1.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 30 2014 Michal Luscon - 3.1.0-5 +- Reverted: #1050081 - breaks rawhide live installation + +* Mon May 26 2014 Michal Luscon - 3.1.0-4 +- Fixed: #1050081 undo the hard-link xattr optimization + +* Wed Apr 16 2014 Michal Luscon - 3.1.0-3 +- Fixed: CVE-2014-2855 - denial of service +- Reverted: compilation with system provided zlib (#1043965) + +* Sun Oct 20 2013 Michal Lusocn - 3.1.0-2 +- Update to latest upstream 3.1.0 +- Fixed #1018520 - missing rsyncd@.service + +* Wed Aug 07 2013 Michal Luscon - 3.1.0-1pre1 +- Upstream 3.1.0 pre release +- Fixed: #495310 - rsync contains forked copy of zlib +- Fixed: #926459 - building aarch64 +- Fixed: bogus dates in changelog + +* Sun Aug 04 2013 Fedora Release Engineering - 3.0.9-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jun 28 2013 Michal Luscon - 3.0.9-11 +- Add BuildRequires: systemd-units + +* Mon Jun 17 2013 Michal Luscon - 3.0.9-10 +- Fixed: #947765 - rsync daemon chooses wrong destination place + +* Fri May 17 2013 Michal Luscon - 3.0.9-9 +- Fix missing man page and help options + +* Thu Feb 14 2013 Fedora Release Engineering - 3.0.9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 15 2012 Michal Luscon 3.0.9-6 +- Systemd units for rsync + +* Tue Oct 23 2012 Michal Luscon 3.0.9-5 +- Reverted: #495310 - rsync contains forked copy of zlib + +* Tue Oct 16 2012 Michal Luscon 3.0.9-4 +- Fixed: #823088 - rsync loses track of files with different directory prefixes +- Fixed: #495310 - rsync contains forked copy of zlib + +* Sat Jul 21 2012 Fedora Release Engineering - 3.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 3.0.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Sep 14 2011 Vojtech Vitek (V-Teq) - 3.0.9-1 +- Rebase to 3.0.9 (#741004) + +* Wed Sep 14 2011 Vojtech Vitek (V-Teq) - 3.0.8-2 +- Fix security context of symbolic links (#709779) + +* Tue Mar 29 2011 Vojtech Vitek - 3.0.8-1 +- Rebase to 3.0.8, remove buffer overflow patch (#691362, #675036) + +* Wed Feb 09 2011 Fedora Release Engineering - 3.0.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Mar 29 2010 Jan Zeleny - 3.0.7-3 +- buffer overflow patch replaced by upstream version + +* Fri Jan 22 2010 Jan Zeleny - 3.0.7-2 +- fixed issue with buffer overflow when using long filenames (#557916) + +* Tue Jan 19 2010 Jan Zeleny - 3.0.7-1 +- rebased to 3.0.7 + +* Mon Dec 07 2009 Jan Zeleny - 3.0.6-4 +- applied patch to avoid retouching dir permissions (#542679) + +* Sun Jul 26 2009 Fedora Release Engineering - 3.0.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jun 1 2009 Simo Sorce 3.0.6-2 +- Final 3.0.6 release + +* Thu May 21 2009 Ján ONDREJ (SAL) - 3.0.6-1pre1 +- Enabled patches/copy-devices.diff patch (bz#494313) + +* Wed Apr 15 2009 Simo Sorce 3.0.6-0pre1 +- First 3.0.6 pre release +- Also change the spec to simplify releasing pre-releases + +* Wed Feb 25 2009 Fedora Release Engineering - 3.0.5-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jan 1 2009 Simo Sorce 3.0.5-0.fc11 +- New upstream bugfix release + +* Mon Sep 8 2008 Simo Sorce 3.0.4-0.fc10 +- New upstream bugfix release + +* Mon Jun 30 2008 Simo Sorce 3.0.3-0.fc10 +- New upstream release + +* Tue Apr 8 2008 Simo Sorce 3.0.2-0.fc9 +- Security release: http://rsync.samba.org/security.html#s3_0_2 + +* Fri Apr 4 2008 Simo Sorce 3.0.1-2.fc9 +- Make sure support scripts are not executable so that no bad perl dependecies + are created + +* Fri Apr 4 2008 Simo Sorce 3.0.1-1.fc9 +- Add NEWS and support/ scripts in the docs section +- 3.0.1 final + +* Mon Mar 31 2008 Simo Sorce 3.0.1-0.3.pre3.fc9 +- 3.0.1 pre release #3 +- Fixes some annoying minor bugs (see release notes) + +* Thu Mar 27 2008 Simo Sorce 3.0.1-0.2.pre2.fc9 +- 3.0.1 pre release #2 +- Fixes #439074 + +* Tue Mar 25 2008 Simo Sorce 3.0.1-0.1.pre1.fc9 +- 3.0.1 pre release #1 +- Fixes #438694 + +* Sun Mar 2 2008 Simo Sorce 3.0.0-1.fc9 +- Final 3.0.0 release + +* Sat Feb 23 2008 Simo Sorce 3.0.0-0.pre10.fc9 +- Tenth preprelease of the 3.0.0 series + +* Sat Feb 16 2008 Simo Sorce 3.0.0-0.pre9.fc9 +- Ninth preprelease of the 3.0.0 series + +* Sat Feb 2 2008 Simo Sorce 3.0.0-0.pre8.fc9 +- Eight prerelease +- Add second source, now patches are in a separate file +- Add temporary fix to the xattrs.diff patch line as, in this version + the patch contains one extra humk already contained in acls.diff + +* Sat Oct 27 2007 Simo Sorce 3.0.0-0.pre4.fc9 +- Fourth prerelease + +* Mon Oct 15 2007 Simo Sorce 3.0.0-0.pre2.1.fc9 +- Add support for IPv6 by default with xinetd + +* Fri Oct 12 2007 Simo Sorce 3.0.0-0.pre2.fc9 +- Second prerelease + +* Wed Oct 10 2007 Simo Sorce 3.0.0-0.pre1.fc9 +- New Major version prerelease + +* Wed Sep 5 2007 Simo Sorce 2.6.9-3.fc8 +- Add patch to fix crash bug with hardlinks and ACLs patches + +* Mon Feb 19 2007 Adam Jackson 2.6.9-2 +- Add dist tag to Release to fix upgrades from FC5 or FC6. + +* Mon Feb 19 2007 Simo Sorce - 2.6.9-2 +- fix acl/xattr bug with --delete: (bz#229145) + +* Wed Nov 22 2006 Florian La Roche - 2.6.9-1 +- update to 2.6.9 + +* Wed Jul 12 2006 Jesse Keating - 2.6.8-3.1 +- rebuild + +* Fri Jun 9 2006 Jay Fenlason 2.6.8-3 +- Add my xattrs_bug patch to fix a bug where xattrs don't get sent correctly. +- Add BuildRequires to make sure libattr-devel and libacl-devel are avaliable +- replace --with... with --enable... so they actually work +- Add make, autoconf and gcc to BuildRequires + +* Mon May 8 2006 Jay Fenlason 2.6.8-2 +- New upstream release +- Use the upstream xattr patch instead of mine. This closes + bz#190208 CVE-2006-2083 rsync buffer overflow issue + +* Fri Feb 10 2006 Jesse Keating - 2.6.6-2.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 2.6.6-2.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Thu Jul 28 2005 Jay Fenlason 2.6.6-2 +- New upstream release. See the NEWS file for details. + +* Thu Jun 2 2005 Jay Fenlason 2.6.5-2 +- New upstream release + +* Tue May 17 2005 Jay Fenlason 2.6.5-0.pre1.0 +- new upstream pre-release + +* Tue May 17 2005 Jay Fenlason 2.6.4-3 +- Include the -address patch from upstream, to close + bz#154752 Unable to use --address in client mode + +* Thu Mar 31 2005 Jay Fenlason 2.6.4-2 +- New upstream version + +* Wed Mar 2 2005 Jay Fenlason 2.6.3-3 +- bump release, rebuild with gcc4 +- pass RPM_OPT_FLAGS to make + +* Thu Feb 10 2005 Jay Fenlason 2.6.3-2 +- Added my -xattr patch, which is based on the -acl patch. + +* Thu Sep 30 2004 Jay Fenlason 2.6.3-1 +- New upstream release. + +* Tue Sep 21 2004 Jay Fenlason 2.6.3-0.pre2 +- new upstream version. + +* Tue Aug 17 2004 Jay Fenlason 2.6.3-0.pre1 +- New upstream version with security fix for CAN-2004-0792 +- This obsoletes the -lastdir-corruption patch. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue May 25 2004 Mark McLoughlin - 2.6.2-1 +- Backport fix for crasher when passing multiple directories of the same + length (bug #123708) + +* Fri Apr 30 2004 Jay Fenlason 2.6.2-0 +- New upstream version to correct the problems with 2.6.1. + This obsoletes all the patches to 2.6.1 + +* Thu Apr 29 2004 Jay Fenlason 2.6.1-1 +- Rsync 2.6.1 final. +- Add a patch from Wayne Davison that fixes a + use of uninitilized memory in the map_uid and map_gid functions. +- Add another patch from Wayne Davidson that fixes the -R option. +- Add a patch (extracted from a patch by Sami Farin + ) to not ignore the return value + of close(). + +* Thu Mar 25 2004 Jay Fenlason 2.6.1-0.pre1 +- New upstream version + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Jan 5 2004 Jay Fenlason 2.6.0-0 +- New upstream version, obsoletes the rsync-2.5.6-signal.patch + +* Wed Dec 3 2003 Bill Nottingham 2.5.7-2 +- rebuild + +* Wed Dec 3 2003 Bill Nottingham 2.5.7-1 +- update to 2.5.7 + +* Tue Aug 05 2003 Hardy Merrill 2.5.6-20 +- rebuild in new build env + +* Tue Aug 05 2003 Lon Hohberger 2.5.6-19 +- spec file fix + +* Tue Aug 05 2003 Hardy Merrill 2.5.6-18 +- rebuild in new build env + +* Tue Aug 05 2003 Hardy Merrill 2.5.6-17 +- fixed spec - added patch0 to prep. + +* Tue Aug 05 2003 Hardy Merrill 2.5.6-16 +- rebuild in new build env + +* Mon Aug 04 2003 Hardy Merrill 2.5.6-15 +- add rsync-2.5.6-signal.patch to fix kernel warnings that + appear because socket.c sets SIGCHLD to SIG_IGN and then + calls wait. This is in response to bug#98740. This patch + *has* been committed to CVS upstream and will be in + upstream rsync-2.5.7. + +* Fri Jun 13 2003 Hardy Merrill 2.5.6-14 +- build scratch - for compile warnings + +* Fri Jun 13 2003 Hardy Merrill 2.5.6-13 +- build scratch - for compile warnings + +* Thu Jun 12 2003 Hardy Merrill 2.5.6-12 +- rebuild in new build env + +* Thu Jun 12 2003 Hardy Merrill 2.5.6-11 +- removed rsync-2.5.6-sign.patch. Upstream code + incorporates signed vs unsigned changes. + +* Wed Jun 11 2003 Hardy Merrill 2.5.6-10_CVSHEAD_signpatch +- build scratch - added rsync-2.5.6-sign.patch. + +* Wed Jun 11 2003 Hardy Merrill 2.5.6-9_CVSHEAD_nopatches +- build scratch. + +* Wed Jun 11 2003 Hardy Merrill 2.5.6-8 +- build scratch - deleted rsync-2.5.6-sign.patch. + +* Mon Jun 09 2003 Hardy Merrill 2.5.6-7 +- rebuild in new build env + +* Thu Jun 05 2003 Hardy Merrill 2.5.6-6 +- removed patch rsync-2.5.4-maxdel.patch +- removed patch rsync-2.4.6-segv.patch + - current 2.5.6 properly handles (no segfault) the situation + (rsync '[a]') that caused a need for this patch. +- added patch rsync-2.5.6-sign.patch, which is a working + subset of patches (that still apply) included in the original + rsync-2.5.4-moresignage.patch + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Tue Mar 11 2003 Hardy Merrill 2.5.6-4 +- rebuild in new build env + +* Tue Mar 11 2003 Hardy Merrill 2.5.6-3 +- fixed changelog comments + +* Mon Mar 10 2003 Hardy Merrill 2.5.6-2 +- rebuild in new build env + +* Mon Mar 10 2003 Hardy Merrill 2.5.6-1 +- update to 2.5.6 from upstream + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Fri Jan 17 2003 Hardy Merrill 2.5.5-3 +- fix spelling mistake in rsync.xinetd. #66036 & dup #75006 + +* Wed Dec 11 2002 Tim Powers 2.5.5-2 +- rebuild on all arches + +* Mon Jun 24 2002 Bill Nottingham 2.5.5-1 +- update to 2.5.5 + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Wed Apr 10 2002 Bill Nottingham 2.5.4-2 +- upstream patches: fix accidental use of --whole-file, fix + minor memory leak, and bad worst-case child kill behavior +- make passing -e to rsync:// URLs not cause an error exit (#62489) + +* Wed Mar 13 2002 Bill Nottingham 2.5.4-1 +- update to 2.5.4, do assorted patchmerging + +* Wed Feb 20 2002 Bill Nottingham +- fix --address (#60127) +- call setgroups before dropping privs () + +* Mon Jan 28 2002 Bill Nottingham +- fix some errors in the unsigned patch + +* Sun Jan 27 2002 Bill Nottingham +- rebuild to get proper LFS_CFLAGS + +* Wed Jan 23 2002 Bill Nottingham +- fix some signed/unsigned issues () +- tweak ipv6 patch (#55337, ) +- make xinetd file %%config(noreplace) + +* Fri Aug 17 2001 Bill Nottingham +- fix segfault on weird arguments (#51801) + +* Tue Jul 24 2001 Bill Nottingham +- IPv6 patch () (#47780) + +* Tue Jun 19 2001 Bill Nottingham +- add patch to fix hangs at end of sync, and other odd behaviors (#42111) + +* Sat Sep 30 2000 Florian La Roche +- add xinetd configuration + +* Tue Sep 26 2000 Bernhard Rosenkraenzer +- 2.4.6 + +* Mon Jul 31 2000 Bill Nottingham +- update to 2.4.4 - fixes yet another problem with rsh transport + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Sat Jun 10 2000 Bill Nottingham +- rebuild in new build env. + +* Mon Apr 10 2000 Bill Nottingham +- update to 2.4.3 + +* Tue Apr 4 2000 Bill Nottingham +- update to 2.4.2 + +* Tue Mar 7 2000 Bill Nottingham +- fix maxdelete behavior so it isn't sent to older servers. + +* Mon Jan 31 2000 Jeff Johnson +- update to 2.4.1. + +* Fri Dec 17 1999 Bill Nottingham +- update to 2.3.2 + +* Sat Jun 12 1999 Jeff Johnson +- add "max. delete" patch to limit damage when server is hosed. + +* Wed Apr 07 1999 Bill Nottingham +- update to 2.3.1. + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 2) + +* Tue Mar 16 1999 Jeff Johnson +- update to 2.3.0. + +* Sat Mar 13 1999 Jeff Johnson +- update to 2.3.0 beta. + +* Fri Dec 18 1998 Bill Nottingham +- update to 2.2.1 + +* Thu Sep 10 1998 Jeff Johnson +- updated to 2.1.1 + +* Mon Aug 17 1998 Erik Troan +- updated to 2.1.0 + +* Thu Aug 06 1998 Erik Troan +- buildrooted and attr-rophied +- removed tech-report.ps; the .tex should be good enough + +* Mon Aug 25 1997 John A. Martin +- Built 1.6.3-2 after finding no rsync-1.6.3-1.src.rpm although there + was an ftp://ftp.redhat.com/pub/contrib/alpha/rsync-1.6.3-1.alpha.rpm + showing no packager nor signature but giving + "Source RPM: rsync-1.6.3-1.src.rpm". +- Changes from 1.6.2-1 packaging: added '$RPM_OPT_FLAGS' to make, strip + to '%%build', removed '%%prefix'. + +* Thu Apr 10 1997 Michael De La Rue +- rsync-1.6.2-1 packaged. (This entry by jam to credit Michael for the + previous package(s).)