fix coredump in sssd.service
This commit is contained in:
parent
d427d26927
commit
928c00e98a
@ -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,6 +1,6 @@
|
|||||||
Name: sssd
|
Name: sssd
|
||||||
Version: 2.2.2
|
Version: 2.2.2
|
||||||
Release: 14
|
Release: 15
|
||||||
Summary: System Security Services Daemon
|
Summary: System Security Services Daemon
|
||||||
License: GPLv3+ and LGPLv3+
|
License: GPLv3+ and LGPLv3+
|
||||||
URL: https://pagure.io/SSSD/sssd/
|
URL: https://pagure.io/SSSD/sssd/
|
||||||
@ -15,6 +15,7 @@ Patch5:backport-CVE-2021-3621.patch
|
|||||||
Patch6: backport-dp-fix-potential-race-condition-in-provider-s-sbus-s.patch
|
Patch6: backport-dp-fix-potential-race-condition-in-provider-s-sbus-s.patch
|
||||||
Patch7: backport-be-remove-accidental-sleep.patch
|
Patch7: backport-be-remove-accidental-sleep.patch
|
||||||
Patch8: backport-sssctl-sssctl_domains.c-null-dereference-fixed.patch
|
Patch8: backport-sssctl-sssctl_domains.c-null-dereference-fixed.patch
|
||||||
|
Patch9: backport-MONITOR-fix-socket_activated-flag-initialization.patch
|
||||||
|
|
||||||
Requires: python3-sssd = %{version}-%{release}
|
Requires: python3-sssd = %{version}-%{release}
|
||||||
Requires: libldb
|
Requires: libldb
|
||||||
@ -588,6 +589,9 @@ fi
|
|||||||
%{_libdir}/%{name}/modules/libwbclient.so
|
%{_libdir}/%{name}/modules/libwbclient.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 6 2023 zhangruifang <zhangruifang@h-partners.com> - 2.2.2-15
|
||||||
|
- fix coredump in sssd.service
|
||||||
|
|
||||||
* Mon Dec 4 2023 zhangruifang <zhangruifang@h-partners.com> - 2.2.2-14
|
* Mon Dec 4 2023 zhangruifang <zhangruifang@h-partners.com> - 2.2.2-14
|
||||||
- sssctl/sssctl_domains.c: null dereference fixed
|
- sssctl/sssctl_domains.c: null dereference fixed
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user