All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: ignore the noauto option if it is provided
@ 2021-01-27  7:10 Adam Harvey
  2021-01-27 10:56 ` Aurélien Aptel
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Harvey @ 2021-01-27  7:10 UTC (permalink / raw)
  To: sfrench, linux-cifs; +Cc: samba-technical, Adam Harvey

In 24e0a1eff9e2, the noauto option was missed when migrating to the new
mount API. As a result, users with noauto in their fstab mount options
are now unable to mount cifs filesystems, as they'll receive an "Unknown
parameter" error.

This restores the old behaviour of ignoring noauto if it's given.

Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
Signed-off-by: Adam Harvey <adam@adamharvey.name>
---
 fs/cifs/fs_context.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 076bcadc756a..0edde5c66985 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -171,6 +171,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_flag("noatime", Opt_ignore),
 	fsparam_flag("relatime", Opt_ignore),
 	fsparam_flag("_netdev", Opt_ignore),
+	fsparam_flag("noauto", Opt_ignore),
 	fsparam_flag_no("suid", Opt_ignore),
 	fsparam_flag_no("exec", Opt_ignore),
 	fsparam_flag_no("dev", Opt_ignore),
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: ignore the noauto option if it is provided
  2021-01-27  7:10 [PATCH] cifs: ignore the noauto option if it is provided Adam Harvey
@ 2021-01-27 10:56 ` Aurélien Aptel
  2021-01-27 20:39   ` Adam Harvey
       [not found]   ` <CAH2r5mtWa8JyWXHvnWKB5N-8qfGO+G_mmu5m3+QfuhxgWX14sg@mail.gmail.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Aurélien Aptel @ 2021-01-27 10:56 UTC (permalink / raw)
  To: Adam Harvey, sfrench, linux-cifs; +Cc: samba-technical, Adam Harvey

Hi Adam,

Adam Harvey <adam@adamharvey.name> writes:
> In 24e0a1eff9e2, the noauto option was missed when migrating to the new
> mount API. As a result, users with noauto in their fstab mount options
> are now unable to mount cifs filesystems, as they'll receive an "Unknown
> parameter" error.
>
> This restores the old behaviour of ignoring noauto if it's given.

I was looking at other fs code and it seems no one explicitely parses
auto/noauto. Any idea why? This looks like it could be handled somewhere
else.

Also I would have expected fsparam_flag_no("auto", Opt_ignore) to allow
for both auto and noauto.

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: ignore the noauto option if it is provided
  2021-01-27 10:56 ` Aurélien Aptel
@ 2021-01-27 20:39   ` Adam Harvey
  2021-01-27 21:44     ` [PATCH] cifs: ignore auto and noauto options if given Adam Harvey
       [not found]   ` <CAH2r5mtWa8JyWXHvnWKB5N-8qfGO+G_mmu5m3+QfuhxgWX14sg@mail.gmail.com>
  1 sibling, 1 reply; 8+ messages in thread
From: Adam Harvey @ 2021-01-27 20:39 UTC (permalink / raw)
  To: Aurélien Aptel; +Cc: sfrench, linux-cifs, samba-technical

On Wed, 27 Jan 2021 at 02:56, Aurélien Aptel <aaptel@suse.com> wrote:
>
> Hi Adam,
>
> Adam Harvey <adam@adamharvey.name> writes:
> > In 24e0a1eff9e2, the noauto option was missed when migrating to the new
> > mount API. As a result, users with noauto in their fstab mount options
> > are now unable to mount cifs filesystems, as they'll receive an "Unknown
> > parameter" error.
> >
> > This restores the old behaviour of ignoring noauto if it's given.
>
> I was looking at other fs code and it seems no one explicitely parses
> auto/noauto. Any idea why? This looks like it could be handled somewhere
> else.

Honestly, I have no idea. I'm just a regular user trying to get his
music share to mount on 5.11-rc5. :)

> Also I would have expected fsparam_flag_no("auto", Opt_ignore) to allow
> for both auto and noauto.

Good catch! I misread the fstab manpage last night and thought there
wasn't a matching "auto". I'll send an updated patch that supports
both.

Thanks,

Adam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: ignore the noauto option if it is provided
       [not found]   ` <CAH2r5mtWa8JyWXHvnWKB5N-8qfGO+G_mmu5m3+QfuhxgWX14sg@mail.gmail.com>
@ 2021-01-27 20:43     ` Adam Harvey
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Harvey @ 2021-01-27 20:43 UTC (permalink / raw)
  To: Steve French
  Cc: Aurélien Aptel, Steve French, linux-cifs, samba-technical

On Wed, 27 Jan 2021 at 12:06, Steve French <smfrench@gmail.com> wrote:
> I didn't see anything logged in dmesg (when I tried it on 5.11-rc today) indicating it was a problem (it still tried the mount).Maybe it is stripped out by user space?

I did get a dmesg message when I tried it on 5.11.0-rc5. Here's my setup:

In /etc/fstab:

//10.42.84.1/shared /external cifs
noauto,user,rw,guest,uid=1000,gid=1000,vers=1.0 0 0

When I /mount external (with cifs-utils 6.11 installed, should that
matter), I get this in dmesg:

Jan 26 21:11:17 nosecam kernel: cifs: Unknown parameter 'noauto'

And the mount fails.

Adam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] cifs: ignore auto and noauto options if given
  2021-01-27 20:39   ` Adam Harvey
@ 2021-01-27 21:44     ` Adam Harvey
  2021-01-27 23:18       ` Steve French
  2021-01-28  1:25       ` Steve French
  0 siblings, 2 replies; 8+ messages in thread
From: Adam Harvey @ 2021-01-27 21:44 UTC (permalink / raw)
  To: linux-cifs, sfrench; +Cc: smfrench, aaptel, samba-technical, Adam Harvey

In 24e0a1eff9e2, the noauto and auto options were missed when migrating
to the new mount API. As a result, users with noauto in their fstab
mount options are now unable to mount cifs filesystems, as they'll
receive an "Unknown parameter" error.

This restores the old behaviour of ignoring noauto and auto if they're
given.

Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
Signed-off-by: Adam Harvey <adam@adamharvey.name>
---
 fs/cifs/fs_context.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 076bcadc756a..62818b142e2e 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
 	fsparam_flag_no("exec", Opt_ignore),
 	fsparam_flag_no("dev", Opt_ignore),
 	fsparam_flag_no("mand", Opt_ignore),
+	fsparam_flag_no("auto", Opt_ignore),
 	fsparam_string("cred", Opt_ignore),
 	fsparam_string("credentials", Opt_ignore),
 	{}
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: ignore auto and noauto options if given
  2021-01-27 21:44     ` [PATCH] cifs: ignore auto and noauto options if given Adam Harvey
@ 2021-01-27 23:18       ` Steve French
  2021-01-27 23:25         ` ronnie sahlberg
  2021-01-28  1:25       ` Steve French
  1 sibling, 1 reply; 8+ messages in thread
From: Steve French @ 2021-01-27 23:18 UTC (permalink / raw)
  To: Adam Harvey; +Cc: CIFS, Steve French, Aurélien Aptel, samba-technical

The patch looks harmless, but am curious if other people can repro
this.  I tried it on 5.11-rc4 (cifs-utils version 6.11).  I tried it
with and without the mount helper (mount.cifs).  I couldn't get it to
fail with 'noauto'

Anyone else able to repro the problem?

On Wed, Jan 27, 2021 at 3:44 PM Adam Harvey <adam@adamharvey.name> wrote:
>
> In 24e0a1eff9e2, the noauto and auto options were missed when migrating
> to the new mount API. As a result, users with noauto in their fstab
> mount options are now unable to mount cifs filesystems, as they'll
> receive an "Unknown parameter" error.
>
> This restores the old behaviour of ignoring noauto and auto if they're
> given.
>
> Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> Signed-off-by: Adam Harvey <adam@adamharvey.name>
> ---
>  fs/cifs/fs_context.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> index 076bcadc756a..62818b142e2e 100644
> --- a/fs/cifs/fs_context.c
> +++ b/fs/cifs/fs_context.c
> @@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
>         fsparam_flag_no("exec", Opt_ignore),
>         fsparam_flag_no("dev", Opt_ignore),
>         fsparam_flag_no("mand", Opt_ignore),
> +       fsparam_flag_no("auto", Opt_ignore),
>         fsparam_string("cred", Opt_ignore),
>         fsparam_string("credentials", Opt_ignore),
>         {}
> --
> 2.30.0
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: ignore auto and noauto options if given
  2021-01-27 23:18       ` Steve French
@ 2021-01-27 23:25         ` ronnie sahlberg
  0 siblings, 0 replies; 8+ messages in thread
From: ronnie sahlberg @ 2021-01-27 23:25 UTC (permalink / raw)
  To: Steve French
  Cc: Adam Harvey, Steve French, CIFS, samba-technical, Aurélien Aptel

