summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-09-23 00:51:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:05 -0500
commit9a9dcc7250ccd4544cb797c15b3bc3dfbb760be0 (patch)
tree35948c622b3ba1657fafc7f498c8674c0220e658 /source4/torture/basic
parent70c88af1f909a7dcf65293da0ddd1e13ff53a9d5 (diff)
downloadsamba-9a9dcc7250ccd4544cb797c15b3bc3dfbb760be0.tar.gz
samba-9a9dcc7250ccd4544cb797c15b3bc3dfbb760be0.tar.bz2
samba-9a9dcc7250ccd4544cb797c15b3bc3dfbb760be0.zip
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)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/scanner.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index f8a0539f1e..f4ebd5dacd 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -202,7 +202,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(NULL, &param[6], fname, sizeof(pstring)-7, STR_TERMINATE|STR_UNICODE);
+ param_len += push_string(&param[6], fname, sizeof(pstring)-7, STR_TERMINATE|STR_UNICODE);
status = try_trans2_len(cli, "fname", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -213,7 +213,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(NULL, &param[6], "\\newfile.dat", sizeof(pstring)-7, STR_TERMINATE|STR_UNICODE);
+ param_len += push_string(&param[6], "\\newfile.dat", sizeof(pstring)-7, STR_TERMINATE|STR_UNICODE);
status = try_trans2_len(cli, "newfile", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -225,7 +225,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(NULL, &param[2], "\\testdir", sizeof(pstring)-3, STR_TERMINATE|STR_UNICODE);
+ param_len += push_string(&param[2], "\\testdir", sizeof(pstring)-3, STR_TERMINATE|STR_UNICODE);
status = try_trans2_len(cli, "dfs", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -441,7 +441,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(NULL, &param[6], fname, -1, STR_TERMINATE | STR_UNICODE);
+ param_len += push_string(&param[6], fname, -1, STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "fname", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -452,7 +452,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(NULL, &param[6], "\\newfile.dat", -1, STR_TERMINATE | STR_UNICODE);
+ param_len += push_string(&param[6], "\\newfile.dat", -1, STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "newfile", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -464,7 +464,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(NULL, &param[2], "\\testdir", -1, STR_TERMINATE | STR_UNICODE);
+ param_len += push_string(&param[2], "\\testdir", -1, STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "dfs", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);