The Samba-Bugzilla – Attachment 8747 Details for
Bug 9766
winbind resolving group names if lookup without a domain name has been cached.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v3-6-test patch
0002-BUG-9766-Cache-name_to_sid-sid_to_name-correctly.patch (text/plain), 2.15 KB, created by
Andreas Schneider
on 2013-04-10 07:57:13 UTC
(
hide
)
Description:
v3-6-test patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2013-04-10 07:57:13 UTC
Size:
2.15 KB
patch
obsolete
>From ccee42a8566b58b79247c84eeef7b7ed29989088 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Thu, 4 Apr 2013 12:18:25 +0200 >Subject: [PATCH 2/2] BUG 9766: Cache name_to_sid/sid_to_name correctly. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >If there is no domain_name specified we still need to set to for >caching else we will not find the entry later if we lookup the entry >with the domain_name. > >Reviewed-by: Guenther Deschner <gd@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >Signed-off-by: Andreas Schneider <asn@samba.org> > >Autobuild-User(master): Günther Deschner <gd@samba.org> >Autobuild-Date(master): Tue Apr 9 16:32:44 CEST 2013 on sn-devel-104 >--- > source3/winbindd/winbindd_cache.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > >diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c >index 81b9b17..033ea77 100644 >--- a/source3/winbindd/winbindd_cache.c >+++ b/source3/winbindd/winbindd_cache.c >@@ -945,6 +945,15 @@ static void wcache_save_name_to_sid(struct winbindd_domain *domain, > centry = centry_start(domain, status); > if (!centry) > return; >+ >+ if (domain_name[0] == '\0') { >+ struct winbindd_domain *mydomain = >+ find_domain_from_sid_noinit(sid); >+ if (mydomain != NULL) { >+ domain_name = mydomain->name; >+ } >+ } >+ > centry_put_uint32(centry, type); > centry_put_sid(centry, sid); > fstrcpy(uname, name); >@@ -965,6 +974,14 @@ static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS sta > if (!centry) > return; > >+ if (domain_name[0] == '\0') { >+ struct winbindd_domain *mydomain = >+ find_domain_from_sid_noinit(sid); >+ if (mydomain != NULL) { >+ domain_name = mydomain->name; >+ } >+ } >+ > if (NT_STATUS_IS_OK(status)) { > centry_put_uint32(centry, type); > centry_put_string(centry, domain_name); >@@ -1781,6 +1798,10 @@ NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain, > return NT_STATUS_NO_MEMORY; > } > >+ if (domain_name[0] == '\0') { >+ domain_name = domain->name; >+ } >+ > centry = wcache_fetch(cache, domain, "NS/%s/%s", domain_name, uname); > TALLOC_FREE(uname); > if (centry == NULL) { >-- >1.8.2 >
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
Flags:
gd
:
review+
vl
:
review+
Actions:
View
Attachments on
bug 9766
:
8744
| 8747