fix coredump in sssd.service
(cherry picked from commit aa558ab82f79ac6a197c8dfb4e3529024eb045fd)
This commit is contained in:
parent
7f3fa29bfe
commit
a7c9cdce95
47
MONITOR-fix-socket_activated-flag-initialization.patch
Normal file
47
MONITOR-fix-socket_activated-flag-initialization.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From d4f7ed69dbd3aad3be2c52d2da5f75af6d32e3c0 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Tikhonov <atikhono@redhat.com>
|
||||
Date: Mon, 13 Feb 2023 17:48:41 +0100
|
||||
Subject: [PATCH] MONITOR: fix `socket_activated` flag initialization
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When socket activated service connects for the first time, it is added to
|
||||
`mt_ctx->svc_list` by `socket_activated_service_not_found()` with a proper
|
||||
`socket_activated = true`.
|
||||
But when it reconnects again, `get_service_in_the_list()` finds it in
|
||||
`mt_ctx->svc_list` and overwrites `socket_activated = false` unconditionally.
|
||||
This patch moves `socket_activated = false` to `start_service()`.
|
||||
|
||||
Resolves: https://github.com/SSSD/sssd/issues/6324
|
||||
|
||||
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
|
||||
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
||||
---
|
||||
src/monitor/monitor.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
|
||||
index 6d3d05cd3..0972465f9 100644
|
||||
--- a/src/monitor/monitor.c
|
||||
+++ b/src/monitor/monitor.c
|
||||
@@ -242,7 +242,6 @@ get_service_in_the_list(struct mt_ctx *mt_ctx,
|
||||
|
||||
for (svc = mt_ctx->svc_list; svc != NULL; svc = svc->next) {
|
||||
if (strcasecmp(svc->identity, svc_name) == 0) {
|
||||
- svc->socket_activated = false;
|
||||
*_svc = svc;
|
||||
return EOK;
|
||||
}
|
||||
@@ -1802,6 +1801,8 @@ static int start_service(struct mt_svc *svc)
|
||||
|
||||
DEBUG(SSSDBG_CONF_SETTINGS,"Queueing service %s for startup\n", svc->name);
|
||||
|
||||
+ svc->socket_activated = false;
|
||||
+
|
||||
tv = tevent_timeval_current();
|
||||
|
||||
/* Add a timed event to start up the service.
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
Name: sssd
|
||||
Version: 2.8.2
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: System Security Services Daemon
|
||||
License: GPLv3+ and LGPLv3+
|
||||
URL: https://pagure.io/SSSD/sssd/
|
||||
Source0: https://github.com/SSSD/sssd/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch6000: MONITOR-fix-socket_activated-flag-initialization.patch
|
||||
|
||||
Requires: python3-sssd = %{version}-%{release}
|
||||
Requires: libldb
|
||||
Requires: cyrus-sasl-gssapi%{?_isa}
|
||||
@ -532,6 +534,9 @@ fi
|
||||
%systemd_postun_with_restart sssd.service
|
||||
|
||||
%changelog
|
||||
* Wed Mar 08 2023 zhouchenchen123 <zhouchenchen@huawei.com> - 2.8.2-4
|
||||
- fix coredump in sssd.service
|
||||
|
||||
* Tue Mar 07 2023 zhouchenchen123 <zhouchenchen@huawei.com> - 2.8.2-3
|
||||
- move oidc_child rpath build
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user