From 6fc42047ec40c4c5661ede98fa0c32ccd5abfe7d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 25 Jun 2002 11:20:14 +0000 Subject: Try to avoid infinite loops when reteriving users - even from broken servers. Andrew Bartlett (This used to be commit ebc8452a30b2a9bdd6698af8dad489f3f92ae7a6) --- source3/rpcclient/cmd_samr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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++) { -- cgit