From 9bdc1a77f5d80827d1e352d30ff7b322a933dc0e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 31 Oct 2005 03:03:32 +0000 Subject: r11407: Push 'recreate account' logic into libnet/libnet_join.c. We don't return the pesky USER_EXISTS 'error' code any more, and it is much easier to handle this inline. Andrew Bartlett (This used to be commit a7eb796cf544db3fe16986d8e233d2defe7a7d1b) --- source4/torture/rpc/testjoin.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index d0b1e5c9bf..66cb4a42c1 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -319,21 +319,6 @@ struct test_join *torture_join_domain(const char *machine_name, libnet_r->in.recreate_account = True; status = libnet_JoinDomain(libnet_ctx, libnet_r, libnet_r); - if (NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) { - struct samr_DeleteUser d; - d.in.user_handle = libnet_r->out.user_handle; - d.out.user_handle = libnet_r->out.user_handle; - - /* Delete machine account */ - status = dcerpc_samr_DeleteUser(libnet_r->out.samr_pipe, tj, &d); - if (!NT_STATUS_IS_OK(status)) { - printf("Delete of machine account failed\n"); - } else { - printf("Delete of machine account was successful.\n"); - } - status = libnet_JoinDomain(libnet_ctx, libnet_r, libnet_r); - } - if (!NT_STATUS_IS_OK(status)) { if (libnet_r->out.error_string) { DEBUG(0, ("Domain join failed - %s.\n", libnet_r->out.error_string)); -- cgit