summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-30 17:34:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:11 -0500
commit7847e7b644150f91cf0751516682b4bc69d7c5f3 (patch)
tree05071ce5d31dc214512aace70b77b8859ec1bb20
parent3437c2d92ccf42dbe3737c1c6a8786dfa54515d3 (diff)
downloadsamba-7847e7b644150f91cf0751516682b4bc69d7c5f3.tar.gz
samba-7847e7b644150f91cf0751516682b4bc69d7c5f3.tar.bz2
samba-7847e7b644150f91cf0751516682b4bc69d7c5f3.zip
r17320: - print the debug message before the composite context get received by the caller
- steal pipe2 to the state structure so we don't need to take about freeing is later metze (This used to be commit 4ba50fc29ec1949bb1b035ae3f2dc5f877ce581f)
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index ca77202aa7..e9b62ddc3a 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -67,9 +67,10 @@ static void continue_epm_map_binding(struct composite_context *ctx)
/* receive endpoint mapping */
c->status = dcerpc_epm_map_binding_recv(ctx);
- if (!composite_is_ok(c)) {
+ if (!NT_STATUS_IS_OK(c->status)) {
DEBUG(0,("Failed to map DCERPC/TCP NCACN_NP pipe for '%s' - %s\n",
DCERPC_NETLOGON_UUID, nt_errstr(c->status)));
+ composite_error(c, c->status);
return;
}
@@ -99,6 +100,8 @@ static void continue_secondary_connection(struct composite_context *ctx)
c->status = dcerpc_secondary_connection_recv(ctx, &s->pipe2);
if (!composite_is_ok(c)) return;
+ talloc_steal(s, s->pipe2);
+
/* initiate a non-authenticated bind */
auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe2, &dcerpc_table_netlogon);
if (composite_nomem(auth_none_req, c)) return;
@@ -122,10 +125,7 @@ static void continue_bind_auth_none(struct composite_context *ctx)
/* receive result of non-authenticated bind request */
c->status = dcerpc_bind_auth_none_recv(ctx);
- if (!composite_is_ok(c)) {
- talloc_free(s->pipe2);
- return;
- }
+ if (!composite_is_ok(c)) return;
/* prepare a challenge request */
s->r.in.server_name = talloc_asprintf(c, "\\\\%s", dcerpc_server_name(s->pipe));
@@ -214,8 +214,7 @@ static void continue_srv_auth2(struct rpc_request *req)
/* setup current netlogon credentials */
cli_credentials_set_netlogon_creds(s->credentials, s->creds);
- talloc_free(s->pipe2);
-
+
composite_done(c);
}