svn commit: samba r4973 - in branches/SAMBA_4_0/source/torture: .
rap
tpot at samba.org
tpot at samba.org
Tue Jan 25 01:22:00 GMT 2005
Author: tpot
Date: 2005-01-25 01:21:59 +0000 (Tue, 25 Jan 2005)
New Revision: 4973
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4973
Log:
Add a RAP scanner to smbtorture. win2k has call numbers 0-215 although
the cifs tr lists 250-318 also.
Modified:
branches/SAMBA_4_0/source/torture/rap/rap.c
branches/SAMBA_4_0/source/torture/torture.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/rap/rap.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rap/rap.c 2005-01-25 01:19:02 UTC (rev 4972)
+++ branches/SAMBA_4_0/source/torture/rap/rap.c 2005-01-25 01:21:59 UTC (rev 4973)
@@ -2,6 +2,7 @@
Unix SMB/CIFS implementation.
test suite for various RAP operations
Copyright (C) Volker Lendecke 2004
+ Copyright (C) Tim Potter 2005
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -183,8 +184,10 @@
trans.in.trans_name = "\\PIPE\\LANMAN";
NDR_CHECK(ndr_push_uint16(params, call->callno));
- NDR_CHECK(ndr_push_string(params, NDR_SCALARS, call->paramdesc));
- NDR_CHECK(ndr_push_string(params, NDR_SCALARS, call->datadesc));
+ if (call->paramdesc)
+ NDR_CHECK(ndr_push_string(params, NDR_SCALARS, call->paramdesc));
+ if (call->datadesc)
+ NDR_CHECK(ndr_push_string(params, NDR_SCALARS, call->datadesc));
param_blob = ndr_push_blob(call->ndr_push_param);
NDR_CHECK(ndr_push_bytes(params, param_blob.data,
@@ -445,3 +448,28 @@
talloc_destroy(mem_ctx);
return ret;
}
+
+BOOL torture_rap_scan(void)
+{
+ struct smbcli_state *cli;
+ uint16 callno;
+
+ if (!torture_open_connection(&cli)) {
+ return False;
+ }
+
+ for (callno = 0; callno < 0xffff; callno++) {
+ struct rap_call *call = new_rap_cli_call(callno);
+ NTSTATUS result;
+
+ result = rap_cli_do_call(cli, cli, call);
+
+ if (NT_STATUS_EQUAL(result, NT_STATUS_INVALID_PARAMETER))
+ printf("callno %d is RAP call\n", callno);
+
+ destroy_rap_call(call);
+ }
+
+ torture_close_connection(cli);
+ return True;
+}
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c 2005-01-25 01:19:02 UTC (rev 4972)
+++ branches/SAMBA_4_0/source/torture/torture.c 2005-01-25 01:21:59 UTC (rev 4973)
@@ -2380,6 +2380,7 @@
{"SCAN-CASETABLE", torture_casetable, 0},
{"SCAN-PIPE_NUMBER", run_pipe_number, 0},
{"SCAN-IOCTL", torture_ioctl_test, 0},
+ {"SCAN-RAP", torture_rap_scan, 0},
/* rpc testers */
{"RPC-LSA", torture_rpc_lsa, 0},
More information about the samba-cvs
mailing list