Bug 4342 - Truncated directory listing with filename encoding mismatch
Summary: Truncated directory listing with filename encoding mismatch
Status: RESOLVED WORKSFORME
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-16 03:17 UTC by bz.samba.org
Modified: 2009-11-09 07:38 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 bz.samba.org 2007-01-16 03:17:59 UTC
Scenario: A (shared) directory with many (1600+) files. Filenames encoded server-side in ISO-8859-15 with special characters. Server smb.conf specifies UTF-8 encoding (which is a mistake but read on).

Bug: When doing an 'ls' on client side (using cifs from a vanilla 2.6.19.2 linux kernel), hundreds of files are simply omitted in the list (it seems the list gets truncated at an arbitrary but constant position). Opening unlisted files by name works, as does 'ls' when mounting the share using smbfs. Wireshark dumps are available on request.

Comment: I think this is a severe bug. Of course misconfiguring encoding is a mistake - however, silently dropping directory entries is definitively the wrong behaviour then as it's difficult to notice and can wreak havoc if, for example, rsync backups are done via SMB (rsync will happily delete the omitted files as it doesn't see any errors). cifs should list files with placeholders as offending characters instead which may be impossible to open but at least the problem is obvious then.

Keywords: cifs smbfs wrong encoding missing files directory list
Comment 1 Jeremy Allison 2007-01-16 12:14:09 UTC
If it shows correctly with smbfs or Windows this is a CIFSFS bug, not a Samba one. I'm changing the product to CIFSFS for Steve to comment.
Comment 2 Jeff Layton 2009-07-26 08:32:33 UTC
There were some bugs fixed in the readdir codepath within the last year. Is this problem still reproducible with more recent kernels (maybe 2.6.30 or so)?
Comment 3 Jeff Layton 2009-11-09 07:37:09 UTC
No response in several months, closing bug as WORKSFORME.
Comment 4 Jeff Layton 2009-11-09 07:38:41 UTC
Please reopen if this is still an issue.