]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/samba/samba-3.6.99-fix_rpc_query_user_list.patch
Merge remote-tracking branch 'origin/master' into next
[ipfire-2.x.git] / src / patches / samba / samba-3.6.99-fix_rpc_query_user_list.patch
CommitLineData
1d13e637
AF
1From 75497eb3bb57424cefbbbe0c61cd2b0adcad802b Mon Sep 17 00:00:00 2001
2From: Andreas Schneider <asn@samba.org>
3Date: Wed, 2 Nov 2016 17:19:09 +0100
4Subject: [PATCH] s3-winbind: Do not return NO_MEMORY if we have an empty user
5 list
6
7The domain child for the MACHINE ACCOUNT might fail with
8NT_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
11declare victory here!
12
13BUG: https://bugzilla.samba.org/show_bug.cgi?id=12405
14
15Signed-off-by: Andreas Schneider <asn@samba.org>
16---
17 source3/winbindd/winbindd_rpc.c | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
21index 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--
362.7.4
37