The Samba-Bugzilla – Attachment 11321 Details for
Bug 11426
net share allowedusers crashes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.3 cherry-picked from master
v43-allowedusers.patch (text/plain), 2.25 KB, created by
Ralph Böhme
on 2015-08-10 13:21:21 UTC
(
hide
)
Description:
Patch for 4.3 cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2015-08-10 13:21:21 UTC
Size:
2.25 KB
patch
obsolete
>From b81411a60f405d4868f2dc764b58e309ccb54ca0 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Tue, 4 Aug 2015 11:18:34 +0200 >Subject: [PATCH] s3-net: use talloc array in share allowedusers >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=11426 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Tue Aug 4 16:48:36 CEST 2015 on sn-devel-104 > >(cherry picked from commit 95eb6db580678a29b1f5f30a9567ea449a43d75a) >--- > source3/utils/net_rpc.c | 24 ++++++++++++++++++++---- > 1 file changed, 20 insertions(+), 4 deletions(-) > >diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c >index 6eb27c9..1de08c4 100644 >--- a/source3/utils/net_rpc.c >+++ b/source3/utils/net_rpc.c >@@ -4522,10 +4522,25 @@ static struct full_alias *server_aliases; > /* > * Add an alias to the static list. > */ >-static void push_alias(TALLOC_CTX *mem_ctx, struct full_alias *alias) >+static void push_alias(struct full_alias *alias) > { >- if (server_aliases == NULL) >- server_aliases = SMB_MALLOC_ARRAY(struct full_alias, 100); >+ size_t array_size; >+ >+ if (server_aliases == NULL) { >+ server_aliases = talloc_array(NULL, struct full_alias, 100); >+ if (server_aliases == NULL) { >+ smb_panic("talloc_array failed"); >+ } >+ } >+ >+ array_size = talloc_array_length(server_aliases); >+ if (array_size == num_server_aliases) { >+ server_aliases = talloc_realloc(NULL, server_aliases, >+ struct full_alias, array_size + 100); >+ if (server_aliases == NULL) { >+ smb_panic("talloc_realloc failed"); >+ } >+ } > > server_aliases[num_server_aliases] = *alias; > num_server_aliases += 1; >@@ -4634,7 +4649,7 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd, > sid_compose(&alias.sid, domain_sid, > groups->entries[i].idx); > >- push_alias(mem_ctx, &alias); >+ push_alias(&alias); > } > } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); > >@@ -5264,6 +5279,7 @@ static NTSTATUS rpc_share_allowedusers_internals(struct net_context *c, > free_user_token(&tokens[i].token); > } > SAFE_FREE(tokens); >+ TALLOC_FREE(server_aliases); > > return nt_status; > } >-- >2.1.0 >
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:
metze
:
review+
Actions:
View
Attachments on
bug 11426
: 11321 |
11322
|
11323