From 2ee2551409e0bd0cd5bf130cc1e3736e58b8c14d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 23 Jan 2018 23:19:32 +0100 Subject: [PATCH] winbindd: add_trusted_domain_from_auth() should not use dns_name = "" Check whether the DNS domain name in the info6 struct is actually more then just an empty string. If it is we want to call add_trusted_domain() with NULL as DNS domain name argument. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13257 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/winbindd/winbindd_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 5f4f905db4c..6292cce9d51 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -336,7 +336,9 @@ bool add_trusted_domain_from_auth(uint16_t validation_level, } if (validation_level == 6) { - dns_domainname = &info6->dns_domainname[0]; + if (!strequal(info6->dns_domainname, "")) { + dns_domainname = info6->dns_domainname; + } } status = add_trusted_domain(info3->logon_dom, -- 2.47.3