Author: brad Date: 2005-08-04 19:59:55 +0000 (Thu, 04 Aug 2005) New Revision: 9069
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9069 Log: [EMAIL PROTECTED]: j0j0 | 2005-08-04 14:04:55 -0600 Some more work on the domain join Modified: branches/SOC/SAMBA_4_0/ branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Property changes on: branches/SOC/SAMBA_4_0 ___________________________________________________________________ Name: svk:merge - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9063 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5277 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5276 + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9063 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5279 d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5276 Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c =================================================================== --- branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c 2005-08-04 17:33:10 UTC (rev 9068) +++ branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c 2005-08-04 19:59:55 UTC (rev 9069) @@ -45,6 +45,8 @@ struct ldb_context *ldb_ctx; struct ldb_message *ldb_msg; struct libnet_context *libnet_ctx; + struct event_context *libnet_evt_ctx; + struct event_context *dcerpc_evt_ctx; const char *ldap_url; const char *domain_dn; @@ -79,7 +81,7 @@ struct drsuapi_DsBindInfoCtr *our_bind_info; const char *binding = lp_parm_string(-1, "torture", "binding"); const char *new_dc_pass; - struct event_context *event_ctx = NULL; + /*struct event_context *evt_ctx = NULL;*/ ctx = talloc_zero(mem_ctx, struct DsSyncTest); if (!ctx) return NULL; @@ -129,8 +131,13 @@ /*libnet_context_init should be passed an event_context *ev, not a TALLOC_CTX *mem_ctx. */ - ctx->libnet_ctx = libnet_context_init(event_ctx); - + /* + ctx->libnet_evt_ctx = NULL; + ctx->libnet_ctx = libnet_context_init(ctx->libnet_evt_ctx); + if (ctx->libnet_ctx == NULL) { + printf("libnet_context_init() failed, ctx->libnet_context libnet_ctx not initialized.\n"); + } + */ return ctx; } @@ -198,13 +205,13 @@ { NTSTATUS status; BOOL ret = True; - struct event_context *event = NULL; - + + ctx->dcerpc_evt_ctx = NULL; status = dcerpc_pipe_connect_b(ctx, &b->pipe, ctx->drsuapi_binding, DCERPC_DRSUAPI_UUID, DCERPC_DRSUAPI_VERSION, - credentials, event); + credentials, ctx->dcerpc_evt_ctx); if (!NT_STATUS_IS_OK(status)) { printf("Failed to connect to server as a BDC: %s\n", nt_errstr(status)); @@ -330,7 +337,8 @@ int rtn; char *old_dn; struct libnet_Join libnet_r; - + struct event_context *evt_ctx = NULL; + rtn = ldb_connect(ctx->ldb_ctx,ctx->ldap_url,0,NULL); if (rtn != 0) { printf("test_CompleteJoin(): ldb_connect() failed: %s.\n", @@ -728,6 +736,13 @@ libnet_r.in.domain_name is a netbios domain name. */ + ctx->libnet_ctx = libnet_context_init(NULL); + if (ctx->libnet_ctx == NULL) { + printf("libnet_context_init() failed, ctx->libnet_ctx not initialized.\n"); + } + if (ctx->libnet_ctx->event_ctx == NULL) { + printf("event_ctx is probably not supposed to be null, but it is.\n"); + } status = libnet_Join(ctx->libnet_ctx, ctx, &libnet_r); if (!NT_STATUS_IS_OK(status)) { const char *errstr = nt_errstr(status);
