Blame SOURCES/samba-by-default.patch

3a7434
From 36e35c860cebc5e3f3d2199742c7f46d5ef7b778 Mon Sep 17 00:00:00 2001
3a7434
From: Stef Walter <stefw@redhat.com>
3a7434
Date: Fri, 16 Oct 2015 11:41:14 +0200
3a7434
Subject: [PATCH] Revert "service: Prefer adcli over samba for most credential
3a7434
 types"
3a7434
3a7434
This reverts commit 70878dec6e23226ab25f731654ab53cc0e7b11c3.
3a7434
---
3a7434
 service/realm-sssd-ad.c | 19 ++++++++++++++++---
3a7434
 1 file changed, 16 insertions(+), 3 deletions(-)
3a7434
3a7434
diff --git a/service/realm-sssd-ad.c b/service/realm-sssd-ad.c
3a7434
index c7ffe8a..39fcf81 100644
3a7434
--- a/service/realm-sssd-ad.c
3a7434
+++ b/service/realm-sssd-ad.c
3a7434
@@ -343,13 +343,26 @@ parse_join_options (JoinClosure *join,
3a7434
 		}
3a7434
 
3a7434
 	/*
3a7434
-	 * For other valid types of credentials we prefer adcli.
3a7434
+	 * If we are enrolling with a ccache, then prefer to use adcli over samba.
3a7434
+	 * There have been some strange corner case problems when using samba with
3a7434
+	 * a ccache.
3a7434
 	 */
3a7434
-	} else if (cred->type == REALM_CREDENTIAL_CCACHE ||
3a7434
-	           (cred->type == REALM_CREDENTIAL_PASSWORD && cred->owner == REALM_CREDENTIAL_OWNER_ADMIN)) {
3a7434
+	} else if (cred->type == REALM_CREDENTIAL_CCACHE) {
3a7434
 		if (!software)
3a7434
 			software = REALM_DBUS_IDENTIFIER_ADCLI;
3a7434
 
3a7434
+	/*
3a7434
+	 * For other supported enrolling credentials, we support either adcli or
3a7434
+	 * samba. But since adcli is pretty immature at this point, we use samba
3a7434
+	 * by default. Samba falls over with hostnames that are not perfectly
3a7434
+	 * specified, so use adcli there.
3a7434
+	 */
3a7434
+	} else if (cred->type == REALM_CREDENTIAL_PASSWORD && cred->owner == REALM_CREDENTIAL_OWNER_ADMIN) {
3a7434
+		if (!software && join->disco->explicit_server)
3a7434
+			software = REALM_DBUS_IDENTIFIER_ADCLI;
3a7434
+		else if (!software)
3a7434
+			software = REALM_DBUS_IDENTIFIER_SAMBA;
3a7434
+
3a7434
 	/* It would be odd to get here */
3a7434
 	} else {
3a7434
 		g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
3a7434
-- 
3a7434
2.5.0
3a7434