Bug 7513 - Wrong results in dir listing with wildcard
Wrong results in dir listing with wildcard
Status: NEW
Product: Samba 3.4
Classification: Unclassified
Component: File services
3.4.7
x86 Windows XP
: P3 normal
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-14 23:02 UTC by Guy Rouillier
Modified: 2010-06-15 17:19 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 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.