From da6a52f691ef980bab92d003d5df8f463c623af8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 10 Mar 2018 19:15:28 +0000 Subject: gentoo resync : 10.03.2018 --- ...o-not-try-to-close-already-closed-fd-8392.patch | 26 +++++++++++++ ...e-do-not-free-heap-allocated-strings-8391.patch | 44 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 sys-apps/systemd/files/238-0001-sd-bus-do-not-try-to-close-already-closed-fd-8392.patch create mode 100644 sys-apps/systemd/files/238-0002-core-do-not-free-heap-allocated-strings-8391.patch (limited to 'sys-apps/systemd/files') diff --git a/sys-apps/systemd/files/238-0001-sd-bus-do-not-try-to-close-already-closed-fd-8392.patch b/sys-apps/systemd/files/238-0001-sd-bus-do-not-try-to-close-already-closed-fd-8392.patch new file mode 100644 index 000000000000..c39575c62b67 --- /dev/null +++ b/sys-apps/systemd/files/238-0001-sd-bus-do-not-try-to-close-already-closed-fd-8392.patch @@ -0,0 +1,26 @@ +From 5681f772d7bc8226cb10bfc7f9fba0a29e34a54d Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Thu, 8 Mar 2018 22:19:35 +0900 +Subject: [PATCH 1/2] sd-bus: do not try to close already closed fd (#8392) + +Fixes #8376, which is introduced by 2b33ab0957f453a06b58e4bee482f2c2d4e100c1. +--- + src/libsystemd/sd-bus/bus-socket.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c +index b5160cff6..166fba157 100644 +--- a/src/libsystemd/sd-bus/bus-socket.c ++++ b/src/libsystemd/sd-bus/bus-socket.c +@@ -960,8 +960,6 @@ int bus_socket_exec(sd_bus *b) { + if (r == 0) { + /* Child */ + +- safe_close(s[0]); +- + if (rearrange_stdio(s[1], s[1], STDERR_FILENO) < 0) + _exit(EXIT_FAILURE); + +-- +2.16.2 + diff --git a/sys-apps/systemd/files/238-0002-core-do-not-free-heap-allocated-strings-8391.patch b/sys-apps/systemd/files/238-0002-core-do-not-free-heap-allocated-strings-8391.patch new file mode 100644 index 000000000000..3ee2527f77d2 --- /dev/null +++ b/sys-apps/systemd/files/238-0002-core-do-not-free-heap-allocated-strings-8391.patch @@ -0,0 +1,44 @@ +From 84c5e8010042788a03cff680592b37257b2a6de0 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Thu, 8 Mar 2018 22:21:54 +0900 +Subject: [PATCH 2/2] core: do not free heap-allocated strings (#8391) + +Fixes #8387. +--- + src/core/mount-setup.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c +index 536c17b4d..9c27972af 100644 +--- a/src/core/mount-setup.c ++++ b/src/core/mount-setup.c +@@ -248,6 +248,7 @@ int mount_setup_early(void) { + + int mount_cgroup_controllers(char ***join_controllers) { + _cleanup_set_free_free_ Set *controllers = NULL; ++ bool has_argument = !!join_controllers; + int r; + + if (!cg_is_legacy_wanted()) +@@ -255,7 +256,7 @@ int mount_cgroup_controllers(char ***join_controllers) { + + /* Mount all available cgroup controllers that are built into the kernel. */ + +- if (!join_controllers) ++ if (!has_argument) + /* The defaults: + * mount "cpu" + "cpuacct" together, and "net_cls" + "net_prio". + * +@@ -300,7 +301,8 @@ int mount_cgroup_controllers(char ***join_controllers) { + + t = set_remove(controllers, *i); + if (!t) { +- free(*i); ++ if (has_argument) ++ free(*i); + continue; + } + } +-- +2.16.2 + -- cgit v1.2.3