summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-07-20 16:17:58 -0700
committerJeremy Allison <jra@samba.org>2010-07-20 16:17:58 -0700
commit5002b3a90d6002ce51ad1d8a038ea4c7be98ab43 (patch)
tree82f2fd9e0ba9594d098449a1659904850c71b8c7 /source3/rpc_server
parent8df0f0e49e1a91fa10edd65582aa43020e6bc101 (diff)
downloadsamba-5002b3a90d6002ce51ad1d8a038ea4c7be98ab43.tar.gz
samba-5002b3a90d6002ce51ad1d8a038ea4c7be98ab43.tar.bz2
samba-5002b3a90d6002ce51ad1d8a038ea4c7be98ab43.zip
Add approriate TALLOC_CTX's thoughout the spnego code. No more implicit NULL contexts.
Jeremy.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_pipe.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index e69bd9e31f..0132400029 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -887,21 +887,18 @@ static bool pipe_spnego_auth_bind_negotiate(pipes_struct *p,
}
/* Generate the response blob we need for step 2 of the bind. */
- *response = spnego_gen_auth_response(&chal, status, OID_NTLMSSP);
+ *response = spnego_gen_auth_response(mem_ctx, &chal, status, OID_NTLMSSP);
} else {
/*
* SPNEGO negotiate down to NTLMSSP. The subsequent
* code to process follow-up packets is not complete
* yet. JRA.
*/
- *response = spnego_gen_auth_response(NULL,
+ *response = spnego_gen_auth_response(mem_ctx, NULL,
NT_STATUS_MORE_PROCESSING_REQUIRED,
OID_NTLMSSP);
}
- /* Make sure data is bound to the memctx, to be freed the caller */
- talloc_steal(mem_ctx, response->data);
-
/* auth_pad_len will be handled by the caller */
p->auth.a_u.auth_ntlmssp_state = a;
@@ -954,7 +951,7 @@ static bool pipe_spnego_auth_bind_continue(pipes_struct *p,
goto err;
}
- if (!spnego_parse_auth(pauth_info->credentials, &auth_blob)) {
+ if (!spnego_parse_auth(talloc_tos(), pauth_info->credentials, &auth_blob)) {
DEBUG(0,("pipe_spnego_auth_bind_continue: invalid SPNEGO blob.\n"));
goto err;
}
@@ -971,10 +968,7 @@ static bool pipe_spnego_auth_bind_continue(pipes_struct *p,
data_blob_free(&auth_blob);
/* Generate the spnego "accept completed" blob - no incoming data. */
- *response = spnego_gen_auth_response(&auth_reply, NT_STATUS_OK, OID_NTLMSSP);
-
- /* Make sure data is bound to the memctx, to be freed the caller */
- talloc_steal(mem_ctx, response->data);
+ *response = spnego_gen_auth_response(mem_ctx, &auth_reply, NT_STATUS_OK, OID_NTLMSSP);
data_blob_free(&auth_reply);