1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
Jeremy Allison
93dcfdea38 Second part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems.
Re-add:
	smb_ucs2_t toupper_w(smb_ucs2_t v);

and ensure it is called whenever we are operating on smb_ucs2_t
variables. I'd like to make the definition of smb_ucs2_t incompatible
with int and codepoint_t so they can't be mixed, but that's a patch
for another time.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jul 19 23:48:05 CEST 2011 on sn-devel-104
2011-07-19 23:48:05 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Andrew Bartlett
8f1810362d lib/util Use lib/util/ms_fnmatch.c in common for gen_fnmatch()
gen_fnmatch was a duplicate symbol in the top level build.

gen_fnmatch() used for simple non-CIFS pattern matching, so selecting
the lib/util implementation should not be a concern.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
92faeaeea8 charset Remove use of {isupper,islower,toupper,tolower}_w functions
These now call the common _m functions that consider UTF16 code points.

This removes the code which will make up a 'lame' table in memory, as
this can just as correctly be handled by running the algorithm at runtime (which is to call toupper() and tolower() on characters < 128).

When used, a top level waf build will always locate the correct table
- in the build tree or outside - due to relinking the installed
binary.

Andrew Bartlett
2011-02-18 17:00:34 +11:00
Volker Lendecke
e6f95967cc s3: Fix a bool/enum mismatch 2009-11-21 20:49:16 +01:00
Andrew Bartlett
6859b805e8 s3:lib Use push_ucs2_talloc() in ms_fnmatch()
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-08 01:15:24 +02:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 6b189dabc5)
2008-05-20 22:40:13 +02:00
Volker Lendecke
148f1eee43 Save one popular malloc
(This used to be commit 2150663d9e)
2008-01-09 00:10:43 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
3aaca8028e r25170: Remove pstring limits from ms_fnmatch and module load.
Jeremy.
(This used to be commit 764574ee05)
2007-10-10 12:30:48 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
445a9729f0 r6044: Ensure the old search calls always ask mask_match to translate
patterns like ????????.??? - even if using an NT1 protocol.
Matches W2K3 behavior.
Jeremy.
(This used to be commit 67f6473f50)
2007-10-10 10:56:18 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
d7a1c4f79c r4032: Fix bug #2110 - ensure we convert to ucs2 correctly.
Jeremy.
(This used to be commit a1e5a2a6ab)
2007-10-10 10:53:30 -05:00
Andrew Tridgell
d9b8eaabc5 r2824: restored the is_case_sensitive option to ms_fnmatch() in Samba3. It is
very rarely used, but we sohuldn't be removing a feature in a minor
release of this kind.
(This used to be commit 4ce0505bc3)
2007-10-10 10:52:54 -05:00
Andrew Tridgell
640f124ca2 r2778: merged the new samba4 ms_fnmatch code to Samba3. Thanks to Rusty
Russel for some help in designing the new algorithm.
(This used to be commit 38144f8d2c)
2007-10-10 10:52:52 -05:00
Jeremy Allison
5480cfc26b r2213: Optimisation. Passes masktest against W2K3.
Jeremy.
(This used to be commit 5dc3324c4f)
2007-10-10 10:52:36 -05:00
Jeremy Allison
aed1610ec2 Fix for bugid #205 - work by Andrew Bartlet (modified to use
fixed buffer by me).
Jeremy.
(This used to be commit 6f68b8de47)
2003-08-12 04:25:26 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Tridgell
11ce0f4d2d a bunch of fixes from the sflight to seattle
in particular:
 - fixed NT status code for a bunch of ops
 - fixed handling of protocol levels in ms_fnmatch
(This used to be commit 3eba9606f7)
2001-08-20 05:15:26 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
aac630b382 Had to add a "pam password change" parameter (defaults to "off") and inlined
the pam password change code to ensure that existing and working password
chat scripts don't break with 2.2.1. PAM password changing has to be explicitly
requested.
Allowed wildcards in pam password change matching (matches password chat
script matching). Had to add const (sorry Tim :-) to ms_fnmatch() to
stop warnings. Don't worry - the const changes are isolated and don't
cause any other warnings :-).
Jeremy.
(This used to be commit 47b4d82536)
2001-05-02 23:32:09 +00:00
Jeremy Allison
82afede9fa Merged Andrew's wfw fix (2).
Jeremy.
(This used to be commit a4fb755a48)
2001-04-17 07:09:42 +00:00
Jeremy Allison
8a1c2e0298 AIX ACLs donated by IBM.
Merge Andrew's fnmatch fix for WfW.
Jeremy.
(This used to be commit 1d4438f077)
2001-04-17 05:41:07 +00:00
Jeremy Allison
693ffb8466 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
(This used to be commit 148628b616)
2000-05-02 02:23:41 +00:00
Andrew Tridgell
aa6040c7ce some cleanups
(This used to be commit 95f6c0f84a)
2000-04-30 11:25:09 +00:00
Andrew Tridgell
71e7974f3f YIPEE!!!!!
We finally have a perfect emulation of Microsoft wildcard
matching. The routine ms_fnmatch() does wildcard matching with all MS
wildcards (including the unicode wildcards), and masktest against a
NT4 workstation with hundreds of thousands of random exmaples has not
found a single error.

amazingly it is only about 60 lines of code, but it has taken us years
to get it right. I didn't sleep much last night :)
(This used to be commit cc9e007cdf)
2000-04-30 04:45:16 +00:00