1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

20 Commits

Author SHA1 Message Date
Andrew Bartlett
400bb4bfab - Make ReadDirName return a const char*.
- Consequential changes from that

 - mark our fstring/pstring assumptions in function prototypes

Andrew Bartlett
(This used to be commit fe2bc64bc439b27387b8f326b0f4f3bfcc3d04a1)
2003-03-16 13:21:12 +00:00
Andrew Bartlett
7e110f782a More signed/unsigned fixes (yes, I run with funny compiler options) and
make x_fwrite() match fwrite() in returning a size_t.

Andrew Bartlett
(This used to be commit 2943c695787b742e9a96b2eefe2d75f681bacf7c)
2003-02-22 12:22:06 +00:00
Andrew Tridgell
48a56c12e2 add a 'mangle prefix' option to allow people to tune the number of
characters used in the prefix for 8.3 names in the hash2
algorithm. The longer the prefix the more readable the 8.3 names will
be, but the weaker the hash.

this was added because of someone complaining that the new hashing
algorithm was unreadable but the old one was broken :)
(This used to be commit 3ca3cc838e5b957c7244b21947daddc4ee4c3099)
2002-10-21 04:30:51 +00:00
Andrew Tridgell
5139da0bc6 fixed a crash bug on 64 bit systems. Thanks to Anton Blanchard for
finding this.
(This used to be commit 4ba8608020123a52432e5afaa914e290e4ce8cbf)
2002-10-15 05:40:24 +00:00
Richard Sharpe
4cb4534dd6 Convert M_DEBUG(0 to M_DEBUG(10 for non-error cases ...
(This used to be commit d5c10e7dc76216db793319f9beb99dd12441e76b)
2002-08-31 16:17:36 +00:00
Simo Sorce
9154aa791e Unneded extra check on len
(This used to be commit e3b3c148208792ac2ccbfd468ad580b1264f9876)
2002-07-18 22:22:30 +00:00
Jeremy Allison
5d840349bd We have to look at the length before checking for "~" as the string
may be shorter than 6 chars. Caught by valgrind.
Jeremy.
(This used to be commit b846bbfa831922b0be52e54804a46d7870895bfc)
2002-07-18 19:15:49 +00:00
Jeremy Allison
5d452f0d00 Merge in mangle fixes from 2.2.
Jeremy.
(This used to be commit 5e2571f424a40df4d67fe279517a9b21184b78e1)
2002-06-13 19:29:02 +00:00
Jeremy Allison
099b4889a2 Removed lp_strip_dot code - ensured that mangling code treats names ending
in '.' as invalid long filenames (special treatment for '.' and '..' which
are valid - yes Andrew I did this without strlen :-) :-).
Jeremy.
(This used to be commit 3180d8ba4ace9417033039d61d04c255da6f6a01)
2002-05-14 19:30:29 +00:00
Simo Sorce
5922eaf61a move to the FNV1 hash alghorithm seem good
the test revealed 15 collision with 1 Million long file names :-)

Simo.
(This used to be commit 77dc498b6f0c435f082eb2d934920d3f3bef0b65)
2002-04-24 11:57:00 +00:00
Andrew Tridgell
d4034d796f made a couple of variables static
(This used to be commit fb6ce175d479e5bddc239595320f5dc245ac2ec6)
2002-04-24 09:00:29 +00:00
Andrew Tridgell
5b8135e038 - fixed the is_mangled() interface to handle multiple components
- fixed the no-extension case of reverse mangling
(This used to be commit 64a2ae5cee4ffc5ae3c902705b6e1050f649e3a5)
2002-04-18 02:13:55 +00:00
Andrew Tridgell
3067ec21fb - added a mangling test suite that measures the collision rate on
randomised filenames

- fixed several mangling bugs that the test suite pointed out
(This used to be commit 858fa7efc34f6e7cdf8500900aed3f7943c91348)
2002-04-12 03:26:19 +00:00
Andrew Tridgell
5c0e682c4a - the 36^6 hash space gives 31 bits, not 32 bits. We need to mask the
hash to suit
- the prefix ends at the last dot, not the first
(This used to be commit 91a3ccd3e790f980421c1ee93388e19e87026b29)
2002-04-11 14:20:18 +00:00
Andrew Tridgell
1ed0c5ea70 a few debug statements (disabled)
(This used to be commit 582f753eac7a111a93a8d6c049398a0998af848f)
2002-04-11 14:03:30 +00:00
Andrew Tridgell
4c889cb8b6 don't treat '.' as FLAG_ASCII, instead handle it separately
(This used to be commit ecdddd674f2ffad16eaa01a68c9c91ff3b355b3f)
2002-04-11 13:35:28 +00:00
Andrew Tridgell
bf9cb3c5f3 - tidier flag checking code
- finished the is_mangled() function
(This used to be commit 128bec2071d640c775b58322256ac6bb03363741)
2002-04-11 12:14:55 +00:00
Andrew Tridgell
ef88357403 added some more comments
(This used to be commit 8d6f2e239940cbac44f6f0e9d584a47553acbc56)
2002-04-11 11:46:42 +00:00
Andrew Tridgell
b1f04740ad some optimisations to the new mangling system
(This used to be commit 30b35d0c1f41f72ebe230905f76db8807802a6cc)
2002-04-11 10:52:59 +00:00
Andrew Tridgell
714518e550 this adds a completely new hash based mangling scheme
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)
2002-04-11 09:56:38 +00:00