summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-14 14:42:19 +0200
committerGünther Deschner <gd@samba.org>2008-04-14 14:44:58 +0200
commita4e0f60c4ed3bb818166c9e6341b25a40f1f9ab8 (patch)
treea5f287308edc2d2330e0e4d2883a1a334fe6081f
parentae4159f0f7160ffd4ebcc0a2a79681d873e3e4f4 (diff)
downloadsamba-a4e0f60c4ed3bb818166c9e6341b25a40f1f9ab8.tar.gz
samba-a4e0f60c4ed3bb818166c9e6341b25a40f1f9ab8.tar.bz2
samba-a4e0f60c4ed3bb818166c9e6341b25a40f1f9ab8.zip
libnetjoin: Remove machine account if we failed to set password.
Guenther (This used to be commit db5e0ed186429667a7f6fc67e4b19a7ca75f357e)
-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 51278b5a0a..aff61d8807 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -905,6 +905,10 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
}
if (!NT_STATUS_IS_OK(status)) {
+
+ rpccli_samr_DeleteUser(pipe_hnd, mem_ctx,
+ &user_pol);
+
libnet_join_set_error_string(mem_ctx, r,
"Failed to set password for machine account (%s)\n",
nt_errstr(status));