From ae6a8da5bf3cee10ef0e874c1a11861b1bf62d0b Mon Sep 17 00:00:00 2001 From: Isaac Boukris Date: Thu, 22 Feb 2018 11:54:08 +0200 Subject: [PATCH 1/2] wbclient: fix wbcLookupName with UPN According to MS doc, LsaLookupNames supports UPNs, so we shouldn't break the username incorrectly into user and domain. Signed-off-by: Isaac Boukris --- source3/winbindd/winbindd_lookupname.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source3/winbindd/winbindd_lookupname.c b/source3/winbindd/winbindd_lookupname.c index 1be29fd85c8..f8b93ec379c 100644 --- a/source3/winbindd/winbindd_lookupname.c +++ b/source3/winbindd/winbindd_lookupname.c @@ -55,11 +55,6 @@ struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx, *p = 0; domname = request->data.name.name; name = p+1; - } else if ((p = strchr(request->data.name.name, '@')) != NULL) { - /* upn */ - domname = p + 1; - *p = 0; - name = request->data.name.name; } else { domname = request->data.name.dom_name; name = request->data.name.name; From 76dacbe2a883f11364358f49644112c1cf015668 Mon Sep 17 00:00:00 2001 From: Isaac Boukris Date: Thu, 22 Feb 2018 23:39:26 +0000 Subject: [PATCH 2/2] assume our domain on dc too? Signed-off-by: Isaac Boukris --- source3/winbindd/winbindd_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 6292cce9d51..e842bf7b477 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -1506,7 +1506,7 @@ struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name) domain = find_domain_from_name_noinit(domain_name); if (domain == NULL) { - return NULL; + return find_our_domain(); } if (domain->secure_channel_type != SEC_CHAN_NULL) {