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

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