summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-22 22:54:00 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-22 22:54:00 +0000
commitf0d3a44ffaac2ec5b3299f092d1334d5ada015f2 (patch)
tree77316bcc03b29f8bc315c50573742719eae3fa83 /source3
parent6f6125364866d29edc90c58ce4b30a74b253fe37 (diff)
downloadsamba-f0d3a44ffaac2ec5b3299f092d1334d5ada015f2.tar.gz
samba-f0d3a44ffaac2ec5b3299f092d1334d5ada015f2.tar.bz2
samba-f0d3a44ffaac2ec5b3299f092d1334d5ada015f2.zip
enumeration tests (files, sessions, shares, connections).
hey, you can see how many connections succeed while the rpctorture command is running! (This used to be commit c1bf8f109932a3387fa7b8b4265a3eda52d3e0a3)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/rpctorture.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/utils/rpctorture.c b/source3/utils/rpctorture.c
index d1f0063a43..118be4d598 100644
--- a/source3/utils/rpctorture.c
+++ b/source3/utils/rpctorture.c
@@ -97,6 +97,36 @@ static void rpcclient_stop(void)
/****************************************************************************
log in as an nt user, log out again.
****************************************************************************/
+void run_enums_test(int num_ops, struct client_info *cli_info, struct cli_state *cli)
+{
+ int i;
+
+ /* establish connections. nothing to stop these being re-established. */
+ rpcclient_connect(cli_info);
+
+ DEBUG(5,("rpcclient_connect: cli->fd:%d\n", cli->fd));
+ if (cli->fd <= 0)
+ {
+ fprintf(out_hnd, "warning: connection could not be established to %s<%02x>\n",
+ cli_info->dest_host, cli_info->name_type);
+ return;
+ }
+
+ for (i = 0; i < num_ops; i++)
+ {
+ cmd_srv_enum_sess(cli_info);
+ cmd_srv_enum_shares(cli_info);
+ cmd_srv_enum_files(cli_info);
+ cmd_srv_enum_conn(cli_info);
+ }
+
+ rpcclient_stop();
+
+}
+
+/****************************************************************************
+ log in as an nt user, log out again.
+****************************************************************************/
void run_ntlogin_test(int num_ops, struct client_info *cli_info, struct cli_state *cli)
{
pstring cmd;
@@ -509,6 +539,8 @@ enum client_action
pwd_make_lm_nt_16(&(smb_cli->pwd), password); /* generate 16 byte hashes */
}
+ create_procs(nprocs, numops, &cli_info, smb_cli, run_enums_test);
+
if (password[0] != 0)
{
create_procs(nprocs, numops, &cli_info, smb_cli, run_ntlogin_test);