Bug 4457 - Files included in wildcard search which do not match the wildcard.
Files included in wildcard search which do not match the wildcard.
Status: RESOLVED WORKSFORME
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.23b
Sparc Solaris
: P3 critical
: none
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-20 18:19 UTC by George Blair
Modified: 2007-04-04 07:48 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 George Blair 2007-03-20 18:19:03 UTC
Previously reported in bug 3269, assigned, but not fixed and has not been updated, no activity in over a year. 

g:\mydir is a samba 3.0.23b drive running on a Solaris 9 host, mounted on a Windows XP client. 

dir ca*.* returns caxxxx and cfxxxx and cwhatever:

g:\mydir> dir ca*.*
02/22/2007  09:18a                   7 CA44200701.CLNP
02/28/2007  12:18p                   7 CG30200611.CLNP
03/20/2007  08:09a               2,965 CA056328.wxo
03/19/2007  12:27p                   7 CG07200702.wxo
03/20/2007  06:32a                 332 CA23.ZBR
03/20/2007  06:32a                 747 CA25.ZBR
03/20/2007  06:32a                 498 CA26.ZBR
03/20/2007  06:34a               7,931 CA57.TEL.TNE
03/20/2007  06:31a               2,595 CA13.TEL.TNE
03/19/2007  12:27p                   7 CH56200702.CVNX
02/28/2007  12:18p                   7 CH63200611.CVNX
03/19/2007  12:27p                   7 CF75200702.CVX

File names changed a bit for security purposes.
The same command on a local drive returns only CAxxxxx as expected.
Comment 1 George Blair 2007-03-21 09:05:42 UTC
This bug is creating a significant production problem that cannot be circumvented at this time. For us, it's a P1 issue.
Comment 2 Gerald (Jerry) Carter 2007-03-21 09:18:04 UTC
Jeremy, Hasn't this been fixed lately?
Comment 3 George Blair 2007-03-22 06:39:27 UTC
--

FYI, also replicated on Redhat RHEL4u2 on IBM Blade Server with SAMBA 3.0.10.

--
(In reply to comment #0)
> Previously reported in bug 3269, assigned, but not fixed and has not been
> updated, no activity in over a year. 
> g:\mydir is a samba 3.0.23b drive running on a Solaris 9 host, mounted on a
> Windows XP client. 
> dir ca*.* returns caxxxx and cfxxxx and cwhatever:
> g:\mydir> dir ca*.*
> 02/22/2007  09:18a                   7 CA44200701.CLNP
> 02/28/2007  12:18p                   7 CG30200611.CLNP
> 03/20/2007  08:09a               2,965 CA056328.wxo
> 03/19/2007  12:27p                   7 CG07200702.wxo
> 03/20/2007  06:32a                 332 CA23.ZBR
> 03/20/2007  06:32a                 747 CA25.ZBR
> 03/20/2007  06:32a                 498 CA26.ZBR
> 03/20/2007  06:34a               7,931 CA57.TEL.TNE
> 03/20/2007  06:31a               2,595 CA13.TEL.TNE
> 03/19/2007  12:27p                   7 CH56200702.CVNX
> 02/28/2007  12:18p                   7 CH63200611.CVNX
> 03/19/2007  12:27p                   7 CF75200702.CVX
> File names changed a bit for security purposes.
> The same command on a local drive returns only CAxxxxx as expected.

Comment 4 Jeremy Allison 2007-03-29 13:34:17 UTC
Ok, here's a workaround that will fix your problem immediately.

set "mangle prefix = 5" and restart smbd.

Can you let me know if this works for you please ?

Jeremy.
Comment 5 Jeremy Allison 2007-03-29 13:48:20 UTC
What this will do is change the algorithm for
generating 8.3 mangled names to use a non-mangled prefix
of 5 characters, this is what Windows XP etc. use. We ship by default
with a mangle prefix of 1, which is what allows "ca*.*" to match
all mangled names starting with "c". There are certain
Windows applications that actually depend on wildcard
requests matching mangled names as well as non-mangled
names (although they're old DOS apps which may not be
important now) so I'm loath to change the code immediately.

We're between a bit of a rock and a hard place with
this one. If we change the mangle prefix from 1 we
might break apps that have stored mangled names in
the registry or other config files - and we have
to mangle non-Windows POSIX names (ie. names containing
a ':' character). If we remove the wildcard check
for mangled names then we run the risk of breaking
old DOS style apps. The latter solution is probably
one we'll use in future (in fact I'll add an option
to do this) but it'll take us a while to be able
to move to the happy world where all DOS apps have
gone away....

Jeremy.
Comment 6 George Blair 2007-03-30 17:04:12 UTC
Works in RedHat!
We'll test it in Solaris next week, but we assume it will work.

Bravo!!

Thanks,
George
Comment 7 Gerald (Jerry) Carter 2007-04-03 23:46:36 UTC
Config workaround.  Closing 
Comment 8 George Blair 2007-04-04 07:48:40 UTC
(In reply to comment #7)
> Config workaround.  Closing 

FYI, we tested it in Solaris as well, and worked fine. There was some concern about potential performance impact, but testing showed no discernible difference.

We're putting the change into production on Monday, April 9th, 2007.

Thanks again for the quick turnaround!

Cheers,
George