summaryrefslogtreecommitdiffstats
path: root/source3/smbd/mangle.c
Commit message (Collapse)AuthorAgeFilesLines
* move to the FNV1 hash alghorithm seem goodSimo Sorce2002-04-241-0/+1
| | | | | | | the test revealed 15 collision with 1 Million long file names :-) Simo. (This used to be commit 77dc498b6f0c435f082eb2d934920d3f3bef0b65)
* don't try to return a voidAndrew Tridgell2002-04-111-1/+1
| | | | (This used to be commit 51b4de0ae3b05c4f34a645ae9c6e395bc37226e6)
* this adds a completely new hash based mangling schemeAndrew Tridgell2002-04-111-0/+1
| | | | | | | | | | | the hash for this scheme is *much* larger (approximately 31 bits) and the code is written to be very fast, correctly handling multibyte while not doing any actual multi-byte conversions in the vast majority of cases you can select this scheme using "mangling method = hash2", although I may make it the default if it works out well. (This used to be commit bb173c1a7e2408ced967ebac40b5e3f852ccd3a1)
* This split the mangling code up to allow for the possibility of multipleAndrew Tridgell2002-04-111-915/+68
| | | | | | | 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)
* a fix yet committed to 2.2 sometimes ago and reintroduced here!Simo Sorce2002-04-081-1/+1
| | | | (This used to be commit aff7073dabb6253fea4729f52240a25f90206699)
* Reintroduce the 2.2 name mangling code, until we get are more flexible solution.Andrew Bartlett2002-04-081-820/+785
| | | | | | | | Even for a hash/cache setup, this code needs some more work, in particular it needs to use mangle_get_prefix() etc and to move to unicode internals. Andrew Bartlett (This used to be commit ad8aa470575c39fcbc7f1440bf1081d7ea31c0aa)
* Actually include some *information* in the mangle debug messages.Andrew Bartlett2002-03-141-14/+39
| | | | | | | | | In particular this shows the filename, prefix and counters involved. The unicode -> unix converion only occours for the error case. Andrew Bartlett (This used to be commit 9c8de8c6cf44ead0719efa48a34c9c9d54402ac6)
* in dos_unmangle() the only function call was to *mangle()*. Adding theAndrew Bartlett2002-02-191-1/+1
| | | | | | | 'un' dramaticly increses the functionality of this code :-). Andrew Bartlett (This used to be commit 15b9b63db57901fbfa3d62b64212742f361ee519)
* better debug messages!Simo Sorce2002-02-041-8/+8
| | | | (This used to be commit e3bb6867454307ae592115e205d32ddd53988678)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Fix a 'const' warning.Andrew Bartlett2002-01-251-1/+1
| | | | (This used to be commit 56be51d648da971bcf1250470b29918e43dc622b)
* micro fix :-)Simo Sorce2002-01-251-0/+1
| | | | (This used to be commit 8929f07a15e7c6f6dbc72b1c50b45eb4c321d516)
* minor fixesSimo Sorce2002-01-251-3/+5
| | | | (This used to be commit 04f492980b73800b60dde764fdeb43f2eab79624)
* handle filenames like .bashrc better in the new mangling codeAndrew Tridgell2002-01-241-8/+12
| | | | (This used to be commit 05adb30eabceea0ebbd7a7831533e2d4f20e58c8)
* removed unused functionAndrew Tridgell2001-11-241-18/+0
| | | | (This used to be commit ad7afbfdea600a62fa1550bd354996ad38807533)
* some bugfix and new functions,Simo Sorce2001-11-121-31/+10
| | | | | | modified mangle.c to use mosltly acnv_????() functions. this should make also build farm happy (This used to be commit 8bb5cb27c2012b8967482255d48a1b48d3acd9db)
* fixed, moved and added some functionsSimo Sorce2001-11-101-1/+1
| | | | | note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c (This used to be commit 64dde3b64fc091cda95fc4ed145595b5d79b2e01)
* Fixed compiler warnings.Tim Potter2001-11-051-3/+2
| | | | (This used to be commit 54e40b270208774ed71eff32f3c3b1d3b86b5aca)
* a big one:Simo Sorce2001-11-041-1084/+249
| | | | | | | | | | | | | | | | | | - old mangle code has gone, the new one based on tdb seem resonably ok probably the valid.dat table need to be updated to treat wild chars as invalid ones (work ok without it) - a LOT of new string manipulation function for unicode, they are somewhat tested but a review would not be bad - some new function I will need for the new unix_convert function I'm writing, this will be renamed filename_convert and use only unicode strings. - charconv, I attached a comment, if someone wnat to look if I'm right or just was hacking to late in the night to make a sane one :) of course any bug is my responsibility an will be pleased to see patches if you find any. :-) Simo. (This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)
* - fix string len for an ucs2_to_dos function as any ucs2 char may be up to 4 ↵Simo Sorce2001-10-291-4/+81
| | | | | | | dos hars... - addedd ascii compatibility functions (This used to be commit 8b9302b7078f1dd5459051500ed19a696dc09ae0)
* fix a logic bug on max size of a returned string,Simo Sorce2001-10-281-3/+9
| | | | | this fixes also the bug with file renaming. (This used to be commit 5246d7609c3aff658fcd08a1f1c1bb6e11509e35)
* Fixed compile warning.Tim Potter2001-10-261-1/+1
| | | | (This used to be commit 320c21b7a9e0a914b8a9523775df8895cb41256f)
* get rid of compiler warnings (casts and delete unused variables)Herb Lewis2001-10-231-1/+0
| | | | (This used to be commit 51cb4411df61d1caec9d84809b1a53a6a632f808)
* ops, some testing code in compat function let only mangled name come back.Simo Sorce2001-10-221-12/+12
| | | | (This used to be commit e48eb7b572de10481e928fb55243f47e8a3aa446)
* lets try the new mangling codeSimo Sorce2001-10-221-7/+39
| | | | | | | | all the calls go through a compatibility interface will change that soon a new mangle.tdb file will be set in the lock directory it contains a static mapping longname<->manglename (This used to be commit 1ffacd2068a896d36a9e56b6e28c63e2f7e98762)
* introduce mangle backward compatibility functionsSimo Sorce2001-10-131-2/+147
| | | | | add talloc_asprintf() (This used to be commit 7264d611eff871f424d449e1ff1c7ec3f5fdde40)
* remove unused function in mangle.cSimo Sorce2001-10-111-12/+0
| | | | | fix some alloc leaks spotted by andreas moroder. (This used to be commit 39409a20f69078709c63f6f867c042e66d5c7de3)
* Fixed some compile warnings.Tim Potter2001-10-101-4/+2
| | | | (This used to be commit c9b3e6c71401efe754c10f7077671f0c1cebdafb)
* tim suggested to add a copyright note :)Simo Sorce2001-10-081-1/+21
| | | | (This used to be commit c0bb484e0fcdfece62d361aaaebd90cf15548992)
* more fixing and testing.Simo Sorce2001-10-071-54/+83
| | | | | | | added ucs2_to_dos83 function. the code should be ok now. further test with japanese and other languages is needed at this point. (This used to be commit 74f746fee2e528e4f23192e21e1d74739dc1072e)
* init only in test code.Simo Sorce2001-10-041-48/+55
| | | | | | remove unused structure for tdb data. fixes. (This used to be commit c82cf58ae2ae9790b8575328b419dbc8a089b60f)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* undef the code for nowSimo Sorce2001-09-291-2/+2
| | | | (This used to be commit 5ab220efd7a1532e11370cb0fc9854d610a7f3d7)
* further devel and test kit.Simo Sorce2001-09-291-67/+264
| | | | | | first tests show it still does not work. work in progress... (This used to be commit a4c746ac474e2e4cead78076ffe2109fab74aefe)
* get out unicode_from_buffer and buffer_from_unicode, unneeded.Simo Sorce2001-09-271-112/+139
| | | | | | | | store mangled filename in dos charset and unmangled in unicode. clean ups still lot to do. againg compiled but not yet tested. (This used to be commit 2d1aabb6d4bf23985a9ce0f7e065292aacedc80a)
* minor fixesSimo Sorce2001-09-271-10/+5
| | | | (This used to be commit 57e639bbdd115b51362caf7e3db4ba34ccdeddc2)
* - the inactive core of the new mangling code that use tdbSimo Sorce2001-09-251-0/+357
| | | | | - some more utils for unicode string manipulation (This used to be commit 4ade36446e7dee1c3828d8c822f047c6e891a644)
* move to SAFE_FREE()Simo Sorce2001-09-171-4/+4
| | | | (This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-12/+12
| | | | | | can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
* The big character set handling changeover!Andrew Tridgell2001-07-041-65/+5
| | | | | | | | 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 debb471267960e56005a741817ebd227ecfc512a)
* Very minor cleanup. I was looking for another problem and found some bitsChristopher R. Hertel2001-07-021-2/+2
| | | | | | | of code that were unclear. Chris -)----- (This used to be commit c2977be3408645499915d728538ba2c65b97614f)
* Removed a patch that Andrew had added because 'insure' was incorrectlyChristopher R. Hertel2000-06-131-9/+0
| | | | | | reporting a memory leak in the cache module. I've modified the cache code to prevent insure getting confused, so the patch can now be removed. (This used to be commit 50599b0fa2b78109e3bd2cf50007dc69c4059955)
* avoided a memory leak in the ubi code by deleting a mangled cacheAndrew Tridgell2000-04-231-1/+11
| | | | | | | entry before adding to ensure that we don't ever add a duplicate entry this code can be removed when ubi gets fixed (This used to be commit 062d79bf8ba5308803393c7b9140d1f77db3690f)
* Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-261-4/+4
| | | | | | | Stop makeing function calls for every use of skip_multibyte_char. This function is called several *million* times during a NetBench run :-). Jeremy. (This used to be commit e5a3deba46ea2d4cb49a6c4b73edd766fe8b5a5c)
* smbd/mangle.cJeremy Allison2000-01-081-1/+1
| | | | | | | smbd/negprot.c: Tidyup of static initializers. smbd/server.c: Fix -l option. Jeremy. (This used to be commit d120f22fefde21b38e43ea5ad0180bf27304d2eb)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-30/+71
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* removed comment line at end of fileLuke Leighton1998-11-021-1/+0
| | | | (This used to be commit 5e2fc8b7ccf4a9c8b0a2acf4bd752531ac6fa775)
* Added back groupname map stuff removed by Andrew's "slash 'n' burn"Jeremy Allison1998-09-081-3/+4
| | | | | | | | | | | | | | | | | | tactics :-). Protected by #ifdef until used. Fixed bug in fd_attempt_close() where a pointer to potentially free'd memory was returned. I hate that. Added "blocking locks" as a per-share option for performance testing. Changed is_mangled() so it will return true if called with a pathname and any component of the pathname was mangled (it was already attempting to do this, but not checking for a '/' as end-of-mangle). This should be a better fix for the wierd stat cache bug Andrew identified. Jeremy. (This used to be commit 0de01f45980c7bc261248a9cead972a8d8cbd594)
* fixed a bug in the name mangling code. It implicitly assumed thatAndrew Tridgell1998-09-031-39/+39
| | | | | | | | | mangling a name can't increase it's size which isn't true. (imagine a file called "L B" which mangles to "LB~XX") The symptoms were that users couldn't run batch files from short directory names that contained non 8.3 characters (such as spaces). (This used to be commit c319d8ea3f8b42bb3a8e501642971ed0bdb21583)
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-25/+0
| | | | | | | | | Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)