diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4093d5332930..71f77914ce93 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -822,10 +822,13 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol) | |||
822 | } else if (strnicmp(data, "nouser_xattr",12) == 0) { | 822 | } else if (strnicmp(data, "nouser_xattr",12) == 0) { |
823 | vol->no_xattr = 1; | 823 | vol->no_xattr = 1; |
824 | } else if (strnicmp(data, "user", 4) == 0) { | 824 | } else if (strnicmp(data, "user", 4) == 0) { |
825 | if (!value || !*value) { | 825 | if (!value) { |
826 | printk(KERN_WARNING | 826 | printk(KERN_WARNING |
827 | "CIFS: invalid or missing username\n"); | 827 | "CIFS: invalid or missing username\n"); |
828 | return 1; /* needs_arg; */ | 828 | return 1; /* needs_arg; */ |
829 | } else if(!*value) { | ||
830 | /* null user, ie anonymous, authentication */ | ||
831 | vol->nullauth = 1; | ||
829 | } | 832 | } |
830 | if (strnlen(value, 200) < 200) { | 833 | if (strnlen(value, 200) < 200) { |
831 | vol->username = value; | 834 | vol->username = value; |
@@ -1642,6 +1645,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1642 | /* BB fixme parse for domain name here */ | 1645 | /* BB fixme parse for domain name here */ |
1643 | cFYI(1, ("Username: %s ", volume_info.username)); | 1646 | cFYI(1, ("Username: %s ", volume_info.username)); |
1644 | 1647 | ||
1648 | } else if (volume_info.nullauth) { | ||
1649 | cFYI(1,("null user")); | ||
1645 | } else { | 1650 | } else { |
1646 | cifserror("No username specified"); | 1651 | cifserror("No username specified"); |
1647 | /* In userspace mount helper we can get user name from alternate | 1652 | /* In userspace mount helper we can get user name from alternate |