The Samba-Bugzilla – Attachment 5301 Details for
Bug 7116
pdb_ldap performance fixes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Additional Patch for v3-5
tmp.diff (text/plain), 1.76 KB, created by
Stefan Metzmacher
on 2010-02-09 09:26:05 UTC
(
hide
)
Description:
Additional Patch for v3-5
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2010-02-09 09:26:05 UTC
Size:
1.76 KB
patch
obsolete
>From 74b9122a38c6d7210783a77fd59ec598a469e438 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 9 Feb 2010 12:57:01 +0100 >Subject: [PATCH] s3:passdb: only use gid_to_sid() result if the result is a group of our local sam > >Otherwise retry with pdb_gid_to_sid(). > >metze >(cherry picked from commit 4dc2be2264926fe415e4e40e212f94793c9831d1) >--- > source3/passdb/pdb_get_set.c | 20 ++++++++++++++++---- > 1 files changed, 16 insertions(+), 4 deletions(-) > >diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c >index 5c1139b..6126517 100644 >--- a/source3/passdb/pdb_get_set.c >+++ b/source3/passdb/pdb_get_set.c >@@ -184,6 +184,7 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass) > { > DOM_SID *gsid; > struct passwd *pwd; >+ bool need_lookup_sid = false; > > /* Return the cached group SID if we have that */ > if ( sampass->group_sid ) { >@@ -214,10 +215,6 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass) > > gid_to_sid(gsid, pwd->pw_gid); > if (!is_null_sid(gsid)) { >- enum lsa_SidType type = SID_NAME_UNKNOWN; >- TALLOC_CTX *mem_ctx; >- bool lookup_ret; >- const DOM_SID *usid = pdb_get_user_sid(sampass); > DOM_SID dgsid; > uint32_t rid; > >@@ -233,8 +230,23 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass) > case DOMAIN_RID_USERS: > sampass->group_sid = gsid; > return sampass->group_sid; >+ default: >+ need_lookup_sid = true; >+ break; >+ } >+ } else { >+ ZERO_STRUCTP(gsid); >+ if (pdb_gid_to_sid(pwd->pw_gid, gsid)) { >+ need_lookup_sid = true; > } > } >+ } >+ >+ if (need_lookup_sid) { >+ enum lsa_SidType type = SID_NAME_UNKNOWN; >+ TALLOC_CTX *mem_ctx; >+ bool lookup_ret; >+ const DOM_SID *usid = pdb_get_user_sid(sampass); > > mem_ctx = talloc_init("pdb_get_group_sid"); > if (!mem_ctx) { >-- >1.6.3.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
Flags:
gd
:
review+
Actions:
View
Attachments on
bug 7116
:
5296
| 5301 |
5318
|
5319