Author: abartlet Date: 2006-11-17 05:17:32 +0000 (Fri, 17 Nov 2006) New Revision: 19759
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19759 Log: Allow a join to occour against ncacn_ip_tcp again (useful for torture tests). The issue is that Win2k3 SP1 will not answer many LSA requests on that port (I think this is as a security measure). In this case, we need to skip ahead in the composite functions. We were also checking the wrong variable to determine sucess/failure of the LsaOpenPolicy2. Andrew Bartlett Modified: branches/SAMBA_4_0/source/libnet/libnet_rpc.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/libnet_rpc.c =================================================================== --- branches/SAMBA_4_0/source/libnet/libnet_rpc.c 2006-11-17 01:25:23 UTC (rev 19758) +++ branches/SAMBA_4_0/source/libnet/libnet_rpc.c 2006-11-17 05:17:32 UTC (rev 19759) @@ -412,6 +412,7 @@ static void continue_lsa_query_info2(struct rpc_request *req); static void continue_epm_map_binding(struct composite_context *ctx); static void continue_secondary_conn(struct composite_context *ctx); +static void continue_epm_map_binding_send(struct composite_context *c); /** @@ -530,9 +531,17 @@ return; } - if (!NT_STATUS_IS_OK(s->lsa_query_info2.out.result)) { - composite_error(c, s->lsa_query_info2.out.result); + if (NT_STATUS_EQUAL(s->lsa_open_policy.out.result, NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED)) { + s->r.out.realm = NULL; + s->r.out.guid = NULL; + s->r.out.domain_name = NULL; + s->r.out.domain_sid = NULL; + /* Skip to the creating the actual connection, no info available on this transport */ + continue_epm_map_binding_send(c); return; + } else if (!NT_STATUS_IS_OK(s->lsa_open_policy.out.result)) { + composite_error(c, s->lsa_open_policy.out.result); + return; } /* query lsa info for dns domain name and guid */ @@ -610,12 +619,11 @@ /* - Step 5 of RpcConnectDCInfo: Get domain name and sid and request endpoint - map binding + Step 5 of RpcConnectDCInfo: Get domain name and sid */ static void continue_lsa_query_info(struct rpc_request *req) { - struct composite_context *c, *epm_map_req; + struct composite_context *c; struct rpc_connect_dci_state *s; c = talloc_get_type(req->async.private, struct composite_context); @@ -634,7 +642,21 @@ s->r.out.domain_sid = s->lsa_query_info.out.info->domain.sid; s->r.out.domain_name = s->lsa_query_info.out.info->domain.name.string; + continue_epm_map_binding_send(c); +} +/* + Step 5 (continued) of RpcConnectDCInfo: request endpoint + map binding. + + We may short-cut to this step if we dont' support LSA OpenPolicy on this transport +*/ +static void continue_epm_map_binding_send(struct composite_context *c) +{ + struct rpc_connect_dci_state *s; + struct composite_context *epm_map_req; + s = talloc_get_type(c->private_data, struct rpc_connect_dci_state); + /* prepare to get endpoint mapping for the requested interface */ s->final_binding = talloc(s, struct dcerpc_binding); if (composite_nomem(s->final_binding, c)) return; @@ -650,7 +672,6 @@ composite_continue(c, epm_map_req, continue_epm_map_binding, c); } - /* Step 6 of RpcConnectDCInfo: Receive endpoint mapping and create secondary rpc connection derived from already used pipe but connected to the requested @@ -682,7 +703,7 @@ /* - Step 7 of RpcConnectDCInfo: Get actual lsa pipe to be returned + Step 7 of RpcConnectDCInfo: Get actual pipe to be returned and complete this composite call */ static void continue_secondary_conn(struct composite_context *ctx)