All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] cifs: dump Security Type info in DebugData
@ 2020-06-04 15:44 Kenneth D'souza
  2020-06-04 17:21 ` Aurélien Aptel
  0 siblings, 1 reply; 3+ messages in thread
From: Kenneth D'souza @ 2020-06-04 15:44 UTC (permalink / raw)
  To: linux-cifs; +Cc: smfrench, kdsouza, rbergant

Currently the end user is unaware with what sec type the
cifs share is mounted if no sec=<type> option is parsed.
With this patch one can easily check from DebugData.

Example:
1) Name: x.x.x.x Uses: 1 Capability: 0x8001f3fc	Session Status: 1 Security type: RawNTLMSSP

Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
---
 fs/cifs/cifs_debug.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 916567d770f5..3ad1a98fd567 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -221,6 +221,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 	struct cifs_ses *ses;
 	struct cifs_tcon *tcon;
 	int i, j;
+	const char *security_types[] = {"Unspecified", "LANMAN", "NTLM",
+                                       "NTLMv2", "RawNTLMSSP", "Kerberos"};
 
 	seq_puts(m,
 		    "Display Internal CIFS Data Structures for Debugging\n"
@@ -375,6 +377,10 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 				ses->ses_count, ses->serverOS, ses->serverNOS,
 				ses->capabilities, ses->status);
 			}
+
+			seq_printf(m,"Security type: %s\n",
+                                      security_types[server->ops->select_sectype(server, ses->sectype)]);
+
 			if (server->rdma)
 				seq_printf(m, "RDMA\n\t");
 			seq_printf(m, "TCP status: %d Instance: %d\n\tLocal Users To "
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-05 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 15:44 [PATCH v2] cifs: dump Security Type info in DebugData Kenneth D'souza
2020-06-04 17:21 ` Aurélien Aptel
2020-06-05 15:20   ` Kenneth Dsouza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.