Blame SOURCES/0004-Do-not-depend-on-default_realm-in-krb5.conf.patch

f441eb
From 8f726817b9ff643a382fa12ea9ff489cd5ab9068 Mon Sep 17 00:00:00 2001
f441eb
From: Sumit Bose <sbose@redhat.com>
f441eb
Date: Mon, 13 Aug 2018 18:24:58 +0200
f441eb
Subject: [PATCH 4/4] Do not depend on default_realm in krb5.conf
f441eb
f441eb
---
f441eb
 library/adenroll.c | 4 +++-
f441eb
 1 file changed, 3 insertions(+), 1 deletion(-)
f441eb
f441eb
diff --git a/library/adenroll.c b/library/adenroll.c
f441eb
index bb50365..02bd9e3 100644
f441eb
--- a/library/adenroll.c
f441eb
+++ b/library/adenroll.c
f441eb
@@ -1661,7 +1661,9 @@ remove_principal_from_keytab (adcli_enroll *enroll,
f441eb
 	krb5_principal principal;
f441eb
 	match_principal_kvno closure;
f441eb
 
f441eb
-	code = krb5_parse_name (k5, principal_name, &principal);
f441eb
+	code = _adcli_krb5_build_principal (k5, principal_name,
f441eb
+	                                    adcli_conn_get_domain_realm (enroll->conn),
f441eb
+	                                    &principal);
f441eb
 	if (code != 0) {
f441eb
 		_adcli_err ("Couldn't parse principal: %s: %s",
f441eb
 		            principal_name, krb5_get_error_message (k5, code));
f441eb
-- 
f441eb
2.17.1
f441eb