Bug 11323 - Logging of files with broken encoding
Summary: Logging of files with broken encoding
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-09 16:39 UTC by Ralph Böhme
Modified: 2015-06-22 17:20 UTC (History)
1 user (show)

See Also:


Attachments
Patch that went into master (2.21 KB, patch)
2015-06-09 16:39 UTC, Ralph Böhme
no flags Details
Patch for 4.2 cherry-picked from master (2.66 KB, patch)
2015-06-10 08:43 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2015-06-09 16:39:57 UTC
Created attachment 11137 [details]
Patch that went into master

Move level 0 catch-all debug statement from behind a 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?
Comment 1 Ralph Böhme 2015-06-10 08:43:56 UTC
Created attachment 11140 [details]
Patch for 4.2 cherry-picked from master

No patch for 4.1 as that branch misses prerequisite fixes introduced in bug 10775. :)
Comment 2 Jeremy Allison 2015-06-10 18:46:19 UTC
Re-assigning to Karolin for inclusion in 4.2.next.
Comment 3 Karolin Seeger 2015-06-17 18:17:31 UTC
Pushed to autobuild-v4-2-test.
Comment 4 Karolin Seeger 2015-06-22 17:20:55 UTC
(In reply to Karolin Seeger from comment #3)
Pushed to v4-2-test.
Closing out bug report.

Thanks!