From: Gaiseric Vandal on
What does "dir /x" show? The "/x" option should give you the 8.3 version of
the name. That may be being matched by the wildcard.



-----Original Message-----
From: samba-bounces(a)lists.samba.org [mailto:samba-bounces(a)lists.samba.org]
On Behalf Of Jeffrey McLellan
Sent: Friday, July 09, 2010 8:25 PM
To: samba(a)lists.samba.org
Subject: Re: [Samba] Wrong results in dir listing with wildcard

Guy Rouillier <guyr-ml1 <at> burntmail.com> writes:

> 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. If someone
> else can confirm they are seeing the same thing, I'll file a bug report.
> Thanks.
>

For what it's worth, this behavior is not limited to Samba servers. I have
the
exact same problem using standard Microsoft servers. Dir EC05*.* might
return a
file named EC11*.* which is also visible if you Dir EC11*.*.

The main difference is that my problem doesn't seem to be reproducible like
yours. During the course of a month we generate several thousand of these
files
which are processed then archived and deleted. The names are all unique,
containing date/time stamps. In the course of a month maybe 10 of these
files
will be affected as you describe. We have modified our code to monitor for
this
situation and give warnings.




--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Jeremy Allison on
On Mon, Jul 12, 2010 at 07:09:36PM -0400, Gaiseric Vandal wrote:
> What does "dir /x" show? The "/x" option should give you the 8.3 version of
> the name. That may be being matched by the wildcard.

That's exactly the issue. The SMB/CIFS wildcard matching
algorithm matches both short and long names.

Jeremy.
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba