A System and Service Manager
CentOS Sources
2017-10-19 48aa7f4353f57e2f15ea07db19a23c04c28a40f4
import systemd-219-42.el7_4.4
3 files added
1 files modified
119 ■■■■■ changed files
SOURCES/0500-sysctl-fix-uninitialized-variable.patch 27 ●●●●● patch | view | raw | blame | history
SOURCES/0501-udev-ignore-SIGCHLD-from-unexpected-processes-130653.patch 30 ●●●●● patch | view | raw | blame | history
SOURCES/0502-manager-when-reexecuting-try-to-connect-to-bus-only-.patch 48 ●●●●● patch | view | raw | blame | history
SPECS/systemd.spec 14 ●●●●● patch | view | raw | blame | history
SOURCES/0500-sysctl-fix-uninitialized-variable.patch
New file
@@ -0,0 +1,27 @@
From 6fd8e5c41ffd14038accd866ccd81d9a35cb3291 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Fri, 25 Aug 2017 13:13:50 +0200
Subject: [PATCH] sysctl: fix uninitialized variable
RHEL-only
Reported-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Resolves: #1485121
---
 src/sysctl/sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
index bb2bea7..7fb016c 100644
--- a/src/sysctl/sysctl.c
+++ b/src/sysctl/sysctl.c
@@ -91,7 +91,7 @@ static int apply_sysctl(const char *property, const char *value) {
 }
 static int apply_all(OrderedHashmap *sysctl_options) {
-        int r;
+        int r = 0;
         char *property, *value;
         Iterator i;
SOURCES/0501-udev-ignore-SIGCHLD-from-unexpected-processes-130653.patch
New file
@@ -0,0 +1,30 @@
From 8b998d862e401c252c4323974698691e67846412 Mon Sep 17 00:00:00 2001
From: Jan Synacek <jsynacek@redhat.com>
Date: Tue, 15 Aug 2017 13:29:51 +0200
Subject: [PATCH] udev: ignore SIGCHLD from unexpected processes (#1306539)
RHEL-only
Author: grzegorz.halat@motorolasolutions.com
Resolves: #1306539
---
 src/udev/udev-event.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index bc115f1..0ba0792 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -610,7 +610,11 @@ static int spawn_wait(struct udev_event *event,
                                 event->sigterm = true;
                                 break;
                         case SIGCHLD:
-                                if (waitpid(pid, &status, WNOHANG) < 0)
+                                if (pid != (pid_t) fdsi.ssi_pid) {
+                                        log_debug("expected SIGCHLD from '%s' ["PID_FMT"] received from unknown process ["PID_FMT"]. Ignoring", cmd, pid, fdsi.ssi_pid);
+                                        continue;
+                                }
+                                if (waitpid(pid, &status, WNOHANG) <= 0)
                                         break;
                                 if (WIFEXITED(status)) {
                                         log_debug("'%s' ["PID_FMT"] exit with return code %i", cmd, pid, WEXITSTATUS(status));
SOURCES/0502-manager-when-reexecuting-try-to-connect-to-bus-only-.patch
New file
@@ -0,0 +1,48 @@
From 156f59bc8c84fd0015b8170f6c4af9eadd1b5cfa Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekletar@users.noreply.github.com>
Date: Fri, 8 Sep 2017 15:41:44 +0200
Subject: [PATCH] manager: when reexecuting try to connect to bus only when
 dbus.service is around (#6773)
Trying to connect otherwise is pointless, because if socket isn't around
we won't connect. However, when dbus.socket is present we attempt to
connect. That attempt can't succeed because we are then supposed
to activate dbus.service as a response to connection from
us. This results in deadlock.
Fixes #6303
(cherry picked from commit 5463fa0a88f95d2002858592578f9bf4e0d2660a)
Resolves: #1465737
---
 src/core/manager.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 287cf6a..041fac4 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -799,16 +799,19 @@ static int manager_setup_kdbus(Manager *m) {
 static int manager_connect_bus(Manager *m, bool reexecuting) {
         bool try_bus_connect;
+        Unit *u = NULL;
         assert(m);
         if (m->test_run)
                 return 0;
+        u = manager_get_unit(m, SPECIAL_DBUS_SERVICE);
+
         try_bus_connect =
-                m->kdbus_fd >= 0 ||
-                reexecuting ||
-                (m->running_as == SYSTEMD_USER && getenv("DBUS_SESSION_BUS_ADDRESS"));
+                (u && UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u))) &&
+                (reexecuting ||
+                (m->running_as == SYSTEMD_USER && getenv("DBUS_SESSION_BUS_ADDRESS")));
         /* Try to connect to the busses, if possible. */
         return bus_init(m, try_bus_connect);
SPECS/systemd.spec
@@ -7,7 +7,7 @@
Name:           systemd
Url:            http://www.freedesktop.org/wiki/Software/systemd
Version:        219
Release:        42%{?dist}.1
Release:        42%{?dist}.4
# For a breakdown of the licensing, see README
License:        LGPLv2+ and MIT and GPLv2+
Summary:        A System and Service Manager
@@ -538,6 +538,9 @@
Patch0497: 0497-rules-move-cpu-hotplug-rule-to-separate-file.patch
Patch0498: 0498-Revert-rules-move-cpu-hotplug-rule-to-separate-file.patch
Patch0499: 0499-Revert-udev-net_id-add-support-for-phys_port_name-at.patch
Patch0500: 0500-sysctl-fix-uninitialized-variable.patch
Patch0501: 0501-udev-ignore-SIGCHLD-from-unexpected-processes-130653.patch
Patch0502: 0502-manager-when-reexecuting-try-to-connect-to-bus-only-.patch
%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);}
@@ -1506,6 +1509,15 @@
%{_mandir}/man8/systemd-resolved.*
%changelog
* Fri Sep 29 2017 Lukas Nykryn <lnykryn@redhat.com> - 219-42.4
- manager: when reexecuting try to connect to bus only when dbus.service is around (#6773) (#1465737)
* Mon Sep 25 2017 Lukas Nykryn <lnykryn@redhat.com> - 219-42.3
- udev: ignore SIGCHLD from unexpected processes (#1306539) (#1306539)
* Thu Sep 21 2017 Lukas Nykryn <lnykryn@redhat.com> - 219-42.2
- sysctl: fix uninitialized variable (#1485121)
* Tue Aug 15 2017 Lukas Nykryn <lnykryn@redhat.com> - 219-42.1
- Revert "udev: net_id: add support for phys_port_name attribute (#4506)" (#1477285)
- reintroduce naming based on phys_port_name for mlxsw and rocker via udev rule