]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/samba/samba-3.6.99-fix_rpc_query_user_list.patch
Merge branch 'core110'
[people/pmueller/ipfire-2.x.git] / src / patches / samba / samba-3.6.99-fix_rpc_query_user_list.patch
1 From 75497eb3bb57424cefbbbe0c61cd2b0adcad802b Mon Sep 17 00:00:00 2001
2 From: Andreas Schneider <asn@samba.org>
3 Date: Wed, 2 Nov 2016 17:19:09 +0100
4 Subject: [PATCH] s3-winbind: Do not return NO_MEMORY if we have an empty user
5 list
6
7 The domain child for the MACHINE ACCOUNT might fail with
8 NT_STATUS_NO_MEMORY because an emtpy user list is returned.
9
10 *pnum_info is already set to 0 at the beginngin so we should just
11 declare victory here!
12
13 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12405
14
15 Signed-off-by: Andreas Schneider <asn@samba.org>
16 ---
17 source3/winbindd/winbindd_rpc.c | 4 ++++
18 1 file changed, 4 insertions(+)
19
20 diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
21 index c560a6b..59bd78a 100644
22 --- a/source3/winbindd/winbindd_rpc.c
23 +++ b/source3/winbindd/winbindd_rpc.c
24 @@ -88,6 +88,10 @@ NTSTATUS rpc_query_user_list(TALLOC_CTX *mem_ctx,
25 num_dom_users = disp_info.info1.count;
26
27 num_info += num_dom_users;
28 + /* If there are no user to enumerate we're done */
29 + if (num_info == 0) {
30 + return NT_STATUS_OK;
31 + }
32
33 info = TALLOC_REALLOC_ARRAY(mem_ctx,
34 info,
35 --
36 2.7.4
37