[PATCH] get rid of irritating error message in domain join

Michael Adam obnox at samba.org
Thu Jun 16 09:33:28 UTC 2016


When joining a non-AD domain, we currently get the irritating
error/warning message that no realm has been specified.
THis patch gets rid of this msg for non-ad domains.

Michael

-------------- next part --------------
From 9d5d0a8b2f33cdb2ade44e3f5f08ae870e5dbb5a Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 16 Jun 2016 00:15:00 +0200
Subject: [PATCH] libnet: only create local private krb5.conf if joining an AD
 domain

This prevents irritating warning messages.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source3/libnet/libnet_join.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 77a57da..48268af 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -2514,9 +2514,11 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx,
 
 #ifdef HAVE_ADS
 
-	create_local_private_krb5_conf_for_domain(
-		r->out.dns_domain_name, r->out.netbios_domain_name,
-		sitename, smbXcli_conn_remote_sockaddr(cli->conn));
+	if (r->out.domain_is_ad) {
+		create_local_private_krb5_conf_for_domain(
+			r->out.dns_domain_name, r->out.netbios_domain_name,
+			sitename, smbXcli_conn_remote_sockaddr(cli->conn));
+	}
 
 	if (r->out.domain_is_ad &&
 	    !(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_UNSECURE)) {
-- 
2.5.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160616/e8f1fe08/signature.sig>


More information about the samba-technical mailing list