Skip to content

Commit 8b4dd44

Browse files
author
Steve French
committed
smb3: display debug information better for encryption
Fix /proc/fs/cifs/DebugData to use the same case for "encryption" (ie "Encryption" with init capital letter was used in one place). In addition, if gcm256 encryption (intead of gcm128) is used on a connection to a server, note that in the DebugData as well. It now displays (when gcm256 negotiated): Security type: RawNTLMSSP SessionId: 0x86125800bc000b0d encrypted(gcm256) Acked-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 72a7804 commit 8b4dd44

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fs/cifs/cifs_debug.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static void cifs_debug_tcon(struct seq_file *m, struct cifs_tcon *tcon)
108108
if ((tcon->seal) ||
109109
(tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) ||
110110
(tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA))
111-
seq_printf(m, " Encrypted");
111+
seq_puts(m, " encrypted");
112112
if (tcon->nocase)
113113
seq_printf(m, " nocase");
114114
if (tcon->unix_ext)
@@ -415,8 +415,12 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
415415

416416
/* dump session id helpful for use with network trace */
417417
seq_printf(m, " SessionId: 0x%llx", ses->Suid);
418-
if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA)
418+
if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) {
419419
seq_puts(m, " encrypted");
420+
/* can help in debugging to show encryption type */
421+
if (server->cipher_type == SMB2_ENCRYPTION_AES256_GCM)
422+
seq_puts(m, "(gcm256)");
423+
}
420424
if (ses->sign)
421425
seq_puts(m, " signed");
422426

0 commit comments

Comments
 (0)