From e02e6f28a938a52c2221f397d27d6ede7a7e901e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Aug 2024 21:40:29 +0200 Subject: [PATCH] torture3: Convert run_randomipc() away from cli_api() Not that it matters much, but I want to make cli_api() static in clirap2.c. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- source3/torture/torture.c | 61 +++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 2dc7d831b8f..67f1b19b169 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -3979,15 +3979,6 @@ static bool run_maxfidtest(int dummy) return correct; } -/* generate a random buffer */ -static void rand_buf(char *buf, int len) -{ - while (len--) { - *buf = (char)sys_random(); - buf++; - } -} - /* send smb negprot commands, not reading the response */ static bool run_negprot_nowait(int dummy) { @@ -4083,11 +4074,7 @@ static bool run_bad_nbt_session(int dummy) /* send random IPC commands */ static bool run_randomipc(int dummy) { - char *rparam = NULL; - char *rdata = NULL; - unsigned int rdrcnt,rprcnt; - char param[1024]; - int api, param_len, i; + int i; struct cli_state *cli; bool correct = True; int count = 50000; @@ -4099,21 +4086,48 @@ static bool run_randomipc(int dummy) } for (i=0;i