Bug 7513 - Wrong results in dir listing with wildcard
Summary: Wrong results in dir listing with wildcard
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.4.7
Hardware: x86 Windows XP
: P3 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-14 23:02 UTC by Guy Rouillier (dead mail adress)
Modified: 2020-09-28 09:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Rouillier (dead mail adress) 2010-06-14 23:02:14 UTC
I discussed this issue on the samba (users) mailing list, and someone else was able to reproduce it.

Run the following in a temporary directory:

echo abc > ActivePerl-5.10.1.1007-MSWin32-x86-291969.msi
echo abc > ActivePython-2.6.5.12-win32-x86.msi
echo abc > ActiveTcl8.6.0.0b2.291226-win32-ix86-threaded.exe
echo abc > authenclientcp.bat
echo abc > authencp.bat
echo abc > authenejbcp.bat

I put this into a batch file.  By trial and error, I discovered that the results are the same if you (1) just run from a shell script on the Samba server, or (2) run it on Windows and copy the results to the Samba server.

With those files in place, from a Windows box, I get the following results from issuing directory listings with a wildcard:

N:\temp>dir ac*
 Volume in drive N is data
 Volume Serial Number is 0160-027E

 Directory of N:\temp

06/10/2010  03:33 PM                 6 authenejbcp.bat
06/10/2010  03:33 PM                 6 ActivePython-2.6.5.12-win32-x86.msi
06/10/2010  03:33 PM                 6 ActiveTcl8.6.0.0b2.291226-win32-ix86-threaded.exe
06/10/2010  03:33 PM                 6 ActivePerl-5.10.1.1007-MSWin32-x86-291969.msi
               4 File(s)             24 bytes
               0 Dir(s)  533,019,426,816 bytes free

N:\temp>dir au*
 Volume in drive N is data
 Volume Serial Number is 0160-027E

 Directory of N:\temp

06/10/2010  03:33 PM                 6 authenejbcp.bat
06/10/2010  03:33 PM                 6 authencp.bat
06/10/2010  03:33 PM                 6 authenclientcp.bat
               3 File(s)             18 bytes
               0 Dir(s)  533,019,484,160 bytes free

Notice that authenejbcp.bat is included in both listings. 

One of the respondents on the list suggested I add this to my share definition in smb.conf:

mangled names = no

With that in place, the above issues do *not* occur.  However, reading the man page on name mangling, that appears to deal with 8.3 names corresponding to long file names.  My reading of name mangling does not indicate that enabling mangled names can lead to erroneous wildcard expansion.
Comment 1 Björn Jacke 2017-08-24 18:33:07 UTC
is this still happening with recent samba versions?
Comment 2 Volker Lendecke 2020-09-28 09:29:53 UTC
Tried with modern Windows and Samba -- works for me. Please re-open if you can reproduce.