[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Mon May 10 16:59:29 MDT 2010
The branch, master has been updated
via 9e643f0... s4-smbtorture: fix smbcli_rap_netuserpasswordset2().
via 36b0fed... s4-smbtorture: fix smbcli_rap_netoemchangepassword.
via fc6a229... s4-smbtorture: correctly fill in trans.in.data in rap_cli_do_call().
from 5642188... s4:password_hash LDB module - we might not have a cleartext password at all
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9e643f0784c9af1c60b3fb879a46059a1355862b
Author: Günther Deschner <gd at samba.org>
Date: Mon May 10 23:41:08 2010 +0200
s4-smbtorture: fix smbcli_rap_netuserpasswordset2().
Guenther
commit 36b0fed567bc50324559bd2f72b51913eb4ba5d6
Author: Günther Deschner <gd at samba.org>
Date: Mon May 10 21:48:10 2010 +0200
s4-smbtorture: fix smbcli_rap_netoemchangepassword.
Guenther
commit fc6a22983b695e50f5da19000031be64764b32b7
Author: Günther Deschner <gd at samba.org>
Date: Tue May 11 00:53:41 2010 +0200
s4-smbtorture: correctly fill in trans.in.data in rap_cli_do_call().
Guenther
-----------------------------------------------------------------------
Summary of changes:
source4/torture/rap/rap.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index c116dde..4e490bc 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -148,7 +148,6 @@ static void rap_cli_push_sendbuf(struct rap_call *call, int len)
rap_cli_push_paramdesc(call, 's');
rap_cli_push_paramdesc(call, 'T');
ndr_push_uint16(call->ndr_push_param, NDR_SCALARS, len);
- call->rcv_datalen = len;
}
static void rap_cli_push_param(struct rap_call *call, uint16_t val)
@@ -224,7 +223,9 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
{
NTSTATUS result;
DATA_BLOB param_blob;
+ DATA_BLOB data_blob;
struct ndr_push *params;
+ struct ndr_push *data;
struct smb_trans2 trans;
params = ndr_push_init_ctx(call, iconv_convenience);
@@ -234,6 +235,13 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
params->flags = RAPNDR_FLAGS;
+ data = ndr_push_init_ctx(call, iconv_convenience);
+
+ if (data == NULL)
+ return NT_STATUS_NO_MEMORY;
+
+ data->flags = RAPNDR_FLAGS;
+
trans.in.max_param = call->rcv_paramlen;
trans.in.max_data = call->rcv_datalen;
trans.in.max_setup = 0;
@@ -253,11 +261,15 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
NDR_RETURN(ndr_push_bytes(params, param_blob.data,
param_blob.length));
+ data_blob = ndr_push_blob(call->ndr_push_data);
+ NDR_RETURN(ndr_push_bytes(data, data_blob.data,
+ data_blob.length));
+
if (call->auxdatadesc)
NDR_RETURN(ndr_push_string(params, NDR_SCALARS, call->auxdatadesc));
trans.in.params = ndr_push_blob(params);
- trans.in.data = data_blob(NULL, 0);
+ trans.in.data = ndr_push_blob(data);
result = smb_raw_trans(tree, call, &trans);
@@ -1609,11 +1621,11 @@ NTSTATUS smbcli_rap_netuserpasswordset2(struct smbcli_tree *tree,
rap_cli_push_paramdesc(call, 'b');
rap_cli_push_paramdesc(call, '1');
rap_cli_push_paramdesc(call, '6');
- ndr_push_bytes(call->ndr_push_param, (uint8_t *)r->in.OldPassword, 16);
+ ndr_push_charset(call->ndr_push_param, NDR_SCALARS, r->in.OldPassword, 16, sizeof(uint8_t), CH_DOS);
rap_cli_push_paramdesc(call, 'b');
rap_cli_push_paramdesc(call, '1');
rap_cli_push_paramdesc(call, '6');
- ndr_push_bytes(call->ndr_push_param, (uint8_t *)r->in.NewPassword, 16);
+ ndr_push_charset(call->ndr_push_param, NDR_SCALARS, r->in.NewPassword, 16, sizeof(uint8_t), CH_DOS);
rap_cli_push_word(call, r->in.EncryptedPassword);
rap_cli_push_word(call, r->in.RealPasswordLength);
@@ -1662,11 +1674,10 @@ NTSTATUS smbcli_rap_netoemchangepassword(struct smbcli_tree *tree,
rap_cli_push_string(call, r->in.UserName);
rap_cli_push_sendbuf(call, 532);
- ndr_push_bytes(call->ndr_push_param, r->in.crypt_password, 516);
- ndr_push_bytes(call->ndr_push_param, r->in.password_hash, 16);
+ ndr_push_array_uint8(call->ndr_push_data, NDR_SCALARS, r->in.crypt_password, 516);
+ ndr_push_array_uint8(call->ndr_push_data, NDR_SCALARS, r->in.password_hash, 16);
- rap_cli_expect_format(call, "");
- rap_cli_expect_extra_format(call, "B516B16");
+ rap_cli_expect_format(call, "B516B16");
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(rap_NetOEMChangePassword, r);
--
Samba Shared Repository
More information about the samba-cvs
mailing list