]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbstatus: let --json report the client_guid a session belongs to
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Dec 2023 09:36:25 +0000 (10:36 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 9 Jan 2024 10:21:34 +0000 (10:21 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/status_json.c

index 74fd6aea9b605e6ed19ca1a46bb5e099f836e469..a09573bc36c4ed6c2f0284e389a8b8e8eedd28f5 100644 (file)
@@ -22,6 +22,7 @@
 #include "lib/util/time_basic.h"
 #include "conn_tdb.h"
 #include "session.h"
+#include "librpc/gen_ndr/smbXsrv.h"
 #include "librpc/gen_ndr/open_files.h"
 #include "status_json.h"
 #include "../libcli/security/security.h"
@@ -450,6 +451,12 @@ int traverse_sessionid_json(struct traverse_state *state,
        if (result < 0) {
                goto failure;
        }
+       result = json_add_guid(&sub_json,
+                              "client_guid",
+                              &session->global->client_guid);
+       if (result < 0) {
+               goto failure;
+       }
        result = add_crypto_to_json(&sub_json, "encryption",
                                    encryption_cipher, encryption_degree);
        if (result < 0) {