Blame SOURCES/0001-service-make-sure-use_ldaps-is-not-only-set-for-auto.patch

3eb28c
From ccf48aa7761065283483d667f3efaf33b5b2a728 Mon Sep 17 00:00:00 2001
3eb28c
From: Sumit Bose <sbose@redhat.com>
3eb28c
Date: Tue, 1 Dec 2020 14:12:33 +0100
3eb28c
Subject: [PATCH 1/3] service: make sure use_ldaps is not only set for
3eb28c
 automatic join
3eb28c
3eb28c
The check if ldaps is requested or not was only called if an automatic
3eb28c
join was enabled. With this patch it is checked in all cases.
3eb28c
3eb28c
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1826964
3eb28c
---
3eb28c
 service/realm-sssd-ad.c | 26 +++++++++++++-------------
3eb28c
 1 file changed, 13 insertions(+), 13 deletions(-)
3eb28c
3eb28c
diff --git a/service/realm-sssd-ad.c b/service/realm-sssd-ad.c
3eb28c
index 00a9093..ea5f28c 100644
3eb28c
--- a/service/realm-sssd-ad.c
3eb28c
+++ b/service/realm-sssd-ad.c
3eb28c
@@ -349,19 +349,6 @@ parse_join_options (JoinClosure *join,
3eb28c
 			return FALSE;
3eb28c
 		}
3eb28c
 
3eb28c
-	/*
3eb28c
-	 * Check if ldaps should be used and if membership software supports
3eb28c
-	 * it.
3eb28c
-	 */
3eb28c
-	join->use_ldaps = realm_option_use_ldaps (options);
3eb28c
-	if (join->use_ldaps &&
3eb28c
-	           g_str_equal (software, REALM_DBUS_IDENTIFIER_SAMBA)) {
3eb28c
-		realm_diagnostics_info (join->invocation,
3eb28c
-		                        "Membership software %s does "
3eb28c
-		                        "not support ldaps, trying "
3eb28c
-		                        "without.", software);
3eb28c
-	}
3eb28c
-
3eb28c
 	/*
3eb28c
 	 * If we are enrolling with a user password, then we have to use samba,
3eb28c
 	 * adcli only supports admin passwords.
3eb28c
@@ -393,6 +380,19 @@ parse_join_options (JoinClosure *join,
3eb28c
 
3eb28c
 	g_assert (software != NULL);
3eb28c
 
3eb28c
+	/*
3eb28c
+	 * Check if ldaps should be used and if membership software supports
3eb28c
+	 * it.
3eb28c
+	 */
3eb28c
+	join->use_ldaps = realm_option_use_ldaps (options);
3eb28c
+	if (join->use_ldaps &&
3eb28c
+	           g_str_equal (software, REALM_DBUS_IDENTIFIER_SAMBA)) {
3eb28c
+		realm_diagnostics_info (join->invocation,
3eb28c
+		                        "Membership software %s does "
3eb28c
+		                        "not support ldaps, trying "
3eb28c
+		                        "without.", software);
3eb28c
+	}
3eb28c
+
3eb28c
 	if (g_str_equal (software, REALM_DBUS_IDENTIFIER_ADCLI)) {
3eb28c
 		join->use_adcli = TRUE;
3eb28c
 		join->packages = ADCLI_PACKAGES;
3eb28c
-- 
3eb28c
2.28.0
3eb28c