diff mbox

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

Message ID 1380303342-27160-1-git-send-email-sprabhu@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sachin Prabhu Sept. 27, 2013, 5:35 p.m. UTC
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

Reported-by: Panos Kavalagios <Panagiotis.Kavalagios@eurodyn.com>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
---
 fs/cifs/sess.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jeff Layton Sept. 27, 2013, 7:23 p.m. UTC | #1
On Fri, 27 Sep 2013 18:35:42 +0100
Sachin Prabhu <sprabhu@redhat.com> wrote:

> 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
> 
> Reported-by: Panos Kavalagios <Panagiotis.Kavalagios@eurodyn.com>
> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
> ---
>  fs/cifs/sess.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> index 5f99b7f..e1e74d0 100644
> --- a/fs/cifs/sess.c
> +++ b/fs/cifs/sess.c
> @@ -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) {

Looks good to me.

Reviewed-by: Jeff Layton <jlayton@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 5f99b7f..e1e74d0 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -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) {