]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbstatus: add encryption and signing to sessions
authorJule Anger <janger@samba.org>
Mon, 9 May 2022 10:26:30 +0000 (12:26 +0200)
committerJule Anger <janger@samba.org>
Mon, 8 Aug 2022 12:56:28 +0000 (12:56 +0000)
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/utils/status.c
source3/utils/status_json.c
source3/utils/status_json.h
source3/utils/status_json_dummy.c

index cf5f0a71a0bd48016d1b8bd410897505c4c74e76..007f97bf7bb2543ae0a28c25e49f4c509593451f 100644 (file)
@@ -748,6 +748,10 @@ static int traverse_sessionid(const char *key, struct sessionid *session,
                                                 session,
                                                 uid_str,
                                                 gid_str,
+                                                encryption,
+                                                encryption_degree,
+                                                signing,
+                                                signing_degree,
                                                 session_dialect_str(session->connection_dialect));
        }
 
index 51011461d248605a41f1f200215b19f3ecfef5f6..5ad91094b378097392d4adf9efa4a8cf793be1f0 100644 (file)
@@ -267,6 +267,10 @@ int traverse_sessionid_json(struct traverse_state *state,
                            struct sessionid *session,
                            char *uid_str,
                            char *gid_str,
+                           const char *encryption_cipher,
+                           enum crypto_degree encryption_degree,
+                           const char *signing_cipher,
+                           enum crypto_degree signing_degree,
                            const char *connection_dialect)
 {
        struct json_object sub_json;
@@ -326,6 +330,16 @@ int traverse_sessionid_json(struct traverse_state *state,
        if (result < 0) {
                goto failure;
        }
+       result = add_crypto_to_json(&sub_json, "encryption",
+                                   encryption_cipher, encryption_degree);
+       if (result < 0) {
+               goto failure;
+       }
+       result = add_crypto_to_json(&sub_json, "signing",
+                                   signing_cipher, signing_degree);
+       if (result < 0) {
+               goto failure;
+       }
 
        result = json_add_object(&session_json, id_str, &sub_json);
        if (result < 0) {
index c2760d04ba6df2b701905ffbc029b4d7982a62b3..72fa9f98fd06c7935059637f70c3ee0407c7c1a5 100644 (file)
@@ -38,6 +38,10 @@ int traverse_sessionid_json(struct traverse_state *state,
                            struct sessionid *session,
                            char *uid_str,
                            char *gid_str,
+                           const char *encryption_cipher,
+                           enum crypto_degree encryption_degree,
+                           const char *signing_cipher,
+                           enum crypto_degree signing_degree,
                            const char *connection_dialect);
 
 #endif
index 6ea7d09f5eae2b59aedf30387ca60e0abced142a..6530b2f8f079b703b3d3fba082744b4dd036ad24 100644 (file)
@@ -49,6 +49,10 @@ int traverse_sessionid_json(struct traverse_state *state,
                            struct sessionid *session,
                            char *uid_str,
                            char *gid_str,
+                           const char *encryption_cipher,
+                           enum crypto_degree encryption_degree,
+                           const char *signing_cipher,
+                           enum crypto_degree signing_degree,
                            const char *connection_dialect)
 {
        return 0;