aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-03-09 19:12:18 -0500
committerSteve French <stfrench@microsoft.com>2019-03-14 20:32:35 -0400
commitffd1ef1e50727e96e360e871b89aa8cf329935f7 (patch)
tree6c05f001a8782940498f6802b13c15fccaf74d1a
parent2b53b929faedacc6531bbb4315585cb7c14a252d (diff)
smb3: display security information in /proc/fs/cifs/DebugData more accurately
When the server required encryption (but we didn't connect to it with the "seal" mount option) we weren't displaying in /proc/fs/cifs/DebugData that the tcon for that share was encrypted. Similarly we were not displaying that signing was required when ses->sign was enabled (we only checked ses->server->sign). This makes it easier to debug when in fact the connection is signed (or sealed), whether for performance or security questions. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
-rw-r--r--fs/cifs/cifs_debug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index e92a2fee3c57..faeb1452cc2d 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -115,7 +115,9 @@ static void cifs_debug_tcon(struct seq_file *m, struct cifs_tcon *tcon)
115 seq_puts(m, " type: CDROM "); 115 seq_puts(m, " type: CDROM ");
116 else 116 else
117 seq_printf(m, " type: %d ", dev_type); 117 seq_printf(m, " type: %d ", dev_type);
118 if (tcon->seal) 118 if ((tcon->seal) ||
119 (tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) ||
120 (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA))
119 seq_printf(m, " Encrypted"); 121 seq_printf(m, " Encrypted");
120 if (tcon->nocase) 122 if (tcon->nocase)
121 seq_printf(m, " nocase"); 123 seq_printf(m, " nocase");
@@ -371,6 +373,10 @@ skip_rdma:
371 atomic_read(&server->in_send), 373 atomic_read(&server->in_send),
372 atomic_read(&server->num_waiters)); 374 atomic_read(&server->num_waiters));
373#endif 375#endif
376 if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA)
377 seq_puts(m, " encrypted");
378 if (ses->sign)
379 seq_puts(m, " signed");
374 380
375 seq_puts(m, "\n\tShares:"); 381 seq_puts(m, "\n\tShares:");
376 j = 0; 382 j = 0;