diff options
Diffstat (limited to 'source3/torture/cmd_sam.c')
-rw-r--r-- | source3/torture/cmd_sam.c | 10 |
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, |