Skip to contentSkip to conversation

cifs: Allow LANMAN auth method for servers supporting unencapsulated authentication methods

PATCH In review Sachin Prabhu 2 participants 2 messages Sep 27, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: Allow LANMAN auth method for servers supporting unencapsulated authentication methods

This allows users to use LANMAN authentication on servers which support unencapsulated authentication.

The patch fixes a regression where users using plaintext authentication were no longer able to do so because of changed bought in by patch 3f618223dc0bdcbc8d510350e78ee2195ff93768

https://bugzilla.redhat.com/show_bug.cgi?id=1011621

---
 fs/cifs/sess.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cifs/sess.c +2 -2
index 5f99b7f..e1e74d0 100644
@@ -582,9 +582,9 @@ select_sectype(struct TCP_Server_Info *server, enum securityEnum requested)
 				return NTLMv2;
 			if (global_secflags & CIFSSEC_MAY_NTLM)
 				return NTLM;
-			/* Fallthrough */
 		default:
-			return Unspecified;
+			/* Fallthrough to attempt LANMAN authentication next */
+			break;
 		}
 	case CIFS_NEGFLAVOR_LANMAN:
 		switch (requested) {
Signature · 1 line
1.8.3.1

A message that is not in the archive (sent off-list or not yet received): 1380303342-27160-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 21 lines · On Fri, 27 Sep 2013 18:35:42 +0100 Sachin Prabhu…

This allows users to use LANMAN authentication on servers which support unencapsulated authentication.

The patch fixes a regression where users using plaintext authentication were no longer able to do so because of changed bought in by patch 3f618223dc0bdcbc8d510350e78ee2195ff93768

https://bugzilla.redhat.com/show_bug.cgi?id=1011621

---
 fs/cifs/sess.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cifs/sess.c +0 -0
index 5f99b7f..e1e74d0 100644
@@ -582,9 +582,9 @@ select_sectype(struct TCP_Server_Info *server, enum securityEnum requested)
 				return NTLMv2;

fs/cifs/sess.c select_sectype(struct TCP_Server_Info *server, enum securityEnum requested) · line 590

Quoted 10 lines
fs/cifs/sess.c +2 -2
 			if (global_secflags & CIFSSEC_MAY_NTLM)
 				return NTLM;
-			/* Fallthrough */
 		default:
-			return Unspecified;
+			/* Fallthrough to attempt LANMAN authentication next */
+			break;
 		}
 	case CIFS_NEGFLAVOR_LANMAN:
 		switch (requested) {

Looks good to me.