The Samba-Bugzilla – Attachment 3370 Details for
Bug 5551
winbind on PDC fails, even with patch for bug 5489
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Final ? patch
look (text/plain), 2.84 KB, created by
Jeremy Allison
on 2008-06-25 14:42:41 UTC
(
hide
)
Description:
Final ? patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2008-06-25 14:42:41 UTC
Size:
2.84 KB
patch
obsolete
>diff --git a/source/nsswitch/winbindd_passdb.c b/source/nsswitch/winbindd_passdb.c >index 08c78a1..8d3ff07 100644 >--- a/source/nsswitch/winbindd_passdb.c >+++ b/source/nsswitch/winbindd_passdb.c >@@ -29,35 +29,31 @@ > #undef DBGC_CLASS > #define DBGC_CLASS DBGC_WINBIND > >-/* list all domain groups */ >-static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, >+static NTSTATUS enum_groups_internal(struct winbindd_domain *domain, > TALLOC_CTX *mem_ctx, > uint32 *num_entries, >- struct acct_info **info) >-{ >- /* We don't have domain groups */ >- *num_entries = 0; >- *info = NULL; >- return NT_STATUS_OK; >-} >- >-/* List all domain groups */ >- >-static NTSTATUS enum_local_groups(struct winbindd_domain *domain, >- TALLOC_CTX *mem_ctx, >- uint32 *num_entries, >- struct acct_info **info) >+ struct acct_info **info, >+ enum lsa_SidType sidtype) > { > struct pdb_search *search; >- struct samr_displayentry *aliases; >+ struct samr_displayentry *entries; > int i; > NTSTATUS result = NT_STATUS_UNSUCCESSFUL; > >- search = pdb_search_aliases(&domain->sid); >+ if (sidtype == SID_NAME_ALIAS) { >+ search = pdb_search_aliases(&domain->sid); >+ } else { >+ search = pdb_search_groups(); >+ } >+ > if (search == NULL) goto done; > >- *num_entries = pdb_search_entries(search, 0, 0xffffffff, &aliases); >- if (*num_entries == 0) goto done; >+ *num_entries = pdb_search_entries(search, 0, 0xffffffff, &entries); >+ if (*num_entries == 0) { >+ /* Zero entries isn't an error */ >+ result = NT_STATUS_OK; >+ goto done; >+ } > > *info = TALLOC_ARRAY(mem_ctx, struct acct_info, *num_entries); > if (*info == NULL) { >@@ -66,9 +62,9 @@ static NTSTATUS enum_local_groups(struct winbindd_domain *domain, > } > > for (i=0; i<*num_entries; i++) { >- fstrcpy((*info)[i].acct_name, aliases[i].account_name); >- fstrcpy((*info)[i].acct_desc, aliases[i].description); >- (*info)[i].rid = aliases[i].rid; >+ fstrcpy((*info)[i].acct_name, entries[i].account_name); >+ fstrcpy((*info)[i].acct_desc, entries[i].description); >+ (*info)[i].rid = entries[i].rid; > } > > result = NT_STATUS_OK; >@@ -77,6 +73,32 @@ static NTSTATUS enum_local_groups(struct winbindd_domain *domain, > return result; > } > >+/* list all domain groups */ >+static NTSTATUS enum_dom_groups(struct winbindd_domain *domain, >+ TALLOC_CTX *mem_ctx, >+ uint32 *num_entries, >+ struct acct_info **info) >+{ >+ return enum_groups_internal(domain, >+ mem_ctx, >+ num_entries, >+ info, >+ SID_NAME_DOM_GRP); >+} >+ >+/* List all local groups (aliases) */ >+static NTSTATUS enum_local_groups(struct winbindd_domain *domain, >+ TALLOC_CTX *mem_ctx, >+ uint32 *num_entries, >+ struct acct_info **info) >+{ >+ return enum_groups_internal(domain, >+ mem_ctx, >+ num_entries, >+ info, >+ SID_NAME_ALIAS); >+} >+ > /* convert a single name to a sid in a domain */ > static NTSTATUS name_to_sid(struct winbindd_domain *domain, > TALLOC_CTX *mem_ctx,
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 5551
:
3355
|
3363
|
3367
|
3369
| 3370 |
3371