diff options
author | Jeff Layton <jlayton@redhat.com> | 2007-05-05 03:27:49 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-05-05 03:27:49 +0000 |
commit | 8426c39c1289765a11fc9b9523212ed368ceebd8 (patch) | |
tree | fc7cab82fafe76d11c77549ff16759ab86c88682 /fs/cifs/connect.c | |
parent | 796e5661f6b6be1600b3ab47c61ce61cf3e7a353 (diff) | |
download | op-kernel-dev-8426c39c1289765a11fc9b9523212ed368ceebd8.zip op-kernel-dev-8426c39c1289765a11fc9b9523212ed368ceebd8.tar.gz |
[CIFS] Make sec=none force an anonymous mount
We had a customer report that attempting to make CIFS mount with a null
username (i.e. doing an anonymous mount) doesn't work. Looking through the
code, it looks like CIFS expects a NULL username from userspace in order
to trigger an anonymous mount. The mount.cifs code doesn't seem to ever
pass a null username to the kernel, however.
It looks also like the kernel can take a sec=none option, but it only seems
to look at it if the username is already NULL. This seems redundant and
effectively makes sec=none useless.
The following patch makes sec=none force an anonymous mount.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index cf40e24..216fb62 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1721,12 +1721,12 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, return -EINVAL; } - if (volume_info.username) { + if (volume_info.nullauth) { + cFYI(1,("null user")); + volume_info.username = NULL; + } else if (volume_info.username) { /* BB fixme parse for domain name here */ cFYI(1, ("Username: %s ", volume_info.username)); - - } else if (volume_info.nullauth) { - cFYI(1,("null user")); } else { cifserror("No username specified"); /* In userspace mount helper we can get user name from alternate |