Skip to content

Commit b9e5f07

Browse files
Merge branch 'master' into feat/rsh-rsync-flag-split
2 parents 59d95cf + 321dd78 commit b9e5f07

27 files changed

+284
-64
lines changed

.github/workflows/cygwin-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: ssl file list
4444
run: bash -c 'PATH="/usr/local/bin:$PATH" rsync-ssl --no-motd download.samba.org::rsyncftp/ || true'
4545
- name: save artifact
46-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4747
with:
4848
name: cygwin-bin
4949
path: |

.github/workflows/freebsd-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
./rsync --version
3737
./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
3838
- name: save artifact
39-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
4040
with:
4141
name: freebsd-bin
4242
path: |

.github/workflows/solaris-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
./rsync --version
3737
./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
3838
- name: save artifact
39-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
4040
with:
4141
name: solaris-bin
4242
path: |

.github/workflows/ubuntu-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: ssl file list
4444
run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
4545
- name: save artifact
46-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4747
with:
4848
name: ubuntu-bin
4949
path: |

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,4 +358,4 @@ doxygen:
358358
.PHONY: doxygen-upload
359359
doxygen-upload:
360360
rsync -avzv $(srcdir)/dox/html/ --delete \
361-
$${SAMBA_HOST-samba.org}:/home/httpd/html/rsync/doxygen/head/
361+
$${RSYNC_SAMBA_HOST-samba.org}:/home/httpd/html/rsync/doxygen/head/

NEWS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@
22

33
## Changes in this version:
44

5+
### SECURITY FIXES:
6+
7+
- Fixed a buffer overflow when the sum2 digest algorithm is SHA1.
8+
59
### BUG FIXES:
610

711
- Fixed the included popt to avoid a memory error on modern gcc versions.
812

13+
- Fixed an incorrect extern variable's type that caused an ACL issue on macOS.
14+
915
### INTERNAL:
1016

11-
- Updated included popt to version 1.19.
17+
- Updated included popt to version 1.19.
18+
19+
### DEVELOPER RELATED:
20+
21+
- Various improvements to the release scripts and git setup.
22+
23+
- Improved packaging/var-checker to identify variable type issues.
1224

1325
------------------------------------------------------------------------------
1426

@@ -4776,7 +4788,7 @@
47764788

47774789
| RELEASE DATE | VER. | DATE OF COMMIT\* | PROTOCOL |
47784790
|--------------|--------|------------------|-------------|
4779-
| ?? Apr 2024 | 3.3.1 | | 31 |
4791+
| ?? Nov 2024 | 3.3.1 | | 31 |
47804792
| 06 Apr 2024 | 3.3.0 | | 31 |
47814793
| 20 Oct 2022 | 3.2.7 | | 31 |
47824794
| 09 Sep 2022 | 3.2.6 | | 31 |

acls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern int dry_run;
2828
extern int am_root;
2929
extern int read_only;
3030
extern int list_only;
31-
extern int orig_umask;
31+
extern mode_t orig_umask;
3232
extern int numeric_ids;
3333
extern int inc_recurse;
3434
extern int preserve_devices;
@@ -982,7 +982,7 @@ static int set_rsync_acl(const char *fname, acl_duo *duo_item,
982982
&& !pack_smb_acl(&duo_item->sacl, &duo_item->racl))
983983
return -1;
984984
#ifdef HAVE_OSX_ACLS
985-
mode = 0; /* eliminate compiler warning */
985+
(void)mode; /* eliminate compiler warning */
986986
#else
987987
if (type == SMB_ACL_TYPE_ACCESS) {
988988
cur_mode = change_sacl_perms(duo_item->sacl, &duo_item->racl, cur_mode, mode);

configure.ac

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,26 @@ case $host_os in
424424
* ) AC_MSG_RESULT(no);;
425425
esac
426426

427+
# We default to using our zlib unless --with-included-zlib=no is given.
428+
if test x"$with_included_zlib" != x"no"; then
429+
with_included_zlib=yes
430+
elif test x"$ac_cv_header_zlib_h" != x"yes"; then
431+
with_included_zlib=yes
432+
fi
433+
if test x"$with_included_zlib" != x"yes"; then
434+
AC_CHECK_LIB(z, deflateParams, , [with_included_zlib=yes])
435+
fi
436+
437+
AC_MSG_CHECKING([whether to use included zlib])
438+
if test x"$with_included_zlib" = x"yes"; then
439+
AC_MSG_RESULT($srcdir/zlib)
440+
BUILD_ZLIB='$(zlib_OBJS)'
441+
CFLAGS="-I$srcdir/zlib $CFLAGS"
442+
else
443+
AC_DEFINE(EXTERNAL_ZLIB, 1, [Define to 1 if using external zlib])
444+
AC_MSG_RESULT(no)
445+
fi
446+
427447
AC_MSG_CHECKING([whether to enable use of openssl crypto library])
428448
AC_ARG_ENABLE([openssl],
429449
AS_HELP_STRING([--disable-openssl],[disable to omit openssl crypto library]))
@@ -1096,26 +1116,6 @@ else
10961116
AC_MSG_RESULT(no)
10971117
fi
10981118

