Re: 3.4.0-rc2+ - CIFS mount failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Signed-off-by: Chris Clayton <chris2553@xxxxxxxxxxxxxx>
> 
> --- linux/fs/cifs/connect.c~    2012-04-10 11:38:23.000000000 +0100
> +++ linux/fs/cifs/connect.c     2012-04-10 12:16:02.000000000 +0100
> @@ -110,6 +110,9 @@ enum {
>         /* Options which could be blank */
>         Opt_blank_pass,
> 
> +       /* Usernames which could be blank */
> +       Opt_blank_user,
> +
>         Opt_err
>  };
> 
> @@ -183,6 +186,7 @@ static const match_table_t cifs_mount_op
>         { Opt_wsize, "wsize=%s" },
>         { Opt_actimeo, "actimeo=%s" },
> 
> +       { Opt_blank_user, "user=" },
>         { Opt_user, "user=%s" },
>         { Opt_user, "username=%s" },
>         { Opt_blank_pass, "pass=" },
> @@ -1534,6 +1538,10 @@ cifs_parse_mount_options(const char *mou
> 
>                 /* String Arguments */
> 
> +               case Opt_blank_user:
> +                       vol->username = NULL;
> +                       vol->nullauth = 1;
> +                       break;
>                 case Opt_user:
>                         string = match_strdup(args);
>                         if (string == NULL)
> 

Hello Chris,

The approach is correct. However I was looking to fix up all such
instances where a NULL mount option could be passed.  

There are a number of cases where a check for a NULL string is made. The
token parser however will never match mount options where a NULL is
passed so these checks for NULL strings are redundant. I plan on
cleaning these up too with the new patch.

Sachin Prabhu

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux