Bug 43195 - [Regression] 'Credentials' mount option not recognized
Summary: [Regression] 'Credentials' mount option not recognized
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jeff Layton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-02 17:37 UTC by Ronald
Modified: 2012-05-07 19:05 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.4.0-rc4-wl+
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Ronald 2012-05-02 17:37:34 UTC
CIFS maintainers,

During your development, a regression sneaked into the cifs module. This tree is exactly like the vanilla kernel, version 3.4-rc4, except for an additional:

git pull git://anongit.freedesktop.org/nouveau/linux-2.6
git pull git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git (hence the -wl suffix)

The testcase:

Kernel version v3.3.2:
Charlie ~ # rm /tmp/test
Charlie ~ # touch /tmp/test
Charlie ~ # mount //10.1.9.251/gedeeld /media -o credentials=/tmp/test
Password: 
Charlie ~ #

Success

Kernel version v3.4-rc4-wl+:
Charlie ~ # rm /tmp/test
Charlie ~ # touch /tmp/test
Charlie ~ # mount //10.1.9.251/gedeeld /media -o credentials=/tmp/test
Password: 
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Charlie ~ # dmesg | tail -n1
[  440.046450] CIFS: Unknown mount option "credentials=/tmp/test"

Fail

Even if I insert data into the credentials file, I get the same error.

Git log fs/cifs shows a substantial amount of rework for handling mount options. If a bisect is appreciated, please let me know.

                           Ronald
Comment 1 Jeff Layton 2012-05-02 18:06:01 UTC
Thanks for the bug report. I've just sent a patch that fixes this in my testing
so I've gone ahead and mailed it to the maintainer. Please reopen this bug if
you find anything amiss with it:

    http://article.gmane.org/gmane.linux.kernel.cifs/6060

I'll also plan to patch mount.cifs so that it doesn't pass the credentials=
option to the kernel, but we'll still need to deal with older mount.cifs
programs so we'll need a kernel patch for this regardless.
Comment 2 Florian Mickler 2012-05-07 19:05:15 UTC
A patch referencing this bug report has been merged in Linux v3.4-rc6:

commit a557b97616c49d81e09c8439831d4c4f13ef4050
Author: Jeff Layton <jlayton@redhat.com>
Date:   Wed May 2 14:02:40 2012 -0400

    cifs: make sure we ignore the credentials= and cred= options

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