The Samba-Bugzilla – Attachment 7378 Details for
Bug 8807
dcerpc_lsa_lookup_sids_noalloc() crashes when groups has more than 1000 groups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch to fix the crash seen dcerpc_lookup_sids_noalloc() when there are more than 1000 sid entries
samba_patch_lsa_lookupsids (text/plain), 2.40 KB, created by
hargagan
on 2012-03-12 12:11:24 UTC
(
hide
)
Description:
Proposed patch to fix the crash seen dcerpc_lookup_sids_noalloc() when there are more than 1000 sid entries
Filename:
MIME Type:
Creator:
hargagan
Created:
2012-03-12 12:11:24 UTC
Size:
2.40 KB
patch
obsolete
>Index: source3/rpc_client/cli_lsarpc.c >=================================================================== >--- source3/rpc_client/cli_lsarpc.c.orig >+++ source3/rpc_client/cli_lsarpc.c >@@ -173,6 +173,7 @@ static NTSTATUS dcerpc_lsa_lookup_sids_n > char **names, > enum lsa_SidType *types, > bool use_lookupsids3, >+ int sids_processed, > NTSTATUS *presult) > { > NTSTATUS status = NT_STATUS_OK; >@@ -183,6 +184,8 @@ static NTSTATUS dcerpc_lsa_lookup_sids_n > enum lsa_LookupNamesLevel level = LSA_LOOKUP_NAMES_ALL; > uint32_t count = 0; > int i; >+ char **pnames = names - sids_processed; >+ char **pdomains = domains - sids_processed; > > ZERO_STRUCT(lsa_names); > >@@ -287,7 +290,7 @@ static NTSTATUS dcerpc_lsa_lookup_sids_n > name = lsa_names.names[i].name.string; > > if (name) { >- (names)[i] = talloc_strdup(names, name); >+ (names)[i] = talloc_strdup(pnames, name); > if ((names)[i] == NULL) { > DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n")); > *presult = NT_STATUS_UNSUCCESSFUL; >@@ -296,7 +299,7 @@ static NTSTATUS dcerpc_lsa_lookup_sids_n > } else { > (names)[i] = NULL; > } >- domains[i] = talloc_strdup(domains, >+ domains[i] = talloc_strdup(pdomains, > dom_name ? dom_name : ""); > (types)[i] = lsa_names.names[i].sid_type; > if (((domains)[i] == NULL)) { >@@ -401,6 +404,7 @@ static NTSTATUS dcerpc_lsa_lookup_sids_g > hunk_names, > hunk_types, > use_lookupsids3, >+ sids_processed, > &hunk_result); > if (!NT_STATUS_IS_OK(status)) { > goto fail; >
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 8807
:
7378
|
7380
|
7381