!73 修复sssd常驻服务同时重启时,引发的coredump问题
From: @huangzq6 Reviewed-by: @HuaxinLuGitee Signed-off-by: @HuaxinLuGitee
This commit is contained in:
commit
3524105f9a
39
fix-coredump-during-ifp-reconnect.patch
Normal file
39
fix-coredump-during-ifp-reconnect.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 0a863c853bed35ac99aa905f4e6ded6c0ab1bd3c Mon Sep 17 00:00:00 2001
|
||||
From: huangzq6 <huangzhenqiang2@huawei.com>
|
||||
Date: Sat, 24 Dec 2022 16:28:57 +0800
|
||||
Subject: [PATCH] fix coredump during ifp reconnect
|
||||
|
||||
When the responder reconnects and gets old information in the service list (get_service_in_the_list),
|
||||
the corresponding socket_activated flag will be set to false (svc->socket_activated = false).
|
||||
The above behavior caused the main process to exit (monitor_quit),
|
||||
did not set the corresponding destructor to NULL (talloc_set_destructor(svc->conn, NULL)),
|
||||
and finally caused double-free during destructor, resulting in coredump.
|
||||
Therefore, it is necessary to set the corresponding socket_activated flag to true at the end of the responder service reconnection.
|
||||
|
||||
In fact, all services should have the above settings, but I have only reproduced the coredump scenario after ifp reconnection,
|
||||
and other responders have not been tested for reproduction.
|
||||
In order to keep the minimum modification, an if judgment is added here, and only the scene of ifp is processed.
|
||||
The complete solution to this problem requires further optimization of the socket_activated setting mechanism.
|
||||
|
||||
---
|
||||
src/monitor/monitor.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
|
||||
index 55cb083..af2b278 100644
|
||||
--- a/src/monitor/monitor.c
|
||||
+++ b/src/monitor/monitor.c
|
||||
@@ -337,6 +337,10 @@ monitor_sbus_RegisterService(TALLOC_CTX *mem_ctx,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ if (strcasecmp(name, "ifp") == 0) {
|
||||
+ svc->socket_activated = true;
|
||||
+ }
|
||||
+
|
||||
*_monitor_version = MONITOR_VERSION;
|
||||
|
||||
return EOK;
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: sssd
|
||||
Version: 2.6.1
|
||||
Release: 7
|
||||
Release: 8
|
||||
Summary: System Security Services Daemon
|
||||
License: GPLv3+ and LGPLv3+
|
||||
URL: https://pagure.io/SSSD/sssd/
|
||||
@ -12,6 +12,7 @@ Patch6002: SDAP-sdap_get_generic_send-fix-mem-leak.patch
|
||||
Patch6003: sssctl-free-one-malloc-allocated-variable.patch
|
||||
Patch6004: PAM-P11-fixed-minor-mem-leak.patch
|
||||
Patch6005: SSS_CLIENT-mem-cache-fixed-missing-error-code.patch
|
||||
Patch6006: fix-coredump-during-ifp-reconnect.patch
|
||||
|
||||
Requires: python3-sssd = %{version}-%{release}
|
||||
Requires: libldb
|
||||
@ -519,6 +520,9 @@ fi
|
||||
%systemd_postun_with_restart sssd.service
|
||||
|
||||
%changelog
|
||||
* Sat Dec 24 2022 huangzq6 <huangzhenqiang2@huawei.com> -2.6.1-8
|
||||
- fix coredump during ifp reconnect
|
||||
|
||||
* Wed Dec 21 2022 zhouchenchen<zhouchenchen@huawei.com> - 2.6.1-7
|
||||
- backport some patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user