summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-04-25 02:00:47 +0000
committerTim Potter <tpot@samba.org>2003-04-25 02:00:47 +0000
commitd3ba70356e369b56650064952224d7bb40e5671f (patch)
treed32632625791afec6b9285518faf90cb8dca87e1 /source3
parent77bad62134d412f7fb32b1448edc027ada02f794 (diff)
downloadsamba-d3ba70356e369b56650064952224d7bb40e5671f.tar.gz
samba-d3ba70356e369b56650064952224d7bb40e5671f.tar.bz2
samba-d3ba70356e369b56650064952224d7bb40e5671f.zip
Merge:
>When calling cli_samr_enum_{dom,als}_groups in a while loop, the >terminating condition should be result != STATUS_MORE_ENTRIES, not >result == NT_STATUS_OK otherwise we get stuck in an infinite loop >when there's any sign of trouble. (This used to be commit 4998a72cf8e3a2b254dc409a36b9bbd118bdc4fd)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 9ae50aaf0d..cf57004a81 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -977,7 +977,7 @@ rpc_group_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
else
printf("%-21.21s\n", groups[i].acct_name);
}
- } while (!NT_STATUS_IS_OK(result));
+ } while (NT_STATUS_V(result) == NT_STATUS_V(STATUS_MORE_ENTRIES));
/* query domain aliases */
do {
result = cli_samr_enum_als_groups(cli, mem_ctx, &domain_pol,
@@ -992,7 +992,7 @@ rpc_group_list_internals(const DOM_SID *domain_sid, struct cli_state *cli,
else
printf("%-21.21s\n", groups[i].acct_name);
}
- } while (!NT_STATUS_IS_OK(result));
+ } while (NT_STATUS_V(result) == NT_STATUS_V(STATUS_MORE_ENTRIES));
cli_samr_close(cli, mem_ctx, &domain_pol);
/* Get builtin policy handle */