Re: [PATCH] cifs: make sure we ignore the credentials= and cred= options

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

 



On Thu, 03 May 2012 12:18:48 +0100
Sachin Prabhu <sprabhu@xxxxxxxxxx> wrote:

> On Wed, 2012-05-02 at 14:03 -0400, Jeff Layton wrote:
> > Older mount.cifs programs passed this on to the kernel after parsing
> > the file. Make sure the kernel ignores that option.
> > 
> > Should fix:
> > 
> >     https://bugzilla.kernel.org/show_bug.cgi?id=43195
> > 
> > Cc: Sachin Prabhu <sprabhu@xxxxxxxxxx>
> > Reported-by: Ronald <ronald645@xxxxxxxxx>
> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> > ---
> >  fs/cifs/connect.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> > index a75902b..5dcc551 100644
> > --- a/fs/cifs/connect.c
> > +++ b/fs/cifs/connect.c
> > @@ -215,6 +215,8 @@ static const match_table_t cifs_mount_option_tokens = {
> >  
> >  	{ Opt_ignore, "cred" },
> >  	{ Opt_ignore, "credentials" },
> > +	{ Opt_ignore, "cred=%s" },
> > +	{ Opt_ignore, "credentials=%s" },
> 
> We don't expect cred/credentials by themselves in the mount options
> list. Instead of adding the new checks, we can instead simply replace
> the original lines with ones containing the string.
> 
> -       { Opt_ignore, "cred" },
> -       { Opt_ignore, "credentials" },
> +       { Opt_ignore, "cred=%s" },
> +       { Opt_ignore, "credentials=%s" },
> 
> Sachin Prabhu
> 

I considered that, but figured we might want to keep ignoring the
"bare" options. OTOH, nothing should be sending those to the kernel, so
might as well remove them.

Steve has already merged my patch though, so you'd need to do a new one
on top of that...

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
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