X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=source3%2Futils%2Frpctorture.c;h=118be4d598389d9986063bbf244e6b1adbeb15d2;hp=d1f0063a437f44cb05f9ede4a49cdcd8e489b7b5;hb=f0d3a44ffaac2ec5b3299f092d1334d5ada015f2;hpb=a0512ce5ff104bd2d2d11b3e3167d214615a9fbf;ds=sidebyside diff --git a/source3/utils/rpctorture.c b/source3/utils/rpctorture.c index d1f0063a437..118be4d5983 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);