All of lore.kernel.org
 help / color / mirror / Atom feed
* Using a password containing a comma fails with 5.11.1 kernel
@ 2021-02-25  0:43 Simon Taylor
  2021-02-25  7:37 ` ronnie sahlberg
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Taylor @ 2021-02-25  0:43 UTC (permalink / raw)
  To: Steve French; +Cc: linux-cifs, samba-technical

There seems to be a bug mounting a share when the password contains a comma with the 5.11.1 kernel.

I used a credential file named commapw

user=CommaTest
pass=beforecomma,aftercomma

and the mount command

mount.cifs //workstation/arch /mnt/arch -o vers=3.1.1,cred=/root/commapw

This successfully mounts the share when using the 5.10.16 kernel but fails when using 5.11.1.

The debug log was:

[ 3835.380355] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'source'
[ 3835.380360] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'ip'
[ 3835.380362] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'unc'
[ 3835.380364] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'vers'
[ 3835.380365] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'user'
[ 3835.380366] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'pass'
[ 3835.380367] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'aftercomma'
[ 3835.380368] cifs: Unknown parameter 'aftercomma'

The kernels are from Arch Linux packages:

Linux 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux
Linux 5.11.1-arch1-1 #1 SMP PREEMPT Tue, 23 Feb 2021 14:05:30 +0000 x86_64 GNU/Linux

-- 
Regards,
Simon

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

* Re: Using a password containing a comma fails with 5.11.1 kernel
  2021-02-25  0:43 Using a password containing a comma fails with 5.11.1 kernel Simon Taylor
@ 2021-02-25  7:37 ` ronnie sahlberg
  2021-02-25  9:15   ` Simon Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: ronnie sahlberg @ 2021-02-25  7:37 UTC (permalink / raw)
  To: simon; +Cc: Steve French, linux-cifs, samba-technical

Hi Simon,

Looks like the special handling of escaped ',' characters in the
password mount argument was lost when we
switched to the new mount api.

I just sent a patch for this to the list,  can you try that patch?

Thanks for the report.


regards
ronnie sahlberg

On Thu, Feb 25, 2021 at 2:56 PM Simon Taylor <simon@simon-taylor.me.uk> wrote:
>
> There seems to be a bug mounting a share when the password contains a comma with the 5.11.1 kernel.
>
> I used a credential file named commapw
>
> user=CommaTest
> pass=beforecomma,aftercomma
>
> and the mount command
>
> mount.cifs //workstation/arch /mnt/arch -o vers=3.1.1,cred=/root/commapw
>
> This successfully mounts the share when using the 5.10.16 kernel but fails when using 5.11.1.
>
> The debug log was:
>
> [ 3835.380355] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'source'
> [ 3835.380360] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'ip'
> [ 3835.380362] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'unc'
> [ 3835.380364] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'vers'
> [ 3835.380365] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'user'
> [ 3835.380366] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'pass'
> [ 3835.380367] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'aftercomma'
> [ 3835.380368] cifs: Unknown parameter 'aftercomma'
>
> The kernels are from Arch Linux packages:
>
> Linux 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux
> Linux 5.11.1-arch1-1 #1 SMP PREEMPT Tue, 23 Feb 2021 14:05:30 +0000 x86_64 GNU/Linux
>
> --
> Regards,
> Simon

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

* Re: Using a password containing a comma fails with 5.11.1 kernel
  2021-02-25  7:37 ` ronnie sahlberg
@ 2021-02-25  9:15   ` Simon Taylor
  2021-02-25  9:33     ` ronnie sahlberg
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Taylor @ 2021-02-25  9:15 UTC (permalink / raw)
  To: ronnie sahlberg; +Cc: Steve French, linux-cifs, samba-technical

On Thu, 25 Feb 2021, at 7:37 AM, ronnie sahlberg wrote:
> Hi Simon,
> 
> Looks like the special handling of escaped ',' characters in the
> password mount argument was lost when we
> switched to the new mount api.
> 
> I just sent a patch for this to the list,  can you try that patch?
> 
> Thanks for the report.
 
Hi Ronnie,

Thanks. Your patch resolved the issue.

Regards,
Simon

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

* Re: Using a password containing a comma fails with 5.11.1 kernel
  2021-02-25  9:15   ` Simon Taylor
@ 2021-02-25  9:33     ` ronnie sahlberg
  2021-02-25 17:24       ` Steve French
  0 siblings, 1 reply; 5+ messages in thread
From: ronnie sahlberg @ 2021-02-25  9:33 UTC (permalink / raw)
  To: Simon Taylor; +Cc: Steve French, linux-cifs, samba-technical

On Thu, Feb 25, 2021 at 7:18 PM Simon Taylor <simon@simon-taylor.me.uk> wrote:
>
> On Thu, 25 Feb 2021, at 7:37 AM, ronnie sahlberg wrote:
> > Hi Simon,
> >
> > Looks like the special handling of escaped ',' characters in the
> > password mount argument was lost when we
> > switched to the new mount api.
> >
> > I just sent a patch for this to the list,  can you try that patch?
> >
> > Thanks for the report.
>
> Hi Ronnie,
>
> Thanks. Your patch resolved the issue.
>

That is good to hear.

Steve,  can you add a Tested-by for Simon and maybe we should have cc
stable so it gets into 5.11 ?


> Regards,
> Simon

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

* Re: Using a password containing a comma fails with 5.11.1 kernel
  2021-02-25  9:33     ` ronnie sahlberg
@ 2021-02-25 17:24       ` Steve French
  0 siblings, 0 replies; 5+ messages in thread
From: Steve French @ 2021-02-25 17:24 UTC (permalink / raw)
  To: ronnie sahlberg; +Cc: Simon Taylor, Steve French, linux-cifs, samba-technical

On Thu, Feb 25, 2021 at 3:34 AM ronnie sahlberg via samba-technical
<samba-technical@lists.samba.org> wrote:
>
> On Thu, Feb 25, 2021 at 7:18 PM Simon Taylor <simon@simon-taylor.me.uk> wrote:
> >
> > On Thu, 25 Feb 2021, at 7:37 AM, ronnie sahlberg wrote:
> > > Hi Simon,
> > >
> > > Looks like the special handling of escaped ',' characters in the
> > > password mount argument was lost when we
> > > switched to the new mount api.
> > >
> > > I just sent a patch for this to the list,  can you try that patch?
> > >
> > > Thanks for the report.
> >
> > Hi Ronnie,
> >
> > Thanks. Your patch resolved the issue.
> >
>
> That is good to hear.
>
> Steve,  can you add a Tested-by for Simon and maybe we should have cc
> stable so it gets into 5.11 ?

Yes - agreed


-- 
Thanks,

Steve

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

end of thread, other threads:[~2021-02-25 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25  0:43 Using a password containing a comma fails with 5.11.1 kernel Simon Taylor
2021-02-25  7:37 ` ronnie sahlberg
2021-02-25  9:15   ` Simon Taylor
2021-02-25  9:33     ` ronnie sahlberg
2021-02-25 17:24       ` Steve French

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.