Most recent kernel where this bug did not occur: 2.6.22.5 Distribution: LFS Hardware Environment: VMWare on x86 Software Environment: LFS Problem Description: When I try to mount windows share with this command: mount -t cifs -o username=xx,password=xx //10.1.9.55/c$ /mnt/d it doesn't work. If i use: mount -t cifs -o username=xx,password=xx //10.1.9.55\\c$ /mnt/d it works. Comment from cifs\netmisc.c int cifs_inet_pton(int address_family, char *cp, void *dst) { int ret = 0; /* calculate length by finding first slash or NULL */ /* BB Should we convert '/' slash to '\' here since it seems already * done before this */ So before it was converted, but now not. Steps to reproduce:
umm, yeah, Steve, we shouldn't have done that?
This should only happen if you are missing the CIFS mount helper. Are you using mount.cifs (ie mount.cifs should typically be in /sbin and thus automatically invoked by mount command)? The only thing I see that changed was to add the IPv6 address parsing in April - perhaps due to that the parsing changed for / (since IPv6 addresses allow more characters). I will take a look
cifstest4:~ # uname -r 2.6.23-g44093ca2-dirty cifstest4:~ # mount -t cifs //cifstest1/public /mnt1 -o cifsacl,sfu,user=Administrator Password: cifstest4:~ # mount /dev/sda1 on / type ext3 (rw,acl,user_xattr) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) udev on /dev type tmpfs (rw) devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/sda2 on /boot type ext2 (rw,acl,user_xattr) //cifstest1/public on /mnt1 type cifs (rw,mand) I could mount. What am I missing, something obvious?
mv /sbin/mount.cifs /sbin/mount.cifs.save then try the mount and you should see the failure) (then remember to move /sbin/mount.cifs back) Although the cifs mount helper is not absolutely required - I would expect it to be installed on general purpose workstations although there is sometimes packaging confusion with it being packaged with samba client rather than kernel on some distributions.
cifs_parse_mount_options in netmisc.c problem. Looking at it.
Created attachment 13336 [details] patch to parse UNC string with forward slashes Code from the most current git tree linux/kernel/git/sfrench/cifs-2.6.git
Fix: http://git.kernel.org/?p=linux/kernel/git/sfrench/cifs-2.6.git;a=commitdiff;h=1fb64bfc45b9ee5092b72474a5df216b8a0c7ff9 If this checks out ok, will request a merge with mainline.