diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-11-17 05:17:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:19 -0500 |
commit | 2ddd807979684407de6d0346be037b25d2448cdb (patch) | |
tree | 0c813a2b7d1ba0c13cd31145a2c3cc4c6f761dff /source4/libnet/libnet_rpc.c | |
parent | c9035c6633236c940b915f3cee2a7e87b3038678 (diff) | |
download | samba-2ddd807979684407de6d0346be037b25d2448cdb.tar.gz samba-2ddd807979684407de6d0346be037b25d2448cdb.tar.bz2 samba-2ddd807979684407de6d0346be037b25d2448cdb.zip |
r19759: 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
(This used to be commit 67c191305fa97470017e7e8a5b55fc0949d432ad)
Diffstat (limited to 'source4/libnet/libnet_rpc.c')
-rw-r--r-- | source4/libnet/libnet_rpc.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index 3c9b7352cc..8b3e7bae3c 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -412,6 +412,7 @@ static void continue_lsa_query_info(struct rpc_request *req); 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,8 +531,16 @@ static void continue_lsa_policy(struct rpc_request *req) 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; } @@ -610,12 +619,11 @@ static void continue_lsa_query_info2(struct rpc_request *req) /* - 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,6 +642,20 @@ static void continue_lsa_query_info(struct rpc_request *req) 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); @@ -650,7 +672,6 @@ static void continue_lsa_query_info(struct rpc_request *req) 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 @@ static void continue_epm_map_binding(struct composite_context *ctx) /* - 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) |