r2552: Character set conversion and string handling updates.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 23 Sep 2004 00:51:45 +0000 (00:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:05 +0000 (12:59 -0500)
commit9a9dcc7250ccd4544cb797c15b3bc3dfbb760be0
tree35948c622b3ba1657fafc7f498c8674c0220e658
parent70c88af1f909a7dcf65293da0ddd1e13ff53a9d5
r2552: Character set conversion and string handling updates.

The intial motivation for this commit was to merge in some of the
bugfixes present in Samba3's chrcnv and string handling code into
Samba4.  However, along the way I found a lot of unused functions, and
decided to do a bit more...

The strlen_m code now does not use a fixed buffer, but more work is
needed to finish off other functions in str_util.c.  These fixed
length buffers hav caused very nasty, hard to chase down bugs at some
sites.

The strupper_m() function has a strupper_talloc() to replace it (we
need to go around and fix more uses, but it's a start).  Use of these
new functions will avoid bugs where the upper or lowercase version of
a string is a different length.

I have removed the push_*_allocate functions, which are replaced by
calls to push_*_talloc.  Likewise, pstring and other 'fixed length'
wrappers are removed, where possible.

I have removed the first ('base pointer') argument, used by push_ucs2,
as the Samba4 way of doing things ensures that this is always on an
even boundary anyway.  (It was used in only one place, in any case).
(This used to be commit dfecb0150627b500cb026b8a4932fe87902ca392)
12 files changed:
source4/lib/charcnv.c
source4/lib/util_str.c
source4/lib/util_unistr.c
source4/libcli/auth/ntlmssp_parse.c
source4/libcli/raw/rawrequest.c
source4/libcli/util/smbencrypt.c
source4/librpc/ndr/ndr_basic.c
source4/ntvfs/print/vfs_print.c
source4/smb_server/request.c
source4/smb_server/trans2.c
source4/torture/basic/scanner.c
source4/torture/rpc/netlogon.c