From f0d3a44ffaac2ec5b3299f092d1334d5ada015f2 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 22 Oct 1998 22:54:00 +0000 Subject: 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) --- source3/utils/rpctorture.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 @@ -94,6 +94,36 @@ static void rpcclient_stop(void) cli_shutdown(smb_cli); } +/**************************************************************************** + 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. ****************************************************************************/ @@ -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); -- cgit