Created attachment 499315 [details] cifs -- fix cifsConvertToUCS for the mapchars case The patches for bug 659715 introduced a regression when mounting with -o mapchars. In the switch statement in cifsConvertToUCS, the default case does a "continue" without ever placing the character in the string. The attached patch fixes it.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
To test this, mount any share with -o mapchars and then try to access files on it. For instance, assuming you have such a share mounted on /mnt/cifs: # stat /mnt/cifs/foobar ...you'll get the inode info for the root of the share. This is because the unicode conversion of filenames is broken here. With the patch, everything should work as expected.
Patch(es) available in kernel-2.6.18-264.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed.
This bug is reproduced on 2.6.18-261.el5, and verified on 2.6.18-264.el5, test result is as follow: [root@intel-s3e36-01 ~]# uname -a Linux intel-s3e36-01.rhts.eng.nay.redhat.com 2.6.18-261.el5 #1 SMP Thu May 12 16:47:18 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [root@intel-s3e36-01 ~]# mount | grep cifs //localhost/test on /mnt/test type cifs (rw,mand) [root@intel-s3e36-01 ~]# ll /test total 8 -rw-r--r-- 1 root root 5 Jun 2 22:49 test [root@intel-s3e36-01 ~]# ll /test/test -rw-r--r-- 1 root root 5 Jun 2 22:49 /test/test [root@intel-s3e36-01 ~]# ll /mnt/test/test total 8 -rw-r--r-- 1 root root 5 Jun 2 22:49 test [root@intel-s3e36-01 ~]# uname -a Linux intel-s3e36-01.rhts.eng.nay.redhat.com 2.6.18-264.el5 #1 SMP Tue May 24 15:18:55 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [root@intel-s3e36-01 ~]# mount | grep cifs //localhost/test on /mnt/test type cifs (rw,mand) [root@intel-s3e36-01 ~]# ll /test total 8 -rw-r--r-- 1 root root 5 Jun 2 22:49 test [root@intel-s3e36-01 ~]# ll /mnt/test/test -rw-r--r-- 1 root root 5 Jun 2 22:49 /mnt/test/test
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1065.html