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

85 Commits

Author SHA1 Message Date
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.
-
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
-
Jeremy Allison
28a0bc5f57 AS/U on a sparc now joins and authenticates against a Samba PDC !
Jeremy.
-
Jeremy Allison
e7ecb9410f Fixed reading of strings from big-endian RPC clients.
Jeremy.
-
Andrew Tridgell
18ede716d1 make ascii_to_unistr always use little-endian. This fn is never used
except in my code so I know this is safe.

otherwise unicode client lib doesn't work on big-endian hosts
-
Andrew Tridgell
e1a04e621f initial client side unicode support (needed for netapp filer)
I've currently got this code disabled by default as it is
incomplete. You enable it by setting a USE_UNICODE environment
variable. Once the support is complete this check will be removed and
the CAP_UNICODE capability bit will be the sole determination of
whether the client library code uses unicode

right now I have converted session_setup and tconx. I will do more fns
over the next few days.

see clistr.c for the new client side string interface. Luckily it
tends to make the code smaller and neater while adding unicode
support.
-
Jeremy Allison
56a93567a1 Removed uninitialised variable.
Jeremy.
-
Jeremy Allison
a83702c99f A couple more UMR fixes.
Jeremy.
-
Jeremy Allison
ce4f461965 Never free anything in the rpc_parse/prs_XXX functions. Do it in the enclosing
function.
lib/util_unistr.c: Check lengths *before* reading source - prevent uninitialised
memory reads.
Jeremy.
-
Jean-François Micouleau
69fe739303 lib/util_unistr.c:
rewrote unistr2_to_ascii() to correct a bug seen on SGI boxes.

rpc_parse/parse_misc.c:
rpc_parse/parse_prs.c:
        rewrote of BUFFER5 handling to NOT byteswap when it was already in
        network byte order.

rpc_parse/parse_samr.c:
        cleanup of samr_io_q_lookup_domain(), remove the over-parsing by 2
        bytes.

rpc_server/srv_lsa.c:
        UNISTR2 strings need to be NULL terminated to pleased W2K.

rpc_server/srv_spoolss_nt.c:
        use snprintf instead of safe_strcpy as we want the string
        truncated at 32 chars.


That should fix SUN and SGI box not able to act as printserver and the
problem with joining from a W2K wks.

        J.F.
-
Tim Potter
ec74fdc631 Use lp_codepagedir() instead of CODEPAGEDIR when loading the unicode map.
Found by Joseph Cheek <joseph@cheek.com>
-
Jeremy Allison
443293a065 Fixed nasty size wrong bug spotted by the eagle eyes of
JF :-).
Jeremy.
-
Jeremy Allison
d131ad1ce3 Adding Herb's compile warning fixes to HEAD.
Jeremy.
-
Jeremy Allison
b40191d271 utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.
mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>.
jeremy.
-
Gerald Carter
8e95aae170 fixed unistr_to_ascii to deal with NULL src strings
jerry
-
Gerald Carter
cfa4c878a2 Deal will NULL UNISTR in unistr_to_ascii
jerry
-
Gerald Carter
61d2aad5dc More rpcclient merge issues:
* fixes some readline bugs from the merge
        * first attempt at commands (spoolenum almost works)
        * no changes to existing functions in HEAD; only additions
          of new functions.  I'll weed out what I can as I go.




--jerry
-
Jeremy Allison
edaf49c66d lib/util_unistr.c: Off-by-one fix for dos_PutUniStr from John Reilly jreilly@hp.com.
Memory leak fix for new sec_ctx code (sorry Tim :-).
Jeremy.
-
Jeremy Allison
de99011bf3 lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.
Removed unistr_to_ascii() as it was never used.
printing/nt_printing.c: Removed "DUMMY.XX" files.
rpc_server/srv_spoolss_nt.c: Use dos_PutUniCode() instead of ascii_to_unistr().
							Attempted to fix the "return value" size code based on J.F's
							comments. This needs looking at.
Jeremy.
-
Jeremy Allison
c2099cfb03 Getting back to a compilable state (not there yet but close).
Added patches for random -> sys_random.
Added set_effective_xxx patches for AFS code.
Memory allocation changes in spoolss code.
Jeremy.
-
Luke Leighton
f46c4fe876 unistr_to_dos not unistr_to_ascii -
Jeremy Allison
eefbfb5e16 Added unicode_to_dos_char() function to address converting single UNICODE
characters to one or more DOS codepage characters.
Jeremy.
-
Jeremy Allison
1ed146467e lib/util_unistr.c:
libsmb/clilist.c:
rpc_server/srv_spoolss_nt.c:
smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion.
msdfs/msdfs.c: Removed stub unistr_to_dos.
libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and
					don't add any security.
Jeremy.
-
Andrew Tridgell
03e9cea004 - removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.

- moved the stat cache code into statcache.c

- fixed the uint16 alignment requirements of ascii_to_unistr() and
  unistr_to_ascii()

- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
  unicode always (at least thats what NT4 does)

- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
  crash as much
-