summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle_hash.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2010-08-26s3-build: include mangle.h only where needed.Günther Deschner1-0/+1
Guenther
2010-02-18Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised ↵Jeremy Allison1-0/+1
value(s) error when "mangling method = hash" The charset array allocated in init_chartest() is allocated by MALLOC, but only some elements of it being set after allocation. Fix is to memset to zero after allocation. Jeremy.
2010-02-18Fix bug #7154 - mangling method = hash can crash storing a name not ↵Jeremy Allison1-3/+5
containing a '.' Fix use of uninitialized variable. This can lead to crashes if mangling = hash processes names with no '.'. Jeremy.
2009-12-21Fix bug reported in mangle_hash code (no bugid yet).Jeremy Allison1-0/+9
Don't change the contents of a const string via a pointer alias (or if you do, change it back.....). Jeremy.
2009-12-17Fix bug #6939 - mangling method = hash breaks long filenames.Jeremy Allison1-1/+4
We were returning the wrong sense of the bool. must_mangle() has to return !NT_STATUS_IS_OK, not NT_STATUS_IS_OK. Jeremy.
2009-04-14Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett1-10/+10
This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
2009-02-01Just for fun: Move some bytes from bss to textVolker Lendecke1-1/+1
2009-01-08s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher1-4/+1
The goal is to move all this variables into a big context structure. metze
2009-01-08s3:smbd: it's pointless to have a global magic_charStefan Metzmacher1-4/+7
We call magic_char = lp_magicchar(p) each time it's used. metze
2009-01-08s3:smbd: make mangle_fns constStefan Metzmacher1-3/+3
metze
2008-05-20Cleanup size_t return values in callers of convert_string_allocateTim Prouty1-4/+7
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 6b189dabc562d86dcaa685419d0cb6ea276f100d)
2007-12-28Remove a static arrayVolker Lendecke1-6/+6
This might be worth it, mangle_hash is hardly used these days (This used to be commit 44775ea38bc320ac8e2208769a8cde2c6f44f640)
2007-12-10Move stuff from data to textVolker Lendecke1-2/+2
(This used to be commit 49f06a2fa70e469bcb5fe17852af011dac32994b)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-14/+14
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 f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison1-88/+113
interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy. (This used to be commit dee8beba7a92b8a3f68bbcc59fd0a827f68c7736)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22009: change TDB_DATA from char * to unsigned char *Stefan Metzmacher1-1/+1
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
2007-10-10r21980: make use of tdb_*_bystring() and string_term_tdb_data() in smbd/Stefan Metzmacher1-2/+1
to avoid creating the TDB_DATA struct from strings "by hand" metze (This used to be commit 09b477ed85e46bc780ce3c1461472883a6b952f9)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-8/+10
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")Jeremy Allison1-3/+3
and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy. (This used to be commit c2752347eb2deeb2798c580ec7fc751a847717e9)
2007-10-10r10600: Fix bug #2769 (mangle filenames ending in a space)Jeremy Allison1-7/+13
and an old bug where mangle mathod hash wasn't mangling file names with more than one dot which also end in a dot. Jeremy. (This used to be commit 105e38847dc0078951abcda16808590ccc363b00)
2007-10-10r9532: Fix for bug #2152, championed by Neil Hoggarth ↵Jeremy Allison1-4/+4
<neil.hoggarth@physiol.ox.ac.uk>. Jeremy. (This used to be commit d29a45565d955e655b9b5a06039be39efc9e021b)
2007-10-10r6977: Fix bug #2735 (not mangling control characters) plusJeremy Allison1-0/+4
ensure we don't create files with control characters either. Jeremy. (This used to be commit 0ca2423c706423a07721e375345b6d45a45cbcf4)
2007-10-10r6965: Remove some dead code from util_unistr.c.Jeremy Allison1-50/+36
Start of fix for #2735 - we are not mangling some names we should. More fixes to follow. Jeremy. (This used to be commit ac0fa973774c36b72863aea369e9d243cf7420fa)
2007-10-10r6625: Remove another global variable left over from a long time ago (magic ↵Jeremy Allison1-5/+13
char). Jeremy. (This used to be commit b1bfa9cb37deb22d1d08bc60ba44d61334f6446e)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-2/+2
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 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r2112: Simplify the mangle hash code to use an in-memory tdb.Jeremy Allison1-163/+55
Should be ready for the new directory code now... Jeremy. (This used to be commit c2eff8ef1b65570d2e590f62f026cc18f9142652)
2007-10-10r1570: merging changes from 3.0.5Gerald Carter1-5/+5
(This used to be commit 430cf63b9148441bce42bfb15a8045de5da108f4)
2007-10-10r1301: Fix bogus error message when using "mangling method = hash" ratherJeremy Allison1-2/+4
than hash2. We are already calculating lengths so just use memcpy not safe_strcpy(). Jeremy. (This used to be commit a5a3df78531dc5400088e1746d6a7cd29f56a714)
2007-10-10r570: Remove lots of globals to handle case issues - move themJeremy Allison1-18/+4
to connection struct entries (as they should have been from the start). Jerry, once you've cut over to 3.0.4 release branch I'll add this to 3.0 also. - Jerry cut over :-). Jeremy. (This used to be commit 578a508509d21226ad3332fc54c3ab54cd8ae452)
2003-12-03Fix for "hash" (not hash2) type mangling. Noticed by "Forrest W. Christian" ↵Jeremy Allison1-8/+10
<fwc@mt.net> Jeremy. (This used to be commit 3a8fe3b2ef30cbe0cf441d6c4ffa9c309dc71e54)
2003-07-27Some small fixes to our charset conversion code:Andrew Bartlett1-3/+4
- Treat the NMB names in the 'session request' packet as 'ASCII'. This means that we do not get invalid multibyte from the wire, even if we truncate in the conversion. (Otherwise we panic when we try to strupper_m it). - Remove acnv_uxu2(), as it was duplicated by push_ucs2_allocate() - Remove acnv_dosu2(), as it is not used. - In push_ucs2(), with the STR_UPPER flag, do the case conversion *after* the UCS2 conversion, when it we know that the length can't change. Also faster, as we don't need to do another 2 UCS2 conversions. Andrew Bartlett (This used to be commit 912035af1178424583d0bf887a391a0cac2acd87)
2003-07-03Removed strupper/strlower macros that automatically map to ↵Jeremy Allison1-2/+3
strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy. (This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
2003-06-22Found out a good number of NT_STATUS_IS_ERR used the wrong way.Simo Sorce1-4/+4
As abartlet rememberd me NT_STATUS_IS_ERR != !NT_STATUS_IS_OK This patch will cure the problem. Working on this one I found 16 functions where I think NT_STATUS_IS_ERR() is used correctly, but I'm not 100% sure, coders should check the use of NT_STATUS_IS_ERR() in samba is ok now. Simo. (This used to be commit c501e84d412563eb3f674f76038ec48c2b458687)
2003-04-23StrnCpy -> safe_strcpy() on a over-malloced struct.Andrew Bartlett1-2/+2
Andrew Bartlett (This used to be commit e4f1171d57a6186f85b87586a525b3bbaf601974)
2003-01-03Merge from HEAD - make Samba compile with -Wwrite-strings without additionalAndrew Bartlett1-4/+4
warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c)
2003-01-02Merge Andrew Bartletts (size_t)-1 checks.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 339f4fe15efbf67157c8e61b98c6ea983e6b4674)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-1/+1
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-265/+269
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-04-11This split the mangling code up to allow for the possibility of multipleAndrew Tridgell1-0/+775
mangling implementation, selectable using "mangling method = " in smb.conf It also tidies the interface a little, although it is still nasty. (This used to be commit be23d87a178e7d0691e7d942adf89bb3d2d533c2)