cifs: dump Security Type info in DebugData
Subsystems (2)
PATCH v3 1/1 cifs: dump Security Type info in DebugData
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
--- fs/cifs/cifs_debug.c | 4 ++++ fs/cifs/cifsglob.h | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+)
fs/cifs/cifs_debug.c +4 -0
@@ -375,6 +375,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" , +get_security_type_str (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 "
fs/cifs/cifsglob.h +18 -0
@@ -1994,6 +1994,24 @@ extern struct smb_version_values smb302_values;extern struct smb_version_operations smb311_operations;extern struct smb_version_values smb311_values; +static inline char *get_security_type_str (enum securityEnum sectype) +{ +switch (sectype) { +case RawNTLMSSP: +return "RawNTLMSSP" ; +case Kerberos: +return "Kerberos" ; +case NTLMv2: +return "NTLMv2" ; +case NTLM : +return "NTLM" ; +case LANMAN : +return "LANMAN" ; +default : +return "Unknown" ; + } +} +static inline bool is_smb1_server (struct TCP_Server_Info *server) {return strcmp (server->vals->version_string,SMB1_VERSION_STRING ) ==0 ;
Signature · 1 line
2.21.1
the updated version of this one has been merged into cifs-2.6.git for-next
Quoted 62 lines · Kenneth D'souza
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:0x8001f3fcSession Status: 1 Security type: RawNTLMSSPSigned-off-by Kenneth D'souza <[email protected]>Signed-off-by Roberto Bergantinos Corpas <[email protected]>--- fs/cifs/cifs_debug.c | 4 ++++ fs/cifs/cifsglob.h | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+)fs/cifs/cifs_debug.c +4
-0@@ -375,6 +375,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" , +get_security_type_str (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 "fs/cifs/cifsglob.h +18
-1@@ -1994,6 +1994,24 @@ extern struct smb_version_values smb302_values;extern struct smb_version_operations smb311_operations;extern struct smb_version_values smb311_values; +static inline char *get_security_type_str (enum securityEnum sectype) +{ +switch (sectype) { +case RawNTLMSSP: +return "RawNTLMSSP" ; +case Kerberos: +return "Kerberos" ; +case NTLMv2: +return "NTLMv2" ; +case NTLM : +return "NTLM" ; +case LANMAN : +return "LANMAN" ; +default : +return "Unknown" ; + } +} +static inline bool is_smb1_server (struct TCP_Server_Info *server) {return strcmp (server->vals->version_string,SMB1_VERSION_STRING ) ==0 ; --2.21.1
Signature · 3 lines
Thanks, Steve
Thanks Steve :)
Quoted 73 lines · Steve French
the updated version of this one has been merged into cifs-2.6.git for-next
Quoted 60 lines · Kenneth D'souza
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:0x8001f3fcSession Status: 1 Security type: RawNTLMSSPSigned-off-by Kenneth D'souza <[email protected]>Signed-off-by Roberto Bergantinos Corpas <[email protected]>--- fs/cifs/cifs_debug.c | 4 ++++ fs/cifs/cifsglob.h | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+)fs/cifs/cifs_debug.c +4
-0@@ -375,6 +375,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" , +get_security_type_str (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 "fs/cifs/cifsglob.h +18
-1@@ -1994,6 +1994,24 @@ extern struct smb_version_values smb302_values;extern struct smb_version_operations smb311_operations;extern struct smb_version_values smb311_values; +static inline char *get_security_type_str (enum securityEnum sectype) +{ +switch (sectype) { +case RawNTLMSSP: +return "RawNTLMSSP" ; +case Kerberos: +return "Kerberos" ; +case NTLMv2: +return "NTLMv2" ; +case NTLM : +return "NTLM" ; +case LANMAN : +return "LANMAN" ; +default : +return "Unknown" ; + } +} +static inline bool is_smb1_server (struct TCP_Server_Info *server) {return strcmp (server->vals->version_string,SMB1_VERSION_STRING ) ==0 ; --Quoted 2 lines
2.21.1
--
Thanks,Steve