summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/nbench/nbench.c4
-rw-r--r--source4/torture/rpc/mgmt.c2
-rw-r--r--source4/torture/rpc/scanner.c2
-rw-r--r--source4/torture/rpc/schannel.c2
-rw-r--r--source4/torture/rpc/winreg.c3
-rw-r--r--source4/torture/torture.c32
6 files changed, 23 insertions, 22 deletions
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index 53ca760b99..30291a829e 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -23,7 +23,7 @@
int nbench_line_count = 0;
static int timelimit = 600;
static int warmup;
-static char *loadfile;
+static const char *loadfile;
#define ival(s) strtol(s, NULL, 0)
@@ -165,7 +165,7 @@ BOOL torture_nbench(int dummy)
BOOL correct = True;
extern int torture_nprocs;
struct cli_state *cli;
- char *p;
+ const char *p;
p = lp_parm_string(-1, "torture", "timelimit");
if (p && *p) {
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 431502fc5c..a95fe43fb8 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -173,7 +173,7 @@ BOOL torture_rpc_mgmt(int dummy)
TALLOC_CTX *mem_ctx;
BOOL ret = True;
int i;
- char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = lp_parm_string(-1, "torture", "binding");
struct dcerpc_binding b;
mem_ctx = talloc_init("torture_rpc_mgmt");
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index be83b6b6c6..0c2f8dfbbe 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -134,7 +134,7 @@ BOOL torture_rpc_scanner(int dummy)
TALLOC_CTX *mem_ctx;
BOOL ret = True;
int i;
- char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = lp_parm_string(-1, "torture", "binding");
struct dcerpc_binding b;
mem_ctx = talloc_init("torture_rpc_scanner");
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 712c2563a3..e120c0d2ad 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -61,7 +61,7 @@ static BOOL test_schannel(TALLOC_CTX *mem_ctx,
void *join_ctx;
const char *machine_password;
NTSTATUS status;
- char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = lp_parm_string(-1, "torture", "binding");
struct dcerpc_binding b;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 3a1d7be68b..86b91eacc2 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -55,7 +55,8 @@ static BOOL test_GetVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *name, const char *class)
+ struct policy_handle *handle, const char *name,
+ const char *class)
{
struct winreg_CreateKey r;
struct policy_handle newhandle;
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 4d8fbd0a69..93e6c3ec79 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -39,7 +39,7 @@ static struct cli_state *open_nbt_connection(void)
struct nmb_name called, calling;
struct in_addr ip;
struct cli_state *cli;
- char *host = lp_parm_string(-1, "torture", "host");
+ const char *host = lp_parm_string(-1, "torture", "host");
make_nmb_name(&calling, lp_netbios_name(), 0x0);
make_nmb_name(&called , host, 0x20);
@@ -89,8 +89,8 @@ BOOL torture_open_connection_share(struct cli_state **c,
BOOL retry;
int flags = 0;
NTSTATUS status;
- char *username = lp_parm_string(-1, "torture", "username");
- char *password = lp_parm_string(-1, "torture", "password");
+ const char *username = lp_parm_string(-1, "torture", "username");
+ const char *password = lp_parm_string(-1, "torture", "password");
if (use_kerberos)
flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
@@ -114,8 +114,8 @@ BOOL torture_open_connection_share(struct cli_state **c,
BOOL torture_open_connection(struct cli_state **c)
{
- char *host = lp_parm_string(-1, "torture", "host");
- char *share = lp_parm_string(-1, "torture", "share");
+ const char *host = lp_parm_string(-1, "torture", "host");
+ const char *share = lp_parm_string(-1, "torture", "share");
return torture_open_connection_share(c, host, share);
}
@@ -145,7 +145,7 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
uint32_t pipe_version)
{
NTSTATUS status;
- char *binding = lp_parm_string(-1, "torture", "binding");
+ const char *binding = lp_parm_string(-1, "torture", "binding");
if (!binding) {
printf("You must specify a ncacn binding string\n");
@@ -670,9 +670,9 @@ static BOOL run_tcon_test(int dummy)
char buf[4];
BOOL ret = True;
struct cli_tree *tree1;
- char *host = lp_parm_string(-1, "torture", "host");
- char *share = lp_parm_string(-1, "torture", "share");
- char *password = lp_parm_string(-1, "torture", "password");
+ const char *host = lp_parm_string(-1, "torture", "host");
+ const char *share = lp_parm_string(-1, "torture", "share");
+ const char *password = lp_parm_string(-1, "torture", "password");
if (!torture_open_connection(&cli)) {
return False;
@@ -776,7 +776,7 @@ static BOOL tcon_devtest(struct cli_state *cli,
{
BOOL status;
BOOL ret;
- char *password = lp_parm_string(-1, "torture", "password");
+ const char *password = lp_parm_string(-1, "torture", "password");
status = NT_STATUS_IS_OK(cli_send_tconX(cli, myshare, devtype,
password));
@@ -822,10 +822,10 @@ static BOOL run_tcon_devtype_test(int dummy)
int flags = 0;
NTSTATUS status;
BOOL ret = True;
- char *host = lp_parm_string(-1, "torture", "host");
- char *share = lp_parm_string(-1, "torture", "share");
- char *username = lp_parm_string(-1, "torture", "username");
- char *password = lp_parm_string(-1, "torture", "password");
+ const char *host = lp_parm_string(-1, "torture", "host");
+ const char *share = lp_parm_string(-1, "torture", "share");
+ const char *username = lp_parm_string(-1, "torture", "username");
+ const char *password = lp_parm_string(-1, "torture", "password");
status = cli_full_connection(&cli1, lp_netbios_name(),
host, NULL,
@@ -1763,7 +1763,7 @@ test how many open files this server supports on the one socket
static BOOL run_deferopen(struct cli_state *cli, int dummy)
{
- char *fname = "\\defer_open_test.dat";
+ const char *fname = "\\defer_open_test.dat";
int retries=4;
int i = 0;
BOOL correct = True;
@@ -3987,7 +3987,7 @@ double torture_create_procs(BOOL (*fn)(struct cli_state *, int), BOOL *result)
int tries = 8;
double start_time_limit = 10 + (torture_nprocs * 1.5);
char **unc_list = NULL;
- char *p;
+ const char *p;
int num_unc_names = 0;
synccount = 0;