[SCM] Samba Shared Repository - branch v4-13-test updated

Karolin Seeger kseeger at samba.org
Tue Jan 5 12:51:01 UTC 2021


The branch, v4-13-test has been updated
       via  c5159bd6d76 bootstrap: Cope with case changes in CentOS 8 repo names
       via  6e6a16d8805 lib: Avoid declaring zero-length VLAs in various messaging functions
      from  6f4f529dded VERSION: Bump version up to 4.13.4...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-13-test


- Log -----------------------------------------------------------------
commit c5159bd6d7678b62461da785a2994f1cf97ca5db
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Dec 9 00:03:47 2020 +1100

    bootstrap: Cope with case changes in CentOS 8 repo names
    
    RN: Be more flexible with repository names in CentOS 8 test environments
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14594
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (backported from commit 1c59f49aaede8ec1662d4e49aef84fcd902a8a76)
    
    Autobuild-User(v4-13-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-13-test): Tue Jan  5 12:50:02 UTC 2021 on sn-devel-184

commit 6e6a16d88050ee7930f74e12615c0e046c3f9f77
Author: Dimitry Andric <dimitry at andric.com>
Date:   Fri Jan 1 18:25:48 2021 +0100

    lib: Avoid declaring zero-length VLAs in various messaging functions
    
    In messaging_rec_create(), messaging_recv_cb() and
    messaging_dispatch_rec(), variable length arrays of file descriptors are
    declared using an incoming num_fds parameter.
    
    However, there are several scenarios where num_fds can be zero, and
    declaring a zero-length VLA is undefined behavior. This can lead to
    segmentation faults and/or other crashes when compiling with recent
    versions of clang at high optimization levels.
    
    To avoid ever using zero as the length for these declarations, use
    MAX(1, length) instead.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14605
    
    Signed-off-by: Dimitry Andric <dimitry at andric.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Mon Jan  4 10:50:07 UTC 2021 on sn-devel-184
    
    (cherry picked from commit 3e96c95d41e4ccd0bf43b3ee78af644e2bc32e30)

-----------------------------------------------------------------------

Summary of changes:
 .gitlab-ci.yml                                 | 2 +-
 bootstrap/config.py                            | 6 ++++--
 bootstrap/generated-dists/centos8/bootstrap.sh | 6 ++++--
 bootstrap/sha1sum.txt                          | 2 +-
 source3/lib/messages.c                         | 6 +++---
 5 files changed, 13 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c657b4a1d8f..0004820968a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@ variables:
   # Set this to the contents of bootstrap/sha1sum.txt
   # which is generated by bootstrap/template.py --render
   #
-  SAMBA_CI_CONTAINER_TAG: 1275dc52ac8c1de5981f267df88b85b6f87e299a
+  SAMBA_CI_CONTAINER_TAG: b5b78cacae2fa6cec91925170bc6d4e3774cac9b
   #
   # We use the ubuntu1804 image as default as
   # it matches what we have on sn-devel-184.
diff --git a/bootstrap/config.py b/bootstrap/config.py
index 24f21a3c749..320a28e0f00 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -232,8 +232,10 @@ yum install -y dnf-plugins-core
 yum install -y epel-release
 
 yum -v repolist all
-yum config-manager --set-enabled PowerTools -y
-yum config-manager --set-enabled Devel -y
+yum config-manager --set-enabled PowerTools -y || \
+    yum config-manager --set-enabled powertools -y
+yum config-manager --set-enabled Devel -y || \
+    yum config-manager --set-enabled devel -y
 yum update -y
 
 yum install -y \
diff --git a/bootstrap/generated-dists/centos8/bootstrap.sh b/bootstrap/generated-dists/centos8/bootstrap.sh
index b494d0040dd..eeea0e8f3b3 100755
--- a/bootstrap/generated-dists/centos8/bootstrap.sh
+++ b/bootstrap/generated-dists/centos8/bootstrap.sh
@@ -12,8 +12,10 @@ yum install -y dnf-plugins-core
 yum install -y epel-release
 
 yum -v repolist all
-yum config-manager --set-enabled PowerTools -y
-yum config-manager --set-enabled Devel -y
+yum config-manager --set-enabled PowerTools -y || \
+    yum config-manager --set-enabled powertools -y
+yum config-manager --set-enabled Devel -y || \
+    yum config-manager --set-enabled devel -y
 yum update -y
 
 yum install -y \
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index 345d4a95e98..9101ad627cc 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-1275dc52ac8c1de5981f267df88b85b6f87e299a
+b5b78cacae2fa6cec91925170bc6d4e3774cac9b
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index c63b027c617..448e5d5a2b6 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -157,7 +157,7 @@ struct messaging_rec *messaging_rec_create(
 
 	{
 		struct messaging_rec rec;
-		int64_t fds64[num_fds];
+		int64_t fds64[MAX(1, num_fds)];
 		size_t i;
 
 		for (i=0; i<num_fds; i++) {
@@ -391,7 +391,7 @@ static void messaging_recv_cb(struct tevent_context *ev,
 		private_data, struct messaging_context);
 	struct server_id_buf idbuf;
 	struct messaging_rec rec;
-	int64_t fds64[MIN(num_fds, INT8_MAX)];
+	int64_t fds64[MAX(1, MIN(num_fds, INT8_MAX))];
 	size_t i;
 
 	if (msg_len < MESSAGE_HDR_LENGTH) {
@@ -1371,7 +1371,7 @@ static void messaging_dispatch_rec(struct messaging_context *msg_ctx,
 
 	if (ev != msg_ctx->event_ctx) {
 		struct iovec iov;
-		int fds[rec->num_fds];
+		int fds[MAX(1, rec->num_fds)];
 		int ret;
 
 		/*


-- 
Samba Shared Repository



More information about the samba-cvs mailing list