summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-07 20:23:41 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-07 20:23:41 +0000
commit9c848ec329a6ce86cffb2304746590116d9292f0 (patch)
treeafdaf2f6b16df02b5183618a5d9e422bddfedfe7 /source3/utils
parent312f4f3960a9b1938ae133678cd8567be1331b99 (diff)
downloadsamba-9c848ec329a6ce86cffb2304746590116d9292f0.tar.gz
samba-9c848ec329a6ce86cffb2304746590116d9292f0.tar.bz2
samba-9c848ec329a6ce86cffb2304746590116d9292f0.zip
removed nt_pipe_fnum from struct cli_state. need to be able to call
LsaLookupSids etc from within SamrQueryAliasMembers, for example. fnum is now a parameter to client functions. thanks to mike black for starting the ball rolling. (This used to be commit bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/rpctorture.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/source3/utils/rpctorture.c b/source3/utils/rpctorture.c
index 3b2a497ad4..c08db239b7 100644
--- a/source3/utils/rpctorture.c
+++ b/source3/utils/rpctorture.c
@@ -275,6 +275,7 @@ BOOL do_random_rpc(struct cli_state *cli, int max_len)
static void random_rpc_pipe_enc(char *pipe_name, struct client_info *cli_info,
int numops)
{
+ uint16 nt_pipe_fnum;
int i;
DEBUG(0,("starting random rpc test on %s (encryped)\n", pipe_name));
@@ -300,7 +301,7 @@ static void random_rpc_pipe_enc(char *pipe_name, struct client_info *cli_info,
for (i = 1; i <= numops * 100; i++)
{
/* open session. */
- cli_nt_session_open(smb_cli, pipe_name);
+ cli_nt_session_open(smb_cli, pipe_name, &nt_pipe_fnum);
do_random_rpc(smb_cli, 1024);
if (i % 500 == 0)
@@ -309,7 +310,7 @@ static void random_rpc_pipe_enc(char *pipe_name, struct client_info *cli_info,
}
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
}
/* close the rpc pipe */
@@ -322,6 +323,7 @@ static void random_rpc_pipe_enc(char *pipe_name, struct client_info *cli_info,
static void random_rpc_pipe(char *pipe_name, struct client_info *cli_info,
int numops)
{
+ uint16 nt_pipe_fnum;
int i;
DEBUG(0,("starting random rpc test on %s\n", pipe_name));
@@ -334,7 +336,7 @@ static void random_rpc_pipe(char *pipe_name, struct client_info *cli_info,
}
/* open session. */
- if (!cli_nt_session_open(smb_cli, pipe_name))
+ if (!cli_nt_session_open(smb_cli, pipe_name, &nt_pipe_fnum))
{
DEBUG(0,("random rpc test: session open failed\n"));
return;
@@ -350,7 +352,7 @@ static void random_rpc_pipe(char *pipe_name, struct client_info *cli_info,
}
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
/* close the rpc pipe */
rpcclient_stop();
@@ -388,6 +390,7 @@ static void run_randomrpc(int numops, struct client_info *cli_info)
static void run_samhandles(int numops, struct client_info *cli_info)
{
+ uint16 nt_pipe_fnum;
int i;
int count = 0;
int failed = 0;
@@ -412,7 +415,7 @@ static void run_samhandles(int numops, struct client_info *cli_info)
}
/* open session. */
- if (!cli_nt_session_open(smb_cli, PIPE_SAMR))
+ if (!cli_nt_session_open(smb_cli, PIPE_SAMR, &nt_pipe_fnum))
{
DEBUG(0,("samhandle test: session open failed\n"));
return;
@@ -440,7 +443,7 @@ static void run_samhandles(int numops, struct client_info *cli_info)
}
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
/* close the rpc pipe */
rpcclient_stop();
@@ -451,6 +454,7 @@ static void run_samhandles(int numops, struct client_info *cli_info)
static void run_lsahandles(int numops, struct client_info *cli_info)
{
+ uint16 nt_pipe_fnum;
int i;
int count = 0;
int failed = 0;
@@ -474,7 +478,7 @@ static void run_lsahandles(int numops, struct client_info *cli_info)
return;
}
/* open session. */
- if (!cli_nt_session_open(smb_cli, PIPE_LSARPC))
+ if (!cli_nt_session_open(smb_cli, PIPE_LSARPC, &nt_pipe_fnum))
{
DEBUG(0,("lsahandle test: session open failed\n"));
return;
@@ -495,7 +499,7 @@ static void run_lsahandles(int numops, struct client_info *cli_info)
}
/* close the session */
- cli_nt_session_close(smb_cli);
+ cli_nt_session_close(smb_cli, nt_pipe_fnum);
/* close the rpc pipe */
rpcclient_stop();
@@ -506,6 +510,7 @@ static void run_lsahandles(int numops, struct client_info *cli_info)
static void run_pipegobble(int numops, struct client_info *cli_info, char *pipe_name)
{
+ uint16 nt_pipe_fnum;
int i;
int count = 0;
int failed = 0;
@@ -531,7 +536,7 @@ static void run_pipegobble(int numops, struct client_info *cli_info, char *pipe_
for (i = 1; i <= numops * 100; i++)
{
/* open session. */
- if (!cli_nt_session_open(smb_cli, pipe_name))
+ if (!cli_nt_session_open(smb_cli, pipe_name, &nt_pipe_fnum))
{
DEBUG(0,("pipe gobble test: session open failed\n"));
}