summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-08 11:46:11 +0100
committerGünther Deschner <gd@samba.org>2008-01-08 11:59:01 +0100
commitc6576503c9298f1123ac4902e2b72453745d3566 (patch)
treed6a8ab45ae7d15a5db8ae3c9f09707952759ce59 /source3/libnet
parentaab6704ce803a738ba125895b20a31f242fe2885 (diff)
downloadsamba-c6576503c9298f1123ac4902e2b72453745d3566.tar.gz
samba-c6576503c9298f1123ac4902e2b72453745d3566.tar.bz2
samba-c6576503c9298f1123ac4902e2b72453745d3566.zip
When unjoining fails (e.g. missing creds) make sure we still correct config.
Guenther (This used to be commit 7f51583f681b1acc9bfbab6ee0e2d1c13d2c4ca4)
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index f4c0dfa2c2..05ab184cec 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1075,6 +1075,9 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx,
status = libnet_join_unjoindomain_rpc(mem_ctx, r);
if (!NT_STATUS_IS_OK(status)) {
+ libnet_unjoin_set_error_string(mem_ctx, r,
+ "failed to unjoin domain: %s\n",
+ nt_errstr(status));
if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
return WERR_SETUP_NOT_JOINED;
}
@@ -1113,6 +1116,7 @@ WERROR libnet_Unjoin(TALLOC_CTX *mem_ctx,
if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE) {
werr = libnet_DomainUnjoin(mem_ctx, r);
if (!W_ERROR_IS_OK(werr)) {
+ do_UnjoinConfig(r);
return werr;
}
}