[PATCH] Allow . to end a filename, use real unicode for fnmatch().

Andrew Bartlett abartlet at samba.org
Sun Jul 27 22:56:16 GMT 2003

On Mon, 2003-07-28 at 08:48, Jeremy Allison wrote:
> On Mon, Jul 28, 2003 at 08:43:39AM +1000, Andrew Bartlett wrote:
> > 
> > Given all that, I think it's a reasonable approach  (and that's the
> > reason I raised it on the list).  And I would never have disagreed with
> > it if masktest hadn't tripped over it - I'm much more worried about the
> > fnmatch code...
> Yes - me too. Can you give me an explaination of what your changes
> are trying to fix (or a bugid) ?

It started with #205, and the fact that the 'unicode' conversion in
mask_match is by null-padding, not by actual use of iconv().

Given the problem on expanding/contracting strings and strlower_m(), I
looked at how far down I could push the problem - and realised that we
could just do the case-sensitive part in the fnmatch code itself,
without ever lowercasing the entire string.

It also allowed me to say 'invalid strings don't match', rather than the
smb_panic() in unix_strlower().

BTW, why does the comparison occur in lowercase?  For 'weird' languages
we should determine exactly which case the case-insensitve stuff
actually occurs in.

Andrew Bartlett

Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030727/1ee35b7d/attachment.bin

More information about the samba-technical mailing list