sssctl/sssctl_domains.c: null dereference fixed
This commit is contained in:
parent
d5b5ce4274
commit
5a57008bcd
@ -0,0 +1,56 @@
|
|||||||
|
From 75b1fe68433a5b6276fe5da38e004b863710f335 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Tikhonov <atikhono@redhat.com>
|
||||||
|
Date: Fri, 18 Oct 2019 19:55:27 +0200
|
||||||
|
Subject: [PATCH] sssctl/sssctl_domains.c: null dereference fixed
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Resolves: https://pagure.io/SSSD/sssd/issue/4102
|
||||||
|
|
||||||
|
Reviewed-by: Michal Židek <mzidek@redhat.com>
|
||||||
|
---
|
||||||
|
src/tools/sssctl/sssctl_domains.c | 13 +++++++++++++
|
||||||
|
1 file changed, 13 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/tools/sssctl/sssctl_domains.c b/src/tools/sssctl/sssctl_domains.c
|
||||||
|
index 8b8df565b..026ac0710 100644
|
||||||
|
--- a/src/tools/sssctl/sssctl_domains.c
|
||||||
|
+++ b/src/tools/sssctl/sssctl_domains.c
|
||||||
|
@@ -209,6 +209,12 @@ sssctl_domain_status_active_server(struct sbus_sync_connection *conn,
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (services == NULL) {
|
||||||
|
+ PRINT("This domain has no active servers.\n");
|
||||||
|
+ ret = EOK;
|
||||||
|
+ goto done;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
PRINT("Active servers:\n");
|
||||||
|
for (i = 0; services[i] != NULL; i++) {
|
||||||
|
ret = sbus_call_ifp_domain_ActiveServer(tmp_ctx, conn, IFP_BUS,
|
||||||
|
@@ -220,6 +226,7 @@ sssctl_domain_status_active_server(struct sbus_sync_connection *conn,
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* SBUS_REQ_STRING_DEFAULT handles (server == NULL) case gracefully */
|
||||||
|
server = SBUS_REQ_STRING_DEFAULT(server, _("not connected"));
|
||||||
|
printf("%s: %s\n", proper_service_name(services[i]), server);
|
||||||
|
}
|
||||||
|
@@ -256,6 +263,12 @@ sssctl_domain_status_server_list(struct sbus_sync_connection *conn,
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (services == NULL) {
|
||||||
|
+ PRINT("No servers discovered.\n");
|
||||||
|
+ ret = EOK;
|
||||||
|
+ goto done;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
for (i = 0; services[i] != NULL; i++) {
|
||||||
|
PRINT("Discovered %s servers:\n", proper_service_name(services[i]));
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: sssd
|
Name: sssd
|
||||||
Version: 2.2.2
|
Version: 2.2.2
|
||||||
Release: 13
|
Release: 14
|
||||||
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/
|
||||||
@ -14,6 +14,7 @@ Patch4:backport-SSSCTL-fix-logs-remove-when-log-directory-is-emtry.patch
|
|||||||
Patch5:backport-CVE-2021-3621.patch
|
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
|
||||||
|
|
||||||
Requires: python3-sssd = %{version}-%{release}
|
Requires: python3-sssd = %{version}-%{release}
|
||||||
Requires: libldb
|
Requires: libldb
|
||||||
@ -587,6 +588,9 @@ fi
|
|||||||
%{_libdir}/%{name}/modules/libwbclient.so
|
%{_libdir}/%{name}/modules/libwbclient.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 4 2023 zhangruifang <zhangruifang@h-partners.com> - 2.2.2-14
|
||||||
|
- sssctl/sssctl_domains.c: null dereference fixed
|
||||||
|
|
||||||
* Tue Dec 20 2022 zhouchenchen <zhouchenchen@huawei.com> - 2.2.2-13
|
* Tue Dec 20 2022 zhouchenchen <zhouchenchen@huawei.com> - 2.2.2-13
|
||||||
- fix the sssd_be process coredump
|
- fix the sssd_be process coredump
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user