* [PATCH] cifs: make sure we ignore the credentials= and cred= options
@ 2012-05-02 18:03 Jeff Layton
[not found] ` <1335981808-3885-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2012-05-02 18:03 UTC (permalink / raw)
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, sprabhu-H+wXaHxf7aLQT0dZR+AlfA,
ronald645-Re5JQEeQqe8AvxtiuMwx3w
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" },
{ Opt_ignore, "guest" },
{ Opt_ignore, "rw" },
{ Opt_ignore, "ro" },
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1335981808-3885-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] cifs: make sure we ignore the credentials= and cred= options [not found] ` <1335981808-3885-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-05-03 11:18 ` Sachin Prabhu 2012-05-03 11:30 ` Jeff Layton 0 siblings, 1 reply; 3+ messages in thread From: Sachin Prabhu @ 2012-05-03 11:18 UTC (permalink / raw) To: Jeff Layton Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w, linux-cifs-u79uwXL29TY76Z2rM5mHXA, ronald645-Re5JQEeQqe8AvxtiuMwx3w 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: make sure we ignore the credentials= and cred= options 2012-05-03 11:18 ` Sachin Prabhu @ 2012-05-03 11:30 ` Jeff Layton 0 siblings, 0 replies; 3+ messages in thread From: Jeff Layton @ 2012-05-03 11:30 UTC (permalink / raw) To: Sachin Prabhu Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w, linux-cifs-u79uwXL29TY76Z2rM5mHXA, ronald645-Re5JQEeQqe8AvxtiuMwx3w On Thu, 03 May 2012 12:18:48 +0100 Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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-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 > 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-03 11:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-05-03 11:30 ` Jeff Layton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox