Bug 12830 - smbmount cannot fetch filenames that contain ASCII double quotes (")
Summary: smbmount cannot fetch filenames that contain ASCII double quotes (")
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.6.4
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
: 11420 12160 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-08 11:47 UTC by Shlomi Fish
Modified: 2017-11-09 13:35 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shlomi Fish 2017-06-08 11:47:08 UTC
Hi!

On Mageia Linux v6 x86-64 after a recent upgrade of samba, the SMB filesystem mounts of Fedora 26 x86-64 to that share, cannot fetch the contents of filenames that contain ASCII double quotes, even though they are listed. smbclient gives me this:

smb: \Music\shlomif-Download\to-del\> ls
  .                                   D        0  Fri May 26 21:06:12 2017
  ..                                  D        0  Tue Jun  6 16:39:21 2017
  _39UIV~Z                            N        5  Fri May 26 21:06:12 2017

                1439137596 blocks of size 1024. 724750848 blocks available
smb: \Music\shlomif-Download\to-del\> get _39UIV~Z
getting file \Music\shlomif-Download\to-del\_39UIV~Z of size 5 as _39UIV~Z (0.2
KiloBytes/sec) (average 0.2 KiloBytes/sec)
smb: \Music\shlomif-Download\to-del\> shlomif@telaviv1:~$ less _39UIV~Z
shlomif@telaviv1:~$ rpm -q samba-common
samba-common-4.6.4-1.mga6
shlomif@telaviv1:~$

It worked in the past. Please look into fixing it.
Comment 1 Shlomi Fish 2017-09-29 16:33:26 UTC
Anyone? Ping! It still happens with samba-4.6.8-1.mga7 .
Comment 2 Björn Jacke 2017-10-02 16:39:34 UTC
doublequotes are not allowed in SMB.

You didn't give details on what kind of "SMB filesystem mount" you used. I assume cifs vfs of the Linux kernel. Previous versions might have used the Unix extensions, after the update it might be no longer Unix extensions, but again, as you didn't give any details this is just a guess. Recent Kernel versions support SFM mapping of doublequote to 0xF020. It depends how recent your kernel is if this is supported already or not. It came in with kernel commit 7a72fdf400c039218526ac4241efb2db984e1a13 (CIFS: add misssing SFM mapping for doublequote)earlier this year. The smbclient command does not support those mappings.

To support the mapping on the server side you might have to enable vfs catia and set

catia:mappings = 0x01:0xf001,0x02:0xf002,0x03:0xf003,0x04:0xf004,0x05:0xf005,0x06:0xf006,0x07:0xf007,0x08:0xf008,0x09:0xf009,0x0a:0xf00a,0x0b:0xf00b,0x0c:0xf00c,0x0d:0xf00d,0x0e:0xf00e,0x0f:0xf00f,0x10:0xf010,0x11:0xf011,0x12:0xf012,0x13:0xf013,0x14:0xf014,0x15:0xf015,0x16:0xf016,0x17:0xf017,0x18:0xf018,0x19:0xf019,0x1a:0xf01a,0x1b:0xf01b,0x1c:0xf01c,0x1d:0xf01d,0x1e:0xf01e,0x1f:0xf01f,0x22:0xf020,0x2a:0xf021,0x3a:0xf022,0x3c:0xf023,0x3e:0xf024,0x3f:0xf025,0x5c:0xf026,0x7c:0xf027,0x0d:0xf00d

But actually this is not a bug, that works as designed, just protocols changed with your update.
Comment 3 Björn Jacke 2017-10-02 18:49:53 UTC
*** Bug 11420 has been marked as a duplicate of this bug. ***
Comment 4 Björn Jacke 2017-11-09 13:35:26 UTC
*** Bug 12160 has been marked as a duplicate of this bug. ***