summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>2018-08-08 17:42:18 +0200
committerKarolin Seeger <kseeger@samba.org>2018-08-23 10:39:30 +0200
commit0470afae4398c2bae388dd30d31d85bd6cf469c9 (patch)
tree8040f0c0fffeb950c523ef1c8613bd3d031a1b33 /source3
parenta3297648fa049471cc6b3767e34d9b8731473bd9 (diff)
downloadsamba-0470afae4398c2bae388dd30d31d85bd6cf469c9.tar.gz
s3: vfs: time_audit: fix handling of token_blob in smb_time_audit_offload_read_recv()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13568 Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 4909b966050c921b0a6a32285fee55f5f14dc3ff)
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_time_audit.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 7116796cc46..59d59114d48 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1946,13 +1946,12 @@ static NTSTATUS smb_time_audit_offload_read_recv(
struct tevent_req *req,
struct vfs_handle_struct *handle,
TALLOC_CTX *mem_ctx,
- DATA_BLOB *_token_blob)
+ DATA_BLOB *token_blob)
{
struct time_audit_offload_read_state *state = tevent_req_data(
req, struct time_audit_offload_read_state);
struct timespec ts_recv;
double timediff;
- DATA_BLOB token_blob;
NTSTATUS status;
clock_gettime_mono(&ts_recv);
@@ -1966,13 +1965,8 @@ static NTSTATUS smb_time_audit_offload_read_recv(
return status;
}
- token_blob = data_blob_talloc(mem_ctx,
- state->token_blob.data,
- state->token_blob.length);
- if (token_blob.data == NULL) {
- tevent_req_received(req);
- return NT_STATUS_NO_MEMORY;
- }
+ token_blob->length = state->token_blob.length;
+ token_blob->data = talloc_move(mem_ctx, &state->token_blob.data);
tevent_req_received(req);
return NT_STATUS_OK;