1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-10 04:23:50 +03:00
Commit Graph

133 Commits

Author SHA1 Message Date
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Andrew Tridgell
53bfcd478a - added LOCALE patch from vorlon@debian.org (Steve Langasek) (bug #122)
- changed --enable-developer debug to use -gstabs as it makes the
  samba binaries about 10x smaller and is still quite functional for
  samba debugging
-
Andrew Tridgell
382b9b806b reverted locale patch put in by jht (originally from vorlon).
There are lots of things wrong with this patch, including:

1) it overrides a user chosen configuration option

2) it adds lots of complexity inside a loop when a tiny piece of code
   outside the loop would do the same thing

3) it does no error checking, and is sure to crash on some systems

If you want this functionality then try something like this at the end
of charset_name():

#ifdef HAVE_NL_LANGINFO
	if (strcasecmp(ret, "LOCALE") == 0) {
		const char *ln = nl_langinfo(CODESET);
		if (ln) {
			DEBUG(5,("Substituting charset '%s' for LOCALE\n", ln));
			return ln;
		}
	}
#endif

then users can set 'display charset = LOCALE' to get the locale based
charset. You could even make that the default for systems that have
nl_langinfo().
-
John Terpstra
1e445fb422 Patch from vorlon@debian.org, see bugzilal #122
Samba should preferentially use the locale information from the native system,
and only fall back on 'display charset' if this is unavailable or unsupported.
-
Jeremy Allison
8aa5f7a65c Fix for valgrind - when doing a srvstr_push we must zero fill
any extra bytes, not clobber region them - otherwise valgrind
thinks they are invalid on send() or write().
Jeremy.
-
Andrew Tridgell
791a4cc7cf - the 8.3 name in BOTH_DIRECTORY_INFO is supposed to be always unicode
(to match win2003 behaviour)

- added the STR_TERMINATE_ASCII flag from samba4 so we can get the
  string termination right for the case where it is supposed to be
  non-terminated for UCS2 and terminated when ASCII
-
Gerald Carter
83bb84f131 fixed bug #75; add check for non-zero destlen -
Tim Potter
05a684b3be Another attempt at undoing my bogus patch 1.55.2.19 -
Tim Potter
42d0414ed2 Whoops - that wasn't a whitespace syncup after all. -
Tim Potter
7fd7af121e Whitespace syncup. -
Andrew Bartlett
df10aee451 Patch by Metze to ensure that we always at least initialize our output string
for rpc_pull_string.  If we had a NULL or zero-length string, we would use
uninitialised data in the result string.

Andrew Bartlett
-
Andrew Bartlett
341d6affa4 Merge (HEAD->3.0) mbp's fixes to our charcnv code - don't use a staic buffer,
which can restrict things like unix_strupper() to 512 byte strings.

Andrew Bartlett
-
Jeremy Allison
df214d1881 Merge across tridge's Realloc fix.
Jeremy.
-
Martin Pool
d0b2c5d7ba Export lazy_initialize_conv so that it can be called from
check_dos_char.

init_iconv: Call init_doschar_table when reinitializing conversions.
-
Martin Pool
0ee80a9018 lazy_initialize_conv: Remove redundant call to init_valid_table,
because init_iconv calls it for us.

