summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2018-04-10 06:44:00 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-05-10 20:02:22 +0200
commit1488723a119736ed6401476ebe58afe5ba9953d4 (patch)
treed08b343cec7f77e4da7744c881434c8c95badf4d /source3/auth
parent79ba530aaf76be639143530ab6e28d1e3696dfd2 (diff)
downloadsamba-1488723a119736ed6401476ebe58afe5ba9953d4.tar.gz
auth: Add unique session GUID identifier
Generate a GUID for each successful authorization, this will allow the tying of events in the logs back to a specific session. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 3b951e7fa0a..24d1e37e9cb 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -488,6 +488,8 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
+ session_info->unique_session_token = GUID_random();
+
*session_info_out = session_info;
return NT_STATUS_OK;
}
@@ -658,6 +660,8 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
return status;
}
+ session_info->unique_session_token = GUID_random();
+
*session_info_out = session_info;
return NT_STATUS_OK;
}
@@ -1209,6 +1213,8 @@ done:
return status;
}
+ session_info->unique_session_token = GUID_random();
+
*session_info_out = talloc_move(mem_ctx, &session_info);
TALLOC_FREE(frame);
return NT_STATUS_OK;