[PATCH] Logging of files with broken encoding

Jeremy Allison jra at samba.org
Tue Jun 9 10:10:29 MDT 2015

On Tue, Jun 09, 2015 at 01:41:42PM +0200, Ralph Böhme wrote:
> Hi,
> attached is a patchset that moves a level 0 catch-all debug statement
> from behind the switch clause inside the switch clause as default
> case. This fixes an issue that resulted in the log being flooded with
> those messages in case someone puts a file with an illegal UTF8
> encoding (eg '\xA0test') in a toplevel directory:
> [2015/05/12 18:17:26.865144,  0] ../lib/util/charset/convert_string.c:438(convert_string_talloc_handle)
>   Conversion error: Incomplete multibyte sequence(<A0>test)
> There's already an explicit EILSEQ case with a log message at loglevel
> 3, so afaict the level 0 log statement after the switch clause doesn't
> make sense.
> Otoh, I'd think it would be worthwhile logging a useful diagnostic
> with the full file patch which is what patch 2/2 does.
> As a result, with both patches in place we'd write this to the logs:
> [2015/06/09 13:18:51.429654,  1, pid=3461] ../source3/smbd/trans2.c:2379(smbd_dirptr_lanman2_entry)
>   Conversion error: illegal character: dir/test?
> Thoughts?

Really nice cleanup - pushed !

Do you want to log a bug to get this into 4.2.next, 4.1.next ?

More information about the samba-technical mailing list