summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-26 17:20:35 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-03 18:48:03 +1000
commit6d7ac4f1ad364cac6266bd3e88d141a7517a7d15 (patch)
tree379f8644e55e5ac500478adac62720a35ee286d8 /source3/rpc_server
parent763243d6ed470d1ff5c0d1c4ab6cda227103cc15 (diff)
downloadsamba-6d7ac4f1ad364cac6266bd3e88d141a7517a7d15.tar.gz
samba-6d7ac4f1ad364cac6266bd3e88d141a7517a7d15.tar.bz2
samba-6d7ac4f1ad364cac6266bd3e88d141a7517a7d15.zip
s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_update
This clarifies the lifetime of the returned token. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/dcesrv_ntlmssp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/rpc_server/dcesrv_ntlmssp.c b/source3/rpc_server/dcesrv_ntlmssp.c
index 26f924eedf..87c8e0bece 100644
--- a/source3/rpc_server/dcesrv_ntlmssp.c
+++ b/source3/rpc_server/dcesrv_ntlmssp.c
@@ -56,15 +56,13 @@ NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
NTLMSSP_NEGOTIATE_SEAL);
}
- status = auth_ntlmssp_update(a, *token_in, token_out);
+ status = auth_ntlmssp_update(a, mem_ctx, *token_in, token_out);
if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
DEBUG(0, (__location__ ": auth_ntlmssp_update failed: %s\n",
nt_errstr(status)));
goto done;
}
- /* Make sure data is bound to the memctx, to be freed the caller */
- talloc_steal(mem_ctx, token_out->data);
/* steal ntlmssp context too */
*ctx = talloc_move(mem_ctx, &a);
@@ -87,12 +85,9 @@ NTSTATUS ntlmssp_server_step(struct auth_ntlmssp_state *ctx,
/* this has to be done as root in order to verify the password */
become_root();
- status = auth_ntlmssp_update(ctx, *token_in, token_out);
+ status = auth_ntlmssp_update(ctx, mem_ctx, *token_in, token_out);
unbecome_root();
- /* put the output token data on the given mem_ctx */
- talloc_steal(mem_ctx, token_out->data);
-
return status;
}