From 2c33710351e2bf5b2c13060a87a5c7d917ab8116 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 25 Sep 2002 19:33:04 +0000 Subject: notify user when no {domains,accounts} were found (This used to be commit ee3b497962a28c7c58e866b8536b1d2ae6f9b23a) --- source3/torture/cmd_sam.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source3/torture/cmd_sam.c b/source3/torture/cmd_sam.c index caa63f1302..3d4725c8a8 100644 --- a/source3/torture/cmd_sam.c +++ b/source3/torture/cmd_sam.c @@ -172,6 +172,11 @@ static NTSTATUS cmd_enum_domains(struct samtest_state *st, TALLOC_CTX *mem_ctx, return status; } + if (domain_count == 0) { + printf("No domains found!\n"); + return NT_STATUS_OK; + } + for (i = 0; i < domain_count; i++) { printf("%s %s\n", domain_names[i], sid_string_static(&domain_sids[i])); } @@ -337,6 +342,11 @@ static NTSTATUS cmd_enum_accounts(struct samtest_state *st, TALLOC_CTX *mem_ctx, return status; } + if (account_count == 0) { + printf("No accounts found!\n"); + return NT_STATUS_OK; + } + for (i = 0; i < account_count; i++) printf("%s\t%s\t%s\t%s\t%d\n", sid_string_static(&accounts[i].sid), accounts[i].account_name, -- cgit