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

96 Commits

Author SHA1 Message Date
Ralph Boehme
564b0b5be3 smbdotconf: mark "mangling method" with constant="1"
From the manpage:

  ... controls the algorithm used for the generating
  the mangled names. Can take two different values, "hash" and
  "hash2". ...

No need for variable substitution support in this option, declare it const.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-11-27 10:25:37 +00:00
Ralph Boehme
19eae53773 s3/smbd: convert "mangled names" option to an enum
This is in preparation of adding an additional setting for this
option. No change in behaviour by this commit, that comes in the next
one.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-01-09 19:31:20 +01:00
Garming Sam
cfa64d20df param: rename lp function and variable from 'defaultcase' to 'default_case'
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:10 -08:00
Garming Sam
617d9acf70 param: rename lp function and variable from 'manglednames' to 'mangled_names'
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:09 -08:00
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
184339825d s3-build: include mangle.h only where needed.
Guenther
2010-08-26 00:20:29 +02:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
7f2cf6b166 s3:smbd: make mangle_fns const
metze
2009-01-08 12:22:17 +01:00
Volker Lendecke
f120038a1f Fix bug 5860: safe_strcpy gives a nasty error message for overlong strings
Thanks to Robert Dahlem <Robert.Dahlem@gmx.net> for reporting this!
2008-11-02 10:41:09 +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
12f61e09d9 r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
(This used to be commit 7f0db75fb0)
2007-10-10 12:30:41 -05:00
Jeremy Allison
132ee3990a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
(This used to be commit dee8beba7a)
2007-10-10 12:30:32 -05:00
Volker Lendecke
ac51ffb77b r23866: Fix a 1-byte buffer overrun
(This used to be commit 2ed83d36fe)
2007-10-10 12:28:36 -05:00
Jeremy Allison
f01698027d r23844: Add patch series from Volker (after review and consultation).
0001-Save-a-strdup-in-stat_cache_add.patch
0002-Use-ISDOT-and-ISDOTDOT.patch
0003-Move-fname_equal-around.patch
0004-unix_convert-pstring-dirpath-char.patch
0005-Ignore-.o-files.patch
0006-Get-rid-of-pstrings-inside-unix_convert.patch
0007-revert-pstring-unix_convert.patch
0008-Make-name-an-allocated-pstring-inside-unix_convert.patch
0009-Pass-explicit-pstring-to-mangle_check_cache.patch
0010-Don-t-overwrite-orig_path-unnecessarily.patch
0011-Defer-allocating-name.patch
0012-Make-sure-dirpath-is-always-correctly-allocated.patch
0013-Remove-one-pstring-dependency-in-unix_convert.patch
0014-Remove-more-name-pstring-dependencies.patch
0015-Hide-the-nasty-API-of-mangle_check_cache-in-mangle_c.patch
0016-name-does-not-need-to-be-pstring-size-anymore.patch
0017-Make-use-of-ISDOT-and-ISDOTDOT.patch
0018-Remove-pstring-from-stat_cache_lookup.patch
0019-Add-my-copyright.patch

To remove pstrings from statcache and unix_convert.

