Author: brad Date: 2005-08-20 17:09:26 +0000 (Sat, 20 Aug 2005) New Revision: 9428
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9428 Log: [EMAIL PROTECTED]: j0j0 | 2005-08-20 11:15:54 -0600 Restructure torture_join_domain() so that it joins itself, removes itself, and joins itself to the domain again to ensure that its account information is all current and as expected. Modified: branches/SOC/SAMBA_4_0/ branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c Changeset: Property changes on: branches/SOC/SAMBA_4_0 ___________________________________________________________________ Name: svk:merge - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9397 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5504 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5497 + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9397 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5506 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5497 Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c =================================================================== --- branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c 2005-08-20 16:38:29 UTC (rev 9427) +++ branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c 2005-08-20 17:09:26 UTC (rev 9428) @@ -317,7 +317,25 @@ tj->user_handle = *libnet_r.out.user_handle; tj->dom_sid = dom_sid_string(mem_ctx, libnet_r.out.domain_sid); *machine_password = libnet_r.out.join_password; - + + /* + Leave domain. This will ensure that the info for the torture machine + acct is what we are expecting when we rejoin again. + */ + torture_leave_domain(tj); + + status = libnet_JoinDomain(libnet_ctx, mem_ctx, &libnet_r); + if (!NT_STATUS_IS_OK(status)) { + return NULL; + } + + tj = talloc(mem_ctx, struct test_join); + + tj->p = libnet_r.out.samr_pipe; + tj->user_handle = *libnet_r.out.user_handle; + tj->dom_sid = dom_sid_string(mem_ctx, libnet_r.out.domain_sid); + *machine_password = libnet_r.out.join_password; + printf("torture_join_domain() complete.\n"); return tj; }
