summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 444865da86..94cc101738 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -771,7 +771,7 @@ static int setup_pam(
};
pam_handle_t *handle = NULL;
- sigset_t ss, old_ss;
+ sigset_t old_ss;
int pam_code = PAM_SUCCESS;
int err;
char **e = NULL;
@@ -868,6 +868,11 @@ static int setup_pam(
/* Check if our parent process might already have
* died? */
if (getppid() == parent_pid) {
+ sigset_t ss;
+
+ assert_se(sigemptyset(&ss) >= 0);
+ assert_se(sigaddset(&ss, SIGTERM) >= 0);
+
for (;;) {
if (sigwait(&ss, &sig) < 0) {
if (errno == EINTR)
@@ -1509,7 +1514,6 @@ static int exec_child(
}
}
-#ifdef ENABLE_KDBUS
if (params->bus_endpoint_fd >= 0 && context->bus_endpoint) {
uid_t ep_uid = (uid == UID_INVALID) ? 0 : uid;
@@ -1519,7 +1523,6 @@ static int exec_child(
return r;
}
}
-#endif
/* If delegation is enabled we'll pass ownership of the cgroup
* (but only in systemd's own controller hierarchy!) to the