From 55b12d032c82b280bc0fda43bff8e5b05b934ecf Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Mon, 5 Oct 2009 13:01:53 +0200 Subject: [PATCH] s3-net: print error when "net rpc changetrustpw" has failed. Guenther --- source3/utils/net_rpc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index b4505347b1f..be971d8555d 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -239,8 +239,16 @@ static NTSTATUS rpc_changetrustpw_internals(struct net_context *c, int argc, const char **argv) { + NTSTATUS status; + + status = trust_pw_find_change_and_store_it(pipe_hnd, mem_ctx, c->opt_target_workgroup); + if (!NT_STATUS_IS_OK(status)) { + d_fprintf(stderr, _("Failed to change machine account password: %s\n"), + nt_errstr(status)); + return status; + } - return trust_pw_find_change_and_store_it(pipe_hnd, mem_ctx, c->opt_target_workgroup); + return NT_STATUS_OK; } /** -- 2.34.1