Bug 211939 - Comma in credential files is parse as a seperator
Summary: Comma in credential files is parse as a seperator
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_cifs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-26 08:08 UTC by olivier.lischer
Modified: 2021-02-26 15:43 UTC (History)
0 users

See Also:
Kernel Version: Linux 5.11.1-arch1-1 x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg log (933 bytes, text/plain)
2021-02-26 08:08 UTC, olivier.lischer
Details

Description olivier.lischer 2021-02-26 08:08:08 UTC
Created attachment 295451 [details]
dmesg log

Problem Description:
If the password has a comma (,), this is parsed as a seperator, even if the password is written in a credential file. The man-page sais, it should be possible.

Steps to Reproduce:

#cat << EOF > .test_credentials
username=test_user
password=test,test
EOF

#mount -t cifs //server/folder /mnt/ -o vers=2.0,uid=1000,gid=1000,iocharset=utf8,credentials=/home/user/.test_credentials

Mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Comment 1 Steve French 2021-02-26 15:41:17 UTC
Created attachment 295485 [details]
attachment-14639-0.html

Fixed by commit:
https://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;h=d08395a3f2f473c6ceeb316a1aeb7fad5b43014f

Should be in 5.12-rc1 and backported to 5.11 for stable

On Fri, Feb 26, 2021, 02:08 <bugzilla-daemon@bugzilla.kernel.org> wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=211939
>
>             Bug ID: 211939
>            Summary: Comma in credential files is parse as a seperator
>            Product: File System
>            Version: 2.5
>     Kernel Version: Linux 5.11.1-arch1-1 x86_64
>           Hardware: All
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: CIFS
>           Assignee: fs_cifs@kernel-bugs.osdl.org
>           Reporter: olivier.lischer@liolin.ch
>         Regression: No
>
> Created attachment 295451 [details]
>   --> https://bugzilla.kernel.org/attachment.cgi?id=295451&action=edit
> dmesg log
>
> Problem Description:
> If the password has a comma (,), this is parsed as a seperator, even if the
> password is written in a credential file. The man-page sais, it should be
> possible.
>
> Steps to Reproduce:
>
> #cat << EOF > .test_credentials
> username=test_user
> password=test,test
> EOF
>
> #mount -t cifs //server/folder /mnt/ -o
>
>
> vers=2.0,uid=1000,gid=1000,iocharset=utf8,credentials=/home/user/.test_credentials
>
> Mount error(22): Invalid argument
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log
> messages (dmesg)
>
> --
> You may reply to this email to add a comment.
>
> You are receiving this mail because:
> You are watching the assignee of the bug.

Note You need to log in before you can comment on or make changes to this bug.