All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ronald645-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH] cifs: make sure we ignore the credentials= and cred= options
Date: Thu, 03 May 2012 12:18:48 +0100	[thread overview]
Message-ID: <1336043928.2948.13.camel@localhost> (raw)
In-Reply-To: <1335981808-3885-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Reported-by: Ronald <ronald645-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  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

  parent reply	other threads:[~2012-05-03 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 18:03 [PATCH] cifs: make sure we ignore the credentials= and cred= options Jeff Layton
     [not found] ` <1335981808-3885-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-05-03 11:18   ` Sachin Prabhu [this message]
2012-05-03 11:30     ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336043928.2948.13.camel@localhost \
    --to=sprabhu-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ronald645-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.