diff mbox

cifs: reinstate sec=ntlmv2 mount option

Message ID 1343090057-32700-1-git-send-email-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton July 24, 2012, 12:34 a.m. UTC
sec=ntlmv2 as a mount option got dropped in the mount option overhaul.

Cc: Sachin Prabhu <sprabhu@redhat.com>
Cc: <stable@vger.kernel.org> # 3.4+
Reported-by: Günter Kukkukk <linux@kukkukk.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/cifs/connect.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Steve French July 24, 2012, 1:47 a.m. UTC | #1
probably could alias this (sec=ntlmv2) in mount.cifs as well if we
need a fast fix without kernel update.

On Mon, Jul 23, 2012 at 7:34 PM, Jeff Layton <jlayton@redhat.com> wrote:
> sec=ntlmv2 as a mount option got dropped in the mount option overhaul.
>
> Cc: Sachin Prabhu <sprabhu@redhat.com>
> Cc: <stable@vger.kernel.org> # 3.4+
> Reported-by: Günter Kukkukk <linux@kukkukk.com>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  fs/cifs/connect.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index e8c3e6b..a675b7f 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -238,8 +238,8 @@ static const match_table_t cifs_mount_option_tokens = {
>  enum {
>         Opt_sec_krb5, Opt_sec_krb5i, Opt_sec_krb5p,
>         Opt_sec_ntlmsspi, Opt_sec_ntlmssp,
> -       Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2i,
> -       Opt_sec_nontlm, Opt_sec_lanman,
> +       Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2,
> +       Opt_sec_ntlmv2i, Opt_sec_lanman,
>         Opt_sec_none,
>
>         Opt_sec_err
> @@ -253,8 +253,9 @@ static const match_table_t cifs_secflavor_tokens = {
>         { Opt_sec_ntlmssp, "ntlmssp" },
>         { Opt_ntlm, "ntlm" },
>         { Opt_sec_ntlmi, "ntlmi" },
> +       { Opt_sec_ntlmv2, "nontlm" },
> +       { Opt_sec_ntlmv2, "ntlmv2" },
>         { Opt_sec_ntlmv2i, "ntlmv2i" },
> -       { Opt_sec_nontlm, "nontlm" },
>         { Opt_sec_lanman, "lanman" },
>         { Opt_sec_none, "none" },
>
> @@ -1167,7 +1168,7 @@ static int cifs_parse_security_flavors(char *value,
>         case Opt_sec_ntlmi:
>                 vol->secFlg |= CIFSSEC_MAY_NTLM | CIFSSEC_MUST_SIGN;
>                 break;
> -       case Opt_sec_nontlm:
> +       case Opt_sec_ntlmv2:
>                 vol->secFlg |= CIFSSEC_MAY_NTLMV2;
>                 break;
>         case Opt_sec_ntlmv2i:
> --
> 1.7.10.4
>
Günter Kukkukk July 24, 2012, 2:35 a.m. UTC | #2
Am Dienstag, 24. Juli 2012, 03:47:30 schrieb Steve French:
> probably could alias this (sec=ntlmv2) in mount.cifs as well if we
> need a fast fix without kernel update.
> 
> On Mon, Jul 23, 2012 at 7:34 PM, Jeff Layton <jlayton@redhat.com> wrote:
> > sec=ntlmv2 as a mount option got dropped in the mount option overhaul.
> > 
> > Cc: Sachin Prabhu <sprabhu@redhat.com>
> > Cc: <stable@vger.kernel.org> # 3.4+
> > Reported-by: Günter Kukkukk <linux@kukkukk.com>
> > Signed-off-by: Jeff Layton <jlayton@redhat.com>
> > ---
> > 
> >  fs/cifs/connect.c |    9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> > index e8c3e6b..a675b7f 100644
> > --- a/fs/cifs/connect.c
> > +++ b/fs/cifs/connect.c
> > @@ -238,8 +238,8 @@ static const match_table_t cifs_mount_option_tokens =
> > {
> > 
> >  enum {
> >  
> >         Opt_sec_krb5, Opt_sec_krb5i, Opt_sec_krb5p,
> >         Opt_sec_ntlmsspi, Opt_sec_ntlmssp,
> > 
> > -       Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2i,
> > -       Opt_sec_nontlm, Opt_sec_lanman,
> > +       Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2,
> > +       Opt_sec_ntlmv2i, Opt_sec_lanman,
> > 
> >         Opt_sec_none,
> >         
> >         Opt_sec_err
> > 
> > @@ -253,8 +253,9 @@ static const match_table_t cifs_secflavor_tokens = {
> > 
> >         { Opt_sec_ntlmssp, "ntlmssp" },
> >         { Opt_ntlm, "ntlm" },
> >         { Opt_sec_ntlmi, "ntlmi" },
> > 
> > +       { Opt_sec_ntlmv2, "nontlm" },
> > +       { Opt_sec_ntlmv2, "ntlmv2" },
> > 
> >         { Opt_sec_ntlmv2i, "ntlmv2i" },
> > 
> > -       { Opt_sec_nontlm, "nontlm" },
> > 
> >         { Opt_sec_lanman, "lanman" },
> >         { Opt_sec_none, "none" },
> > 
> > @@ -1167,7 +1168,7 @@ static int cifs_parse_security_flavors(char *value,
> > 
> >         case Opt_sec_ntlmi:
> >                 vol->secFlg |= CIFSSEC_MAY_NTLM | CIFSSEC_MUST_SIGN;
> >                 break;
> > 
> > -       case Opt_sec_nontlm:
> > 
> > +       case Opt_sec_ntlmv2:
> >                 vol->secFlg |= CIFSSEC_MAY_NTLMV2;
> >                 break;
> >         
> >         case Opt_sec_ntlmv2i:
> > --
> > 1.7.10.4

on IRC Jeff already mentioned "sec=nontlm" as a current workaround.
The complaining user (not being able to use sec=ntlmv2) reported
success using that workaround (obviously).

So i think, mount.cifs should never ever been overloaded with
another alias.

Cheers, Günter

Btw - how is the "man" page updated at
   http://www.samba.org/samba/docs/man/manpages-3/mount.cifs.8.html
seems to be not uptodate
--
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
Sachin Prabhu July 24, 2012, 9:18 a.m. UTC | #3
On Mon, 2012-07-23 at 20:34 -0400, Jeff Layton wrote:
> sec=ntlmv2 as a mount option got dropped in the mount option overhaul.
> 
> Cc: Sachin Prabhu <sprabhu@redhat.com>
> Cc: <stable@vger.kernel.org> # 3.4+
> Reported-by: Günter Kukkukk <linux@kukkukk.com>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  fs/cifs/connect.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index e8c3e6b..a675b7f 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -238,8 +238,8 @@ static const match_table_t cifs_mount_option_tokens = {
>  enum {
>  	Opt_sec_krb5, Opt_sec_krb5i, Opt_sec_krb5p,
>  	Opt_sec_ntlmsspi, Opt_sec_ntlmssp,
> -	Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2i,
> -	Opt_sec_nontlm, Opt_sec_lanman,
> +	Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2,
> +	Opt_sec_ntlmv2i, Opt_sec_lanman,
>  	Opt_sec_none,
>  
>  	Opt_sec_err
> @@ -253,8 +253,9 @@ static const match_table_t cifs_secflavor_tokens = {
>  	{ Opt_sec_ntlmssp, "ntlmssp" },
>  	{ Opt_ntlm, "ntlm" },
>  	{ Opt_sec_ntlmi, "ntlmi" },
> +	{ Opt_sec_ntlmv2, "nontlm" },
> +	{ Opt_sec_ntlmv2, "ntlmv2" },
>  	{ Opt_sec_ntlmv2i, "ntlmv2i" },
> -	{ Opt_sec_nontlm, "nontlm" },
>  	{ Opt_sec_lanman, "lanman" },
>  	{ Opt_sec_none, "none" },
>  
> @@ -1167,7 +1168,7 @@ static int cifs_parse_security_flavors(char *value,
>  	case Opt_sec_ntlmi:
>  		vol->secFlg |= CIFSSEC_MAY_NTLM | CIFSSEC_MUST_SIGN;
>  		break;
> -	case Opt_sec_nontlm:
> +	case Opt_sec_ntlmv2:
>  		vol->secFlg |= CIFSSEC_MAY_NTLMV2;
>  		break;
>  	case Opt_sec_ntlmv2i:

ACKed-by: Sachin Prabhu <sprabhu@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/connect.c b/fs/cifs/connect.c
index e8c3e6b..a675b7f 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -238,8 +238,8 @@  static const match_table_t cifs_mount_option_tokens = {
 enum {
 	Opt_sec_krb5, Opt_sec_krb5i, Opt_sec_krb5p,
 	Opt_sec_ntlmsspi, Opt_sec_ntlmssp,
-	Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2i,
-	Opt_sec_nontlm, Opt_sec_lanman,
+	Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2,
+	Opt_sec_ntlmv2i, Opt_sec_lanman,
 	Opt_sec_none,
 
 	Opt_sec_err
@@ -253,8 +253,9 @@  static const match_table_t cifs_secflavor_tokens = {
 	{ Opt_sec_ntlmssp, "ntlmssp" },
 	{ Opt_ntlm, "ntlm" },
 	{ Opt_sec_ntlmi, "ntlmi" },
+	{ Opt_sec_ntlmv2, "nontlm" },
+	{ Opt_sec_ntlmv2, "ntlmv2" },
 	{ Opt_sec_ntlmv2i, "ntlmv2i" },
-	{ Opt_sec_nontlm, "nontlm" },
 	{ Opt_sec_lanman, "lanman" },
 	{ Opt_sec_none, "none" },
 
@@ -1167,7 +1168,7 @@  static int cifs_parse_security_flavors(char *value,
 	case Opt_sec_ntlmi:
 		vol->secFlg |= CIFSSEC_MAY_NTLM | CIFSSEC_MUST_SIGN;
 		break;
-	case Opt_sec_nontlm:
+	case Opt_sec_ntlmv2:
 		vol->secFlg |= CIFSSEC_MAY_NTLMV2;
 		break;
 	case Opt_sec_ntlmv2i: