!88 update to 2.9.1
From: @zhengxiaoxiaoGitee Reviewed-by: @huangzq6, @HuaxinLuGitee Signed-off-by: @huangzq6, @HuaxinLuGitee
This commit is contained in:
commit
ae6b1489c6
BIN
.sssd.spec.swp
Normal file
BIN
.sssd.spec.swp
Normal file
Binary file not shown.
@ -1,39 +0,0 @@
|
||||
diff -Naur sssd-2.8.2/src/sss_client/common.c sssd-2.8.2-b/src/sss_client/common.c
|
||||
--- sssd-2.8.2/src/sss_client/common.c 2023-03-28 11:25:28.000000000 +0800
|
||||
+++ sssd-2.8.2-b/src/sss_client/common.c 2023-03-28 11:26:09.000000000 +0800
|
||||
@@ -663,22 +663,27 @@
|
||||
const char *socket_name,
|
||||
int timeout)
|
||||
{
|
||||
- static pid_t mypid;
|
||||
- struct stat mysb;
|
||||
+ static pid_t mypid_s;
|
||||
+ static ino_t myself_ino;
|
||||
+ struct stat mypid_sb, myself_sb;
|
||||
+ pid_t mypid_d;
|
||||
int mysd;
|
||||
int ret;
|
||||
|
||||
- if (getpid() != mypid) {
|
||||
- ret = fstat(sss_cli_sd, &mysb);
|
||||
+ ret = lstat("/proc/self/", &myself_sb);
|
||||
+ mypid_d = getpid();
|
||||
+ if (mypid_d != mypid_s || (ret == 0 && myself_sb.st_ino != myself_ino)) {
|
||||
+ ret = fstat(sss_cli_sd, &mypid_sb);
|
||||
if (ret == 0) {
|
||||
- if (S_ISSOCK(mysb.st_mode) &&
|
||||
- mysb.st_dev == sss_cli_sb.st_dev &&
|
||||
- mysb.st_ino == sss_cli_sb.st_ino) {
|
||||
+ if (S_ISSOCK(mypid_sb.st_mode) &&
|
||||
+ mypid_sb.st_dev == sss_cli_sb.st_dev &&
|
||||
+ mypid_sb.st_ino == sss_cli_sb.st_ino) {
|
||||
sss_cli_close_socket();
|
||||
}
|
||||
}
|
||||
sss_cli_sd = -1;
|
||||
- mypid = getpid();
|
||||
+ mypid_s = mypid_d;
|
||||
+ myself_ino = myself_sb.st_ino;
|
||||
}
|
||||
|
||||
/* check if the socket has been closed on the other side */
|
||||
@ -1,47 +0,0 @@
|
||||
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
|
||||
|
||||
Binary file not shown.
19
sssd.spec
19
sssd.spec
@ -1,14 +1,11 @@
|
||||
Name: sssd
|
||||
Version: 2.8.2
|
||||
Release: 5
|
||||
Version: 2.9.1
|
||||
Release: 1
|
||||
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
|
||||
Patch6001: Fix-pid-wrapping-in-sss_cli_check_socket.patch
|
||||
|
||||
Requires: python3-sssd = %{version}-%{release}
|
||||
Requires: libldb
|
||||
Requires: cyrus-sasl-gssapi%{?_isa}
|
||||
@ -226,7 +223,6 @@ chrpath -d $RPM_BUILD_ROOT%{_libexecdir}/sssd/sssd_pac
|
||||
chrpath -d $RPM_BUILD_ROOT%{_libdir}/%{name}/libsss_krb5.so
|
||||
|
||||
chrpath -d $RPM_BUILD_ROOT%{ldb_modulesdir}/memberof.so
|
||||
chrpath -d $RPM_BUILD_ROOT%{_libdir}/%{name}/libsss_files.so
|
||||
chrpath -d $RPM_BUILD_ROOT%{_libdir}/%{name}/libsss_simple.so
|
||||
chrpath -d $RPM_BUILD_ROOT%{_libdir}/%{name}/libsss_child.so
|
||||
chrpath -d $RPM_BUILD_ROOT%{_libdir}/%{name}/libsss_semanage.so
|
||||
@ -315,7 +311,6 @@ done
|
||||
%{_libexecdir}/sssd/sssd_check_socket_activated_responders
|
||||
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/libsss_files.so
|
||||
%{_libdir}/%{name}/libsss_simple.so
|
||||
|
||||
%{_libdir}/%{name}/libsss_child.so
|
||||
@ -420,7 +415,7 @@ done
|
||||
|
||||
%{_libexecdir}/sssd/sssd_ifp
|
||||
%{_unitdir}/sssd-ifp.service
|
||||
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.sssd.infopipe.conf
|
||||
%{_datadir}/dbus-1/system.d/org.freedesktop.sssd.infopipe.conf
|
||||
%{_datadir}/dbus-1/system-services/org.freedesktop.sssd.infopipe.service
|
||||
|
||||
%{_libdir}/libsss_sudo.so*
|
||||
@ -430,7 +425,6 @@ done
|
||||
%{_libdir}/libipa_hbac.so.*
|
||||
%{_libdir}/%{name}/modules/libsss_autofs.so
|
||||
%{_libdir}/libsss_nss_idmap.so.*
|
||||
%{_libdir}/libsss_simpleifp.so.*
|
||||
%{_libdir}/libsss_certmap.so.*
|
||||
%{_libdir}/libnfsidmap/sss.so
|
||||
%dir %{_libdir}/samba/idmap
|
||||
@ -455,10 +449,6 @@ done
|
||||
%{_includedir}/sss_nss_idmap.h
|
||||
%{_libdir}/libsss_nss_idmap.so
|
||||
%{_libdir}/pkgconfig/sss_nss_idmap.pc
|
||||
%{_includedir}/sss_sifp.h
|
||||
%{_includedir}/sss_sifp_dbus.h
|
||||
%{_libdir}/libsss_simpleifp.so
|
||||
%{_libdir}/pkgconfig/sss_simpleifp.pc
|
||||
%{_includedir}/sss_certmap.h
|
||||
%{_libdir}/libsss_certmap.so
|
||||
%{_libdir}/pkgconfig/sss_certmap.pc
|
||||
@ -535,6 +525,9 @@ fi
|
||||
%systemd_postun_with_restart sssd.service
|
||||
|
||||
%changelog
|
||||
* Wed Jul 19 2023 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 2.9.1-1
|
||||
- update to 2.9.1
|
||||
|
||||
* Tue Mar 28 2023 jiangjixiang <jiangjixiang@kylinos.cn> - 2.8.2-5
|
||||
- fix pid wrapping in sss_cli_check_socket
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user