diff options
author | Kenneth D'souza <kdsouza@redhat.com> | 2020-06-09 10:12:10 +0530 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-06-08 23:57:21 -0500 |
commit | 0b0430c6a10a22813e3d40c5658ae644acda4303 (patch) | |
tree | 6344d41a8283cd43c21af4399be92f1413909c15 /fs/cifs/cifsglob.h | |
parent | 5865985416ebb5a0c198a819a098b5cc300ac8a4 (diff) | |
download | lwn-0b0430c6a10a22813e3d40c5658ae644acda4303.tar.gz lwn-0b0430c6a10a22813e3d40c5658ae644acda4303.zip |
cifs: Add get_security_type_str function to return sec type.
This code is more organized and robust.
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index e133bb3e172f..fad37d61910a 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -2008,6 +2008,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; |