Bug 11337 - vfs_audit log in utf-8 problem with russian filenames
Summary: vfs_audit log in utf-8 problem with russian filenames
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.2.2
Hardware: All FreeBSD
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-06-17 10:06 UTC by Dron
Modified: 2017-04-14 13:17 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dron 2015-06-17 10:06:59 UTC
FreeBSD 10.1 Samba 4.2.2 (also reproduced in 4.1.17, 4.1.18).
In vfs_audit log there is problem with filenames, foldernames in russian.

For example:
Jun 17 12:52:46 aus smbd_audit:|dron|mkdir|ok|MyDoc/.M-^]ова.M-^O папка
Jun 17 12:53:32 aus smbd_audit:|dron|unlink|ok|MyDoc/.M-^]ова.M-^O папка/Тек.M-^A.M-^Bов.M-^Kй док.M-^Cмен.M-^B.txt
Jun 17 12:53:46 aus smbd_audit:|dron|rmdir|ok|MyDoc/.M-^]ова.M-^O папка 

MyDoc/.M-^]ова.M-^O папка shall be 
MyDoc/Новая папка and 
MyDoc/.M-^]ова.M-^O папка/Тек.M-^A.M-^Bов.M-^Kй док.M-^Cмен.M-^B.txt shall be
MyDoc/Новая папка/Текстовый документ.txt

unix cahrset is utf-8 and locale also utf-8.
Comment 1 Dron 2015-11-30 11:15:54 UTC
Any updates about this issue?
Comment 2 Dron 2016-01-19 07:56:38 UTC
Any news? It's become critical.
Comment 3 Christian Ambach 2016-01-22 16:16:07 UTC
vfs_audit writes the log messages including the file names to the syslog daemon.
It's up to the daemon to write them into the log files correctly and up to your terminal program (and the locale settings) etc to display it to you in the correct way.
I think I heard about some syslog implementations not dealing nicely with messages including characters > ascii code 127. But as the log file seems to contain other unicode characters, that might not be the root cause here.

From looking at the snippets you pasted, it seems that the problematic characters are uppercase. Do they have a a special encoding in UTF8?

You might also want to sniff the packets to the syslog daemon (e.g. by setting up a log forwarding to another host and then sniffing on the external interface). If you examine the sniff and see that Samba send the filenames correctly, then it is a problem with your syslog or terminal.
Comment 4 Dron 2017-04-14 13:17:17 UTC
It is FreeBSD syslogd related.
Workaround is to start syslog with -8 parameter according to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=129248
Works for me.