summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-06-25 11:20:14 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-06-25 11:20:14 +0000
commit6fc42047ec40c4c5661ede98fa0c32ccd5abfe7d (patch)
tree31b010a5bab26e4175dd4a2f674ff37aa590b686 /source3
parent07465761137adf756d771fa1f8592c294488e779 (diff)
downloadsamba-6fc42047ec40c4c5661ede98fa0c32ccd5abfe7d.tar.gz
samba-6fc42047ec40c4c5661ede98fa0c32ccd5abfe7d.tar.bz2
samba-6fc42047ec40c4c5661ede98fa0c32ccd5abfe7d.zip
Try to avoid infinite loops when reteriving users - even from broken servers.
Andrew Bartlett (This used to be commit ebc8452a30b2a9bdd6698af8dad489f3f92ae7a6)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_samr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 7a0f5671b9..7756cd87cd 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -874,7 +874,10 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli,
&start_idx, info_level,
&num_entries, max_entries, &ctr);
- if (!NT_STATUS_IS_OK(result))
+ if (!NT_STATUS_IS_OK(result) && !NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES))
+ break;
+
+ if (num_entries == 0)
break;
for (i = 0; i < num_entries; i++) {