1099-
# We default to using our zlib unless --with-included-zlib=no is given.
1100-
if test x"$with_included_zlib" != x"no"; then
1101-
with_included_zlib=yes
1102-
elif test x"$ac_cv_header_zlib_h" != x"yes"; then
1103-
with_included_zlib=yes
1104-
fi
1105-
if test x"$with_included_zlib" != x"yes"; then
1106-
AC_CHECK_LIB(z, deflateParams, , [with_included_zlib=yes])
1107-
fi
1108-
1109-
AC_MSG_CHECKING([whether to use included zlib])
1110-
if test x"$with_included_zlib" = x"yes"; then
1111-
AC_MSG_RESULT($srcdir/zlib)
1112-
BUILD_ZLIB='$(zlib_OBJS)'
1113-
CFLAGS="-I$srcdir/zlib $CFLAGS"
1114-
else
1115-
AC_DEFINE(EXTERNAL_ZLIB, 1, [Define to 1 if using external zlib])
1116-
AC_MSG_RESULT(no)
1117-
fi
1118-
11191119
AC_CACHE_CHECK([for unsigned char],rsync_cv_SIGNED_CHAR_OK,[
11201120
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char *s = (signed char *)""]])],[rsync_cv_SIGNED_CHAR_OK=yes],[rsync_cv_SIGNED_CHAR_OK=no])])
11211121
if test x"$rsync_cv_SIGNED_CHAR_OK" = x"yes"; then

io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ extern int read_batch;
5555
extern int compat_flags;
5656
extern int protect_args;
5757
extern int checksum_seed;
58+
extern int xfer_sum_len;
5859
extern int daemon_connection;
5960
extern int protocol_version;
6061
extern int remove_source_files;
@@ -1977,7 +1978,7 @@ void read_sum_head(int f, struct sum_struct *sum)
19771978
exit_cleanup(RERR_PROTOCOL);
19781979
}
19791980
sum->s2length = protocol_version < 27 ? csum_length : (int)read_int(f);
1980-
if (sum->s2length < 0 || sum->s2length > MAX_DIGEST_LEN) {
1981+
if (sum->s2length < 0 || sum->s2length > xfer_sum_len) {
19811982
rprintf(FERROR, "Invalid checksum length %d [%s]\n",
19821983
sum->s2length, who_am_i());
19831984
exit_cleanup(RERR_PROTOCOL);

lib/pool_alloc.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct alloc_pool
99
size_t size; /* extent size */
1010
size_t quantum; /* allocation quantum */
1111
struct pool_extent *extents; /* top extent is "live" */
12-
void (*bomb)(); /* called if malloc fails */
12+
void (*bomb)(const char*, const char*, int); /* called if malloc fails */
1313
int flags;
1414

1515
/* statistical data */
@@ -42,6 +42,7 @@ struct align_test {
4242
/* Temporarily cast a void* var into a char* var when adding an offset (to
4343
* keep some compilers from complaining about the pointer arithmetic). */
4444
#define PTR_ADD(b,o) ( (void*) ((char*)(b) + (o)) )
45+
#define PTR_SUB(b,o) ( (void*) ((char*)(b) - (o)) )
4546

4647
alloc_pool_t
4748
pool_create(size_t size, size_t quantum, void (*bomb)(const char*, const char*, int), int flags)
@@ -100,7 +101,7 @@ pool_destroy(alloc_pool_t p)
100101
for (cur = pool->extents; cur; cur = next) {
101102
next = cur->next;
102103
if (pool->flags & POOL_PREPEND)
103-
free(PTR_ADD(cur->start, -sizeof (struct pool_extent)));
104+
free(PTR_SUB(cur->start, sizeof (struct pool_extent)));
104105
else {
105106
free(cur->start);
106107
free(cur);
@@ -235,7 +236,7 @@ pool_free(alloc_pool_t p, size_t len, void *addr)
235236
if (cur->free + cur->bound >= pool->size) {
236237
prev->next = cur->next;
237238
if (pool->flags & POOL_PREPEND)
238-
free(PTR_ADD(cur->start, -sizeof (struct pool_extent)));
239+
free(PTR_SUB(cur->start, sizeof (struct pool_extent)));
239240
else {
240241
free(cur->start);
241242
free(cur);
@@ -292,7 +293,7 @@ pool_free_old(alloc_pool_t p, void *addr)
292293
while ((cur = next) != NULL) {
293294
next = cur->next;
294295
if (pool->flags & POOL_PREPEND)
295-
free(PTR_ADD(cur->start, -sizeof (struct pool_extent)));
296+
free(PTR_SUB(cur->start, sizeof (struct pool_extent)));
296297
else {
297298
free(cur->start);
298299
free(cur);

0 commit comments

Comments
 (0)