From: Stefan Metzmacher Date: Tue, 23 Jan 2018 22:19:32 +0000 (+0100) Subject: winbindd: add_trusted_domain_from_auth() should not use dns_name = "" X-Git-Tag: tevent-0.9.36~158 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ee2551409e0bd0cd5bf130cc1e3736e58b8c14d;p=thirdparty%2Fsamba.git 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 --- 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,