summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-29 20:04:12 +0200
committerGünther Deschner <gd@samba.org>2010-05-03 20:55:42 +0200
commit99e3b9a3672d4d847aea5e1ca446f543f810c84c (patch)
treeba0654117d6d5cf346ff56da85c2c2fe628389d4 /source4
parentdda0ebd0ac24f31e32fe3c145137641ae813afff (diff)
downloadsamba-99e3b9a3672d4d847aea5e1ca446f543f810c84c.tar.gz
samba-99e3b9a3672d4d847aea5e1ca446f543f810c84c.tar.bz2
samba-99e3b9a3672d4d847aea5e1ca446f543f810c84c.zip
s4-smbtorture: add rap_cli_expect_extra_format().
Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rap/rap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 0542379913..26d503a59c 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -67,6 +67,7 @@ struct rap_call {
uint16_t callno;
char *paramdesc;
const char *datadesc;
+ const char *auxdatadesc;
uint16_t status;
uint16_t convert;
@@ -95,6 +96,7 @@ static struct rap_call *new_rap_cli_call(TALLOC_CTX *mem_ctx, struct smb_iconv_c
call->paramdesc = NULL;
call->datadesc = NULL;
+ call->auxdatadesc = NULL;
call->ndr_push_param = ndr_push_init_ctx(mem_ctx, iconv_convenience);
call->ndr_push_param->flags = RAPNDR_FLAGS;
@@ -183,6 +185,11 @@ static void rap_cli_expect_format(struct rap_call *call, const char *format)
call->datadesc = format;
}
+static void rap_cli_expect_extra_format(struct rap_call *call, const char *format)
+{
+ call->auxdatadesc = format;
+}
+
static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr,
uint16_t convert, const char **dest)
{
@@ -246,6 +253,9 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree,
NDR_RETURN(ndr_push_bytes(params, param_blob.data,
param_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);