On Thu, Jan 28, 2021 at 9:19 AM Steve French via samba-technical
<samba-technical@lists.samba.org> wrote:
>
> The patch looks harmless, but am curious if other people can repro
> this.  I tried it on 5.11-rc4 (cifs-utils version 6.11).  I tried it
> with and without the mount helper (mount.cifs).  I couldn't get it to
> fail with 'noauto'
>
> Anyone else able to repro the problem?
>
> On Wed, Jan 27, 2021 at 3:44 PM Adam Harvey <adam@adamharvey.name> wrote:
> >
> > In 24e0a1eff9e2, the noauto and auto options were missed when migrating
> > to the new mount API. As a result, users with noauto in their fstab
> > mount options are now unable to mount cifs filesystems, as they'll
> > receive an "Unknown parameter" error.
> >
> > This restores the old behaviour of ignoring noauto and auto if they're
> > given.
> >
> > Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> > Signed-off-by: Adam Harvey <adam@adamharvey.name>
> > ---
> >  fs/cifs/fs_context.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> > index 076bcadc756a..62818b142e2e 100644
> > --- a/fs/cifs/fs_context.c
> > +++ b/fs/cifs/fs_context.c
> > @@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
> >         fsparam_flag_no("exec", Opt_ignore),
> >         fsparam_flag_no("dev", Opt_ignore),
> >         fsparam_flag_no("mand", Opt_ignore),
> > +       fsparam_flag_no("auto", Opt_ignore),
> >         fsparam_string("cred", Opt_ignore),
> >         fsparam_string("credentials", Opt_ignore),
> >         {}

We probably also want to add
fsparam_string("prefixpath", Opt_ignore),

> > --
> > 2.30.0
> >
>
>
> --
> Thanks,
>
> Steve
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: ignore auto and noauto options if given
  2021-01-27 21:44     ` [PATCH] cifs: ignore auto and noauto options if given Adam Harvey
  2021-01-27 23:18       ` Steve French
@ 2021-01-28  1:25       ` Steve French
  1 sibling, 0 replies; 8+ messages in thread
From: Steve French @ 2021-01-28  1:25 UTC (permalink / raw)
  To: Adam Harvey; +Cc: CIFS, Steve French, Aurélien Aptel, samba-technical

Merged into cifs-2.6.git (seems harmless, and probably slightly safer
to include this - even though currently I can't reproduce the reported
problem).

Let me know if anyone else has been able to reproduce it - even with
Adam's suggested /etc/fstab line, I wasn't able to repro it.

On Wed, Jan 27, 2021 at 3:44 PM Adam Harvey <adam@adamharvey.name> wrote:
>
> In 24e0a1eff9e2, the noauto and auto options were missed when migrating
> to the new mount API. As a result, users with noauto in their fstab
> mount options are now unable to mount cifs filesystems, as they'll
> receive an "Unknown parameter" error.
>
> This restores the old behaviour of ignoring noauto and auto if they're
> given.
>
> Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> Signed-off-by: Adam Harvey <adam@adamharvey.name>
> ---
>  fs/cifs/fs_context.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> index 076bcadc756a..62818b142e2e 100644
> --- a/fs/cifs/fs_context.c
> +++ b/fs/cifs/fs_context.c
> @@ -175,6 +175,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
>         fsparam_flag_no("exec", Opt_ignore),
>         fsparam_flag_no("dev", Opt_ignore),
>         fsparam_flag_no("mand", Opt_ignore),
> +       fsparam_flag_no("auto", Opt_ignore),
>         fsparam_string("cred", Opt_ignore),
>         fsparam_string("credentials", Opt_ignore),
>         {}
> --
> 2.30.0
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-28  1:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  7:10 [PATCH] cifs: ignore the noauto option if it is provided Adam Harvey
2021-01-27 10:56 ` Aurélien Aptel
2021-01-27 20:39   ` Adam Harvey
2021-01-27 21:44     ` [PATCH] cifs: ignore auto and noauto options if given Adam Harvey
2021-01-27 23:18       ` Steve French
2021-01-27 23:25         ` ronnie sahlberg
2021-01-28  1:25       ` Steve French
     [not found]   ` <CAH2r5mtWa8JyWXHvnWKB5N-8qfGO+G_mmu5m3+QfuhxgWX14sg@mail.gmail.com>
2021-01-27 20:43     ` [PATCH] cifs: ignore the noauto option if it is provided Adam Harvey

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.