summaryrefslogtreecommitdiff
path: root/auth/auth_log.c
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2019-02-01 09:40:10 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-02-20 06:03:09 +0100
commitd486a199598b75014c5e897543aff51b5af8d0a1 (patch)
tree2ea0b6489be005459453bb76f99cab013902aec7 /auth/auth_log.c
parent96e6adedcd9dfb7556f503a9d7602ac04fe870c1 (diff)
downloadsamba-d486a199598b75014c5e897543aff51b5af8d0a1.tar.gz
auth log: Log the netlogon logon id.
Add code to log the logonId in the JSON Authentication messages. The version number for Authentication messages changes from 1.1 to 1.2 to reflect this. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth/auth_log.c')
-rw-r--r--auth/auth_log.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/auth/auth_log.c b/auth/auth_log.c
index 8f1ae61a99e..d9b83b0ea0d 100644
--- a/auth/auth_log.c
+++ b/auth/auth_log.c
@@ -41,7 +41,7 @@
* increment the major version.
*/
#define AUTH_MAJOR 1
-#define AUTH_MINOR 1
+#define AUTH_MINOR 2
#define AUTHZ_MAJOR 1
#define AUTHZ_MINOR 1
@@ -151,6 +151,7 @@ static void log_authentication_event_json(
struct json_object wrapper = json_empty_object;
struct json_object authentication = json_empty_object;
char negotiate_flags[11];
+ char logon_id[19];
int rc = 0;
authentication = json_new_object();
@@ -167,6 +168,14 @@ static void log_authentication_event_json(
if (rc != 0) {
goto failure;
}
+ snprintf(logon_id,
+ sizeof( logon_id),
+ "%"PRIx64"",
+ ui->logon_id);
+ rc = json_add_string(&authentication, "logonId", logon_id);
+ if (rc != 0) {
+ goto failure;
+ }
rc = json_add_int(&authentication, "logonType", get_logon_type(ui));
if (rc != 0) {
goto failure;