[OE-core] [sumo] [PATCH v1] systemd: Assertion 'fd' failed at ../systemd/src/basic/socket-util.c

Sinan Kaya okaya at kernel.org
Tue May 21 02:41:36 UTC 2019


Signed-off-by: Sinan Kaya <okaya at kernel.org>
---
 ...ket-util-fix-getpeergroups-assert-fd.patch | 30 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_237.bb      |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0036-socket-util-fix-getpeergroups-assert-fd.patch

diff --git a/meta/recipes-core/systemd/systemd/0036-socket-util-fix-getpeergroups-assert-fd.patch b/meta/recipes-core/systemd/systemd/0036-socket-util-fix-getpeergroups-assert-fd.patch
new file mode 100644
index 00000000000..af26c2cd44e
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0036-socket-util-fix-getpeergroups-assert-fd.patch
@@ -0,0 +1,30 @@
+From 7f5128ee70ea66281edc1d3188b1b305662f4fd5 Mon Sep 17 00:00:00 2001
+From: Vito Caputo <vcaputo at pengaru.com>
+Date: Fri, 2 Feb 2018 20:28:21 -0800
+Subject: [PATCH] socket-util: fix getpeergroups() assert(fd)
+
+Don't assert on zero-value fds.
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/pull/8080/commits/e8dbdb02ed8483a359c1e4c2f28fff526f950a82]
+
+Signed-off-by: Sinan Kaya <okaya at kernel.org>
+---
+ src/basic/socket-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
+index 67aedadd45..39eb2fdea1 100644
+--- a/src/basic/socket-util.c
++++ b/src/basic/socket-util.c
+@@ -1018,7 +1018,7 @@ int getpeergroups(int fd, gid_t **ret) {
+         socklen_t n = sizeof(gid_t) * 64;
+         _cleanup_free_ gid_t *d = NULL;
+ 
+-        assert(fd);
++        assert(fd >= 0);
+         assert(ret);
+ 
+         for (;;) {
+-- 
+2.21.0
+
diff --git a/meta/recipes-core/systemd/systemd_237.bb b/meta/recipes-core/systemd/systemd_237.bb
index a409b182979..d84c50c713a 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -54,6 +54,7 @@ SRC_URI += "file://touchscreen.rules \
            file://libmount.patch \
            file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \
            file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
+           file://0036-socket-util-fix-getpeergroups-assert-fd.patch \
            "
 SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
 
-- 
2.21.0



More information about the Openembedded-core mailing list