summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-05 13:01:53 +0200
committerGünther Deschner <gd@samba.org>2009-10-05 13:01:53 +0200
commit55b12d032c82b280bc0fda43bff8e5b05b934ecf (patch)
treeca8ceb6bb15ccb087effb6c9edc0365fe6db3f7b /source3/utils
parent84de81b4786bed411199f2785a1eafc7c86db478 (diff)
downloadsamba-55b12d032c82b280bc0fda43bff8e5b05b934ecf.tar.gz
samba-55b12d032c82b280bc0fda43bff8e5b05b934ecf.tar.bz2
samba-55b12d032c82b280bc0fda43bff8e5b05b934ecf.zip
s3-net: print error when "net rpc changetrustpw" has failed.
Guenther
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index b4505347b1..be971d8555 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;
}
/**