The Samba-Bugzilla – Attachment 14133 Details for
Bug 13369
Looking up the user using the UPN results in user name with the REALM instead of the DOMAIN
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.7
v4-7-test.patch (text/plain), 3.33 KB, created by
Andreas Schneider
on 2018-04-13 13:09:12 UTC
(
hide
)
Description:
patch for 4.7
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2018-04-13 13:09:12 UTC
Size:
3.33 KB
patch
obsolete
>From 74456f9bf190dfb9104fda88c4d38750a015572d Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Sun, 6 Aug 2017 18:11:02 +0200 >Subject: [PATCH 1/2] winbindd: Factor out winbindd_domain_init_backend from > get_cache() > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> >--- > source3/winbindd/winbindd_cache.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > >diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c >index 98c69f8b231..8492f907553 100644 >--- a/source3/winbindd/winbindd_cache.c >+++ b/source3/winbindd/winbindd_cache.c >@@ -119,12 +119,11 @@ static char *wcache_path(void) > return state_path("winbindd_cache.tdb"); > } > >-/* get the winbind_cache structure */ >-static struct winbind_cache *get_cache(struct winbindd_domain *domain) >+static void winbindd_domain_init_backend(struct winbindd_domain *domain) > { >- struct winbind_cache *ret = wcache; >- >- /* We have to know what type of domain we are dealing with first. */ >+ if (domain->backend != NULL) { >+ return; >+ } > > if (domain->internal) { > domain->backend = &builtin_passdb_methods; >@@ -189,6 +188,14 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain) > DBG_INFO("Setting MS-RPC methods for domain %s\n", domain->name); > domain->backend = &reconnect_methods; > } >+} >+ >+/* get the winbind_cache structure */ >+static struct winbind_cache *get_cache(struct winbindd_domain *domain) >+{ >+ struct winbind_cache *ret = wcache; >+ >+ winbindd_domain_init_backend(domain); > > if (ret != NULL) { > return ret; >-- >2.16.3 > > >From e678a5ddab420792e12bc76808d2072a13dd3659 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Fri, 13 Apr 2018 14:15:23 +0200 >Subject: [PATCH 2/2] winbind: Lookup the domain name if we got a REALM > >https://bugzilla.samba.org/show_bug.cgi?id=13369 > >Signed-off-by: Andreas Schneider <asn@samba.org> >--- > source3/winbindd/winbindd_cache.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c >index 8492f907553..c2be28ebcdb 100644 >--- a/source3/winbindd/winbindd_cache.c >+++ b/source3/winbindd/winbindd_cache.c >@@ -1823,6 +1823,7 @@ NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain, > { > NTSTATUS status; > bool old_status; >+ bool lookup_domain = false; > > old_status = domain->online; > >@@ -1847,6 +1848,7 @@ NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain, > DEBUG(10,("name_to_sid: [Cached] - doing backend query for name for domain %s\n", > domain->name )); > >+ winbindd_domain_init_backend(domain); > status = domain->backend->name_to_sid(domain, mem_ctx, domain_name, > name, flags, sid, type); > >@@ -1863,6 +1865,26 @@ NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain, > return cache_status; > } > } >+ >+ if (domain_name == NULL || domain_name[0] == '\0') { >+ lookup_domain = true; >+ } else { >+ /* If domain_name is a REALM */ >+ const char *p = strchr(domain_name, '.'); >+ if (p != NULL) { >+ lookup_domain = true; >+ } >+ } >+ >+ if (lookup_domain) { >+ struct winbindd_domain *mydomain = >+ find_domain_from_sid_noinit(sid); >+ >+ if (mydomain != NULL) { >+ domain_name = mydomain->name; >+ } >+ } >+ > /* and save it */ > refresh_sequence_number(domain); > >-- >2.16.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13369
:
14106
|
14133
|
14199
|
14200