Filenames with double quotes broken somewhere between 4.0.17 and 4.0.26

Jan Mikkelsen janm at transactionware.com
Wed Jul 29 23:41:06 UTC 2015


> On 30 Jul 2015, at 09:28, Jeremy Allison <jra at samba.org> wrote:
> 
> On Wed, Jul 29, 2015 at 09:44:09PM +1000, Jan Mikkelsen wrote:
>> Hi,
>> 
>> Filenames with double quotes seem to have broken sometime between these versions.
>> 
>> With standard 4.0.26 a file called say "Test” (including the double quotes) gets mangled when presented to the client. I have tested this with OS X 10.9 OSX 10.10.4 and Windows 7 clients.
>> 
>> This worked fine a few releases ago -- the problem I am seeing is that files that were created from the client are no longer accessible using their name with double quotes and only the mangled name is available.
>> 
>> Changing source3/smbd/mangle_hash2.c like to not treat double quotes as a special character (patch below) make the mangling stop but the the 0x22 double quote character is translated to Unicode 0xf80 on the Unix side. I don’t see where this is happening.
>> 
>> Doing
>> 
>>   touch \”XYZ\”
>>   ls *XYZ* | xxd
>> 
>> when in a share directory on the client side gives:
>> 
>> 0000000: 2258 595a 220a                           "XYZ”.
>> 
>> On the server side, in the same directory, ls *XYZ* | xxd gives:
>> 
>> 00000000: ef80 a058 595a ef80 a00a                 ...XYZ….
>> 
>> Then the names aren’t matched and aren’t available even though it looks like they’re there.
>> 
>> This is on FreeBSD 10.2-PRERELEASE with a ZFS filesystem, with Unicode filenames enabled. This is samba 4.0.26 installed using the standard FreeBSD port.
>> 
>> Can anyone point me to where this translation might be happening? Or better yet, happen to know where the recent-ish change that might have caused this behaviour might be?
> 
> What does your smb.conf look like ? Are there
> any vfs modules you're using on these shares ?

No VFS modules, pretty simple smb.conf. Have been experimenting with “managed name = yes/no” and “mangle hash".

(Also just reading over my message, that UTF-8 sequence looks like 0xf20 in the light of day rather than 0xf80 in my tired state last night.)

[global]
    netbios name = HOSTNAME
    workgroup = WGNAME
    server string = HOSTNAME file server
    hosts allow = 192.168. 127. 10.1.2. 
    bind interfaces only = yes
    interfaces = 192.168.2.0/24 127.0.0.1/8 10.1.2.0/24 192.168.1.0/24
    load printers = no
    max log size = 50
    client plaintext auth = no
    disable netbios = yes
    use sendfile = no
    use mmap = no
    security = user
    dns proxy = no 
    unix charset = utf-8
    passdb backend = tdbsam
    private dir = /cfg/etc/samba/private
    debug level = 10

[homes]
    comment = Home Directories
    browseable = no
    writable = yes
    path = /home/%S
    create mask = 0744




More information about the samba-technical mailing list