init_iconv: Add documentation about how this is reintialized when
configuration is reloaded.
-
Jelmer Vernooij
5310447ec6 Patch from Samuel Thibault to convert messages from dos to unix charset
when sending(and vice versa when receiving).
-
Jeremy Allison
86e3eddac6 Merge in the developer string options from HEAD. We need to ensure 3.0
is as stable as possible in the string department and some pain now
will help later :-).
Jeremy.
-
Martin Pool
3761f8ebe3 Merge documentation from HEAD -
Andrew Bartlett
9ef0d40c3f Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
-
Martin Pool
822f6c2f38 Add comment about Samba character sets, from explanation by abartlet. -
Jeremy Allison
81437e2ad0 Merge from HEAD - pull_ucs2_talloc() should pull to a char**, not a void**
Jeremy.
-
Andrew Bartlett
e9f56a157b Merge of signed/unsigned fixes from HEAD. -
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Jeremy Allison
9a6c694619 Fix all returns to be size_t (they are all unsigned). Fixup strlen being
done on ucs2 strings.
Jeremy.
-
Gerald Carter
3de09e5cf1 syncing up with HEAD. Seems to be a lot of differences creeping in
(i ignored the new SAMBA stuff, but the rest of this looks like it should
have been merged already).
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
3928578b52 sync 3.0 branch with head -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Andrew Bartlett
ce7990b4a4 add {push,pull}_ucs2{allocate,talloc}() functions.
Andrew Bartlett
-
Andrew Bartlett
9ab144810e Patch from Hasch@t-online.de (Juergen Hasch) to add allocate and talloc
push/pull utf8 functions.  To be used for international ADS support.

Andrew Bartlett
-
Andrew Bartlett
ba2570f518 Fix up the pull_utf8_fstring/pstring functions, and add their push eqivilants.
patch by Hasch@t-online.de (Juergen Hasch)

Andrew Bartlett
-
Andrew Bartlett
2a30960276 This should kill off the 'cannot convert' error messages on non-iconv hosts. -
Andrew Bartlett
fa9d3060ff Patch from Hasch@t-online.de (Juergen Hasch) to add UTF-8 as an explict
character set for conversion.  To be used in Winbind and the 'net ads'
commands.

Andrew Bartlett
-
Simo Sorce
e3bb686745 better debug messages! -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Martin Pool
7f7d22880d We have to do some initialization before the string conversion
routines can work.  The code was copied into both convert_string and
convert_string_allocate -- I split it into a little static function,
and removed an apparently duplicate call to init_valid_table().
-
Andrew Tridgell
65e857b36e more irix -64 portability fixes -
Andrew Tridgell
0cfd0a5e54 much better auto-init of valid_table[]. This should just about remove
the need for valid.dat
-
Andrew Tridgell
23ef22f117 fixed some krb5 ifdefs -
Martin Pool
a875b3a6e7 More better now. -
Martin Pool
6ddd8e7bf6 Quieten gcc const warning.
doxyfy.
-
Simo Sorce
023514a0b6 messed up with patches, this should be the right one,
sorry
-
Simo Sorce
8bb5cb27c2 some bugfix and new functions,
modified mangle.c to use mosltly acnv_????() functions.
this should make also build farm happy
-
Simo Sorce
64dde3b64f fixed, moved and added some functions
note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c
-
Simo Sorce
8b494b0be3 add convert_string_allocate() function -
Simo Sorce
ee19f7efb6 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.
-
Andrew Bartlett
f019bed766 More spelling and grammer from Vance. <vance@digital-host.net>
Thanks!

Andrew Bartlett
-
Herb Lewis
51cb4411df get rid of compiler warnings (casts and delete unused variables) -
Andrew Tridgell
1c221994f1 switched over to a new method of handling uppercase/lowercase mappings
for unicode strings. The new method relies on 3 files that are mmap'd
at startup to provide the mapping tables. The upcase.dat and
lowcase.dat tables should be the same on all systems. The valid.dat
table says what characters are valid in 8.3 names, and differs between
systems. I'm committing the japanese valid.dat here, in future we need
some way of automatically installing and choosing a appropriate table.

This commit also adds my mini tdb based gettext replacement in
intl/lang_tdb.c. I have not enabled this yet and have not removed the
old gettext code as the new code is still being looked at by Monyo.

Right now the code assumes that the upcase.dat, lowcase.dat and
valid.dat files are installed in the Samba lib directory. That is not
a good choice, but I'll leave them there until we work out the new
install directory structure for Samba 3.0.

simo - please look at the isvalid_w() function and think about using
it in your new mangling code. That should be the final step to
correctly passing the chargen test code from monyo.
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -