From 55b642c31213d0fb8a22d14759a948f2e2d8aa45 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 11 Jan 2008 14:50:10 +0100 Subject: Set error string when ads_leave_realm() has failed in libnetjoin. Guenther (This used to be commit 01690f85bc7d052d4c57181d74aef27d1776169c) --- source3/libnet/libnet_join.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3/libnet') diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 2c60f99d79..46ebadbaee 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -202,7 +202,15 @@ static ADS_STATUS libnet_unjoin_remove_machine_acct(TALLOC_CTX *mem_ctx, } } - return ads_leave_realm(r->in.ads, r->in.machine_name); + status = ads_leave_realm(r->in.ads, r->in.machine_name); + if (!ADS_ERR_OK(status)) { + libnet_unjoin_set_error_string(mem_ctx, r, + "failed to leave realm: %s\n", + ads_errstr(status)); + return status; + } + + return ADS_SUCCESS; } /**************************************************************** -- cgit