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
commit2c33710351e2bf5b2c13060a87a5c7d917ab8116 (patch)
tree166c9397e235d42fe434552d81705171461aa1d3
parent07d7643a6e99ba07ecade2156f09a5bd20bdf695 (diff)
downloadsamba-2c33710351e2bf5b2c13060a87a5c7d917ab8116.tar.gz
samba-2c33710351e2bf5b2c13060a87a5c7d917ab8116.tar.bz2
samba-2c33710351e2bf5b2c13060a87a5c7d917ab8116.zip
notify user when no {domains,accounts} were found
(This used to be commit ee3b497962a28c7c58e866b8536b1d2ae6f9b23a)
-rw-r--r--source3/torture/cmd_sam.c10
1 files changed, 10 insertions, 0 deletions
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,