Jeremy.
(This used to be commit ea6ef36889)
2007-10-10 12:28:34 -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
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
7e509e9b99 r7842: With the patch I sent Steve yesterday this gives us complete POSIX pathnames.
ie. files containing : and \ can be accessed from Linux.
Jeremy.
(This used to be commit e9b8d23d61)
2007-10-10 10:57:59 -05:00
Jeremy Allison
02e3717ee9 r6625: Remove another global variable left over from a long time ago (magic char).
Jeremy.
(This used to be commit b1bfa9cb37)
2007-10-10 10:56:47 -05:00
Gerald Carter
0c6d7f28d6 r1570: merging changes from 3.0.5
(This used to be commit 430cf63b91)
2007-10-10 10:52:15 -05:00
Jeremy Allison
e0da56a848 r570: Remove lots of globals to handle case issues - move them
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 578a508509)
2007-10-10 10:51:30 -05:00
Andrew Bartlett
ad0d6509a7 Merge from HEAD:
- 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 10b53d7c6f)
2003-03-17 22:56:13 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
41b8137169 don't try to return a void
(This used to be commit 51b4de0ae3)
2002-04-11 14:59:27 +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 bb173c1a7e)
2002-04-11 09:56:38 +00:00
Andrew Tridgell
9cd0306baa This split the mangling code up to allow for the possibility of multiple
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 be23d87a17)
2002-04-11 02:20:56 +00:00
Simo Sorce
9c1665b299 a fix yet committed to 2.2 sometimes ago and reintroduced here!
(This used to be commit aff7073dab)
2002-04-08 09:29:28 +00:00
Andrew Bartlett
c21ff8f762 Reintroduce the 2.2 name mangling code, until we get are more flexible solution.
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 ad8aa47057)
2002-04-08 01:58:44 +00:00
Andrew Bartlett
d19e06c0c6 Actually include some *information* in the mangle debug messages.
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 9c8de8c6cf)
2002-03-14 22:52:19 +00:00
Andrew Bartlett
d04aeaace9 in dos_unmangle() the only function call was to *mangle()*. Adding the
'un' dramaticly increses the functionality of this code :-).

Andrew Bartlett
(This used to be commit 15b9b63db5)
2002-02-19 06:13:16 +00:00
Simo Sorce
407cd42143 better debug messages!
(This used to be commit e3bb686745)
2002-02-04 00:59:23 +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 Bartlett
30802965d2 Fix a 'const' warning.
(This used to be commit 56be51d648)
2002-01-25 10:38:00 +00:00
Simo Sorce
2836f3fbdd micro fix :-)
(This used to be commit 8929f07a15)
2002-01-25 09:55:29 +00:00
Simo Sorce
114eaabdcb minor fixes
(This used to be commit 04f492980b)
2002-01-25 00:35:14 +00:00
Andrew Tridgell
dfed852520 handle filenames like .bashrc better in the new mangling code
(This used to be commit 05adb30eab)
2002-01-24 13:31:34 +00:00
Andrew Tridgell
0ebb29e032 removed unused function
(This used to be commit ad7afbfdea)
2001-11-24 13:58:40 +00:00
Simo Sorce
8424424471 some bugfix and new functions,
modified mangle.c to use mosltly acnv_????() functions.
this should make also build farm happy
(This used to be commit 8bb5cb27c2)
2001-11-12 00:53:34 +00:00
Simo Sorce
5d152d24a3 fixed, moved and added some functions
note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c
(This used to be commit 64dde3b64f)
2001-11-10 15:21:54 +00:00
Tim Potter
c159d0f47d Fixed compiler warnings.
(This used to be commit 54e40b2702)
2001-11-05 00:42:33 +00:00
Simo Sorce
740d6f5dd6 a big one:
- 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 ee19f7efb6)
2001-11-04 18:26:53 +00:00
Simo Sorce
f93a8a3f90 - fix string len for an ucs2_to_dos function as any ucs2 char may be up to 4 dos hars...
- addedd ascii compatibility functions
(This used to be commit 8b9302b707)
2001-10-29 11:37:42 +00:00
Simo Sorce
7433cb7c75 fix a logic bug on max size of a returned string,
this fixes also the bug with file renaming.
(This used to be commit 5246d7609c)
2001-10-28 19:19:57 +00:00
Tim Potter
a9cf7fb2da Fixed compile warning.
(This used to be commit 320c21b7a9)
2001-10-26 22:58:32 +00:00
Herb Lewis
3ea3492713 get rid of compiler warnings (casts and delete unused variables)
(This used to be commit 51cb4411df)
2001-10-23 19:10:30 +00:00
Simo Sorce
b0152aaea0 ops, some testing code in compat function let only mangled name come back.
(This used to be commit e48eb7b572)
2001-10-22 23:25:11 +00:00
Simo Sorce
4e5eb48b07 lets try the new mangling code
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 1ffacd2068)
2001-10-22 06:53:28 +00:00
Simo Sorce
b7bd7ea153 introduce mangle backward compatibility functions
add talloc_asprintf()
(This used to be commit 7264d611ef)
2001-10-13 12:47:59 +00:00