Bug 7790 - String truncated at accented chars in d_printf
Summary: String truncated at accented chars in d_printf
Status: VERIFIED INVALID
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.5.6
Hardware: x86 Windows 7
: P3 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-10 13:21 UTC by Guillaume Filion
Modified: 2010-11-16 09:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Filion 2010-11-10 13:21:08 UTC
If a filename contains an accented char and is not readable (NT_STATUS_ACCESS_DENIED error), then the error string is truncated at the accented char. 

Steps to reproduce:
1) Setup a Windows PC that is sharing a directory.
2) Make a file in that directory not readable by the SMB user.
3) Name that file with an accent in it. (Ex: "Voisinage réseau")
4) Run:
/usr/bin/smbclient \\\\vicky\\DOCUMENT -U receptioniste -E -d 1 -c tarmode\ full -Tc - >/dev/null

Expected results:
-----
[...]
                directory \Videos\
         504 (504000.0 kb/s) \Videos\desktop.ini
                directory \Voisinage d'impression\
NT_STATUS_ACCESS_DENIED listing \Voisinage d'impression\*
                directory \Voisinage réseau\
NT_STATUS_ACCESS_DENIED listing \Voisinage réseau\*
tar: dumped 4813 files and directories
Total bytes written: 657149952
-----

Actual results:
-----
[...]
                directory \Videos\
         504 (504000.0 kb/s) \Videos\desktop.ini
                directory \Voisinage d'impression\
NT_STATUS_ACCESS_DENIED listing \Voisinage d'impression\*
                directory \Voisinage réseau\
NT_STATUS_ACCESS_DENIED listing \Voisinage rtar: dumped 4813 files and directories
Total bytes written: 657149952
-----
Comment 1 Volker Lendecke 2010-11-14 07:06:21 UTC
Just found this on a box with an invalid locale setting. I solved it by

export LANG=de_DE.UTF-8

and it worked. Please set your LANG variable correctly and retry.

Volker
Comment 2 Guillaume Filion 2010-11-16 09:19:49 UTC
Thanks a lot, I ran 
dpkg-reconfigure locales
on the debian server and it fixed the problem.