summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-09-25 19:33:04 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-09-25 19:33:04 +0000
commitee3b497962a28c7c58e866b8536b1d2ae6f9b23a (patch)
tree05296216cd0af82242280a7ce2b286298c428a13
parent81156d6556dab2ea23dea69da6940a0482d79d9b (diff)
downloadsamba-ee3b497962a28c7c58e866b8536b1d2ae6f9b23a.tar.gz
notify user when no {domains,accounts} were found
-rw-r--r--source/torture/cmd_sam.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/torture/cmd_sam.c b/source/torture/cmd_sam.c
index caa63f13029..3d4725c8a8a 100644
--- a/source/torture/cmd_sam.c
+++ b/source/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,