diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/basic/scanner.c | 12 | ||||
-rw-r--r-- | source4/torture/rpc/netlogon.c | 8 |
2 files changed, 9 insertions, 11 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, ¶m[6], fname, sizeof(pstring)-7, STR_TERMINATE|STR_UNICODE); + param_len += push_string(¶m[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, ¶m[6], "\\newfile.dat", sizeof(pstring)-7, STR_TERMINATE|STR_UNICODE); + param_len += push_string(¶m[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, ¶m[2], "\\testdir", sizeof(pstring)-3, STR_TERMINATE|STR_UNICODE); + param_len += push_string(¶m[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, ¶m[6], fname, -1, STR_TERMINATE | STR_UNICODE); + param_len += push_string(¶m[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, ¶m[6], "\\newfile.dat", -1, STR_TERMINATE | STR_UNICODE); + param_len += push_string(¶m[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, ¶m[2], "\\testdir", -1, STR_TERMINATE | STR_UNICODE); + param_len += push_string(¶m[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); diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 6e4f85be40..16ba679be9 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -796,18 +796,16 @@ static BOOL test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_brea nt_response = data_blob_talloc(samlogon_state->mem_ctx, unicodepw, strlen_w(((void *)unicodepw))*sizeof(smb_ucs2_t)); - password = strdup_upper(samlogon_state->password); + password = strupper_talloc(samlogon_state->mem_ctx, samlogon_state->password); if ((convert_string_talloc(samlogon_state->mem_ctx, CH_UNIX, CH_DOS, password, strlen(password)+1, - (const void**)&dospw)) == -1) { - DEBUG(0, ("push_ascii_allocate failed!\n")); + (void**)&dospw)) == -1) { + DEBUG(0, ("convert_string_talloc failed!\n")); exit(1); } - SAFE_FREE(password); - lm_response = data_blob_talloc(samlogon_state->mem_ctx, dospw, strlen(dospw)); nt_status = check_samlogon(samlogon_state, |