diff options
-rw-r--r-- | source3/utils/net_rpc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 6addd336e2..f14ae94906 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -84,7 +84,14 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli) result = cli_lsa_query_info_policy(cli, mem_ctx, &pol, info_class, domain_name, domain_sid); if (!NT_STATUS_IS_OK(result)) { - goto error; + error: + fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain); + + if (!NT_STATUS_IS_OK(result)) { + fprintf(stderr, "error: %s\n", nt_errstr(result)); + } + + exit(1); } cli_lsa_close(cli, mem_ctx, &pol); @@ -92,15 +99,6 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli) talloc_destroy(mem_ctx); return domain_sid; - - error: - fprintf(stderr, "could not obtain sid for domain %s\n", cli->domain); - - if (!NT_STATUS_IS_OK(result)) { - fprintf(stderr, "error: %s\n", nt_errstr(result)); - } - - exit(1); } /** |