1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-29 16:23:52 +03:00
Commit Graph

108 Commits

Author SHA1 Message Date
Jeremy Allison
a1e5a2a6ab r4032: Fix bug #2110 - ensure we convert to ucs2 correctly.
Jeremy.
2007-10-10 10:53:30 -05:00
Jeremy Allison
578a508509 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.
2007-10-10 10:51:30 -05:00
Jeremy Allison
7b96765c23 Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
-
Jeremy Allison
f82c273a42 Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
-
Gerald Carter
e1fac713e2 fix some warnings found by the Sun C compiler -
Andrew Bartlett
605a89493e When removing an 'unused' function, it helps to remove the 'unused' callers...
Andrew Bartlett
-
Jeremy Allison
72e382e99b Added fix for Japanese case names in statcache - these can change
size on upper casing. Based on patch from monyo@home.monyo.com.
Jeremy.
-
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
-
Martin Pool
e4ec19e03f check_dos_char: Change this to use a lazily-initialized lookup table
indicating which characters are valid dos characters.  This function
was previously quite slow because it did two unicode conversions on
every call.
-
Martin Pool
52520fda6a check_dos_char: Export this function so that it can be tested in
isolation by a test case.
-
Martin Pool
3ff4845bc4 Merge 1.100 patch from HEAD:
init_valid_table: Fix a memory leak that would lose the
dynamically-created valid table every time the configuration was
reloaded.
-
Andrew Bartlett
9ef0d40c3f Merge doxygen, signed/unsigned, const and other small fixes from HEAD to 3.0.
Andrew Bartlett
-
Jeremy Allison
e781388c59 Return 0 instead of crashing when a NULL source string is passed
to rpcstr_pull() - merge from HEAD (tpot).
Jeremy.
-
Gerald Carter
850b185a6e patches from Urban -
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Gerald Carter
619397cc90 OpenPrinter() merge from 2.2 -
Herb Lewis
6fa09ee881 must use native endian index when creating default valid.dat table so it
is the same on big and little endian systems.
-
Herb Lewis
e5d80779a3 fixed the upper/lower case table generation on big-endian machines
(tridge, using Herbs console)
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Andrew Tridgell
cc6c263993 fixed warnings on irix and crash bug on big endian machines -
Andrew Tridgell
0cfd0a5e54 much better auto-init of valid_table[]. This should just about remove
the need for valid.dat
-
Andrew Tridgell
85f04fa61d mark '.' as a valid character -
Andrew Tridgell
0216b0fca1 The beginnings of alternative backends for winbindd
This just splits off the dispinfo call behind a methods structure.
I'll split off a few more functions soon, then we will be ready for
LDAP replacement methods
-
Andrew Tridgell
624cb28271 fixed typo -
Andrew Tridgell
e6004062a5 fixed toupper_w() and friends on big-endian
this fixes the core dumps on sparc
-
Andrew Tridgell
80841f5763 2nd attempt at fixing lame char tables on big endian machines -
Andrew Tridgell
568425709d fixed lame char tables on big endian machines -
Simo Sorce
37edaeddce fixed some bugs. -
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
-
Jeremy Allison
16c5d279b9 Added missing strchr_wa.
Jeremy.
-
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 Tridgell
5dd3c7b3fb remove {} from default valid char list -
Simo Sorce
7895593929 old fixes I forgot to commit -
Andrew Tridgell
67017619af fixed lame valid table -
Andrew Tridgell
211aeffa1a fixed basic ucs2 operation on big endian boxes. Still a bit more to
do, but at least you can connect now.
-
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. -
Andrew Tridgell
57196635d9 make strupper() and strlower() not modify the string if it doesn't
need modifying

that makes constant strings OK
-
Simo Sorce
4ade36446e - the inactive core of the new mangling code that use tdb
- some more utils for unicode string manipulation
-
Herb Lewis
0f08e79030 fixes big endian unistring problems. Need to check that it didn't
break little-endian machines.
-
Tim Potter
e5b62b4961 It looks like the rpc client code in libsmb hasn't been converted to the
new internal string stuff.  The main problem is that some unicode strings
are null terminated and some aren't.  There's no rhyme or reason to it -
some pipes have 99% of the strings terminated and some have 99%
unterminated.  To avoid having to actually know the termination policy, I
propose a set of functions that take a UNISTR2* and use the length
contained there.

Added rpcstr_pull_unistr2_string() function to convert a unicode string of
dubious termination to a fstring.
-
Andrew Tridgell
1436c9f424 removed some unnecessary code -
Andrew Tridgell
f4359b5f7f fixed strrchr_m -
Jean-François Micouleau
d39d8429d1 unicode string length is twice longer ;-) -
Andrew Tridgell
debb471267 The big character set handling changeover!
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.
-
Jeremy Allison
e059fffd03 Added other_safe_chars to alpha_strcpy(). Needs testing but is a better
fix for the problem.
Jeremy.
-
Andrew Tridgell
674ee2f1d1 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
-
Jeremy Allison
24eea8a309 Fix from TAKAHASHI Motonobu <monyo@samba.gr.jp> for multibyte conversion
problems.
Jeremy.
-