summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/libnet_rpc.c26
-rw-r--r--source4/torture/raw/lookuprate.c2
-rw-r--r--source4/torture/raw/tconrate.c1
-rw-r--r--source4/torture/rpc/netlogon.c1
-rw-r--r--source4/torture/rpc/samr.c2
-rw-r--r--source4/torture/rpc/schannel.c10
6 files changed, 20 insertions, 22 deletions
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index f25c1ecc48..0bcfcb6a4c 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -41,11 +41,11 @@ static bool test_connect_service(struct libnet_context *ctx,
bool badcreds, NTSTATUS expected_status)
{
NTSTATUS status;
- struct libnet_RpcConnect connect;
- connect.level = level;
- connect.in.binding = binding_string;
- connect.in.name = hostname;
- connect.in.dcerpc_iface = iface;
+ struct libnet_RpcConnect connect_r;
+ connect_r.level = level;
+ connect_r.in.binding = binding_string;
+ connect_r.in.name = hostname;
+ connect_r.in.dcerpc_iface = iface;
/* if bad credentials are needed, set baduser%badpassword instead
of default commandline-passed credentials */
@@ -54,12 +54,12 @@ static bool test_connect_service(struct libnet_context *ctx,
cli_credentials_set_password(ctx->cred, "badpassword", CRED_SPECIFIED);
}
- status = libnet_RpcConnect(ctx, ctx, &connect);
+ status = libnet_RpcConnect(ctx, ctx, &connect_r);
if (!NT_STATUS_EQUAL(status, expected_status)) {
d_printf("Connecting to rpc service %s on %s.\n\tFAILED. Expected: %s."
"Received: %s\n",
- connect.in.dcerpc_iface->name, connect.in.binding, nt_errstr(expected_status),
+ connect_r.in.dcerpc_iface->name, connect_r.in.binding, nt_errstr(expected_status),
nt_errstr(status));
return false;
@@ -68,15 +68,15 @@ static bool test_connect_service(struct libnet_context *ctx,
d_printf("PASSED. Expected: %s, received: %s\n", nt_errstr(expected_status),
nt_errstr(status));
- if (connect.level == LIBNET_RPC_CONNECT_DC_INFO && NT_STATUS_IS_OK(status)) {
+ if (connect_r.level == LIBNET_RPC_CONNECT_DC_INFO && NT_STATUS_IS_OK(status)) {
d_printf("Domain Controller Info:\n");
- d_printf("\tDomain Name:\t %s\n", connect.out.domain_name);
- d_printf("\tDomain SID:\t %s\n", dom_sid_string(ctx, connect.out.domain_sid));
- d_printf("\tRealm:\t\t %s\n", connect.out.realm);
- d_printf("\tGUID:\t\t %s\n", GUID_string(ctx, connect.out.guid));
+ d_printf("\tDomain Name:\t %s\n", connect_r.out.domain_name);
+ d_printf("\tDomain SID:\t %s\n", dom_sid_string(ctx, connect_r.out.domain_sid));
+ d_printf("\tRealm:\t\t %s\n", connect_r.out.realm);
+ d_printf("\tGUID:\t\t %s\n", GUID_string(ctx, connect_r.out.guid));
} else if (!NT_STATUS_IS_OK(status)) {
- d_printf("Error string: %s\n", connect.out.error_string);
+ d_printf("Error string: %s\n", connect_r.out.error_string);
}
return true;
diff --git a/source4/torture/raw/lookuprate.c b/source4/torture/raw/lookuprate.c
index f7ba004ae5..e4caf7b1be 100644
--- a/source4/torture/raw/lookuprate.c
+++ b/source4/torture/raw/lookuprate.c
@@ -237,7 +237,7 @@ bool torture_bench_lookup(struct torture_context *torture)
NTSTATUS status;
bool result = false;
- int i, tries;
+ int i;
struct smbcli_state *cli = NULL;
if (!torture_open_connection(&cli, torture, 0)) {
diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index 0109b65481..076e5be31f 100644
--- a/source4/torture/raw/tconrate.c
+++ b/source4/torture/raw/tconrate.c
@@ -29,7 +29,6 @@
#define TIME_LIMIT_SECS 30
#define usec_to_sec(s) ((s) / 1000000)
-#define sec_to_usec(s) ((s) * 1000000)
/* Map a shared memory buffer of at least nelem counters. */
static void * map_count_buffer(unsigned nelem, size_t elemsz)
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index c7518d15a0..785b43d7a1 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -148,7 +148,6 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
struct creds_CredentialState *creds;
const struct samr_Password *mach_password;
const char *machine_name;
- const char *plain_pass;
mach_password = cli_credentials_get_nt_hash(machine_credentials, tctx);
machine_name = cli_credentials_get_workstation(machine_credentials);
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 2912628744..821cac341e 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -1087,7 +1087,7 @@ static bool test_SetUserPass_level_ex(struct dcerpc_pipe *p,
}
if (fields_present & SAMR_FIELD_COMMENT) {
- comment = talloc_asprintf(tctx, "comment: %d\n", time(NULL));
+ comment = talloc_asprintf(tctx, "comment: %ld\n", time(NULL));
}
ZERO_STRUCT(u);
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 451990a71b..bc3cbeac3b 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -129,7 +129,7 @@ static bool test_samr_ops(struct torture_context *tctx,
NTSTATUS status;
struct samr_GetDomPwInfo r;
struct samr_PwInfo info;
- struct samr_Connect connect;
+ struct samr_Connect connect_r;
struct samr_OpenDomain opendom;
int i;
struct lsa_String name;
@@ -140,13 +140,13 @@ static bool test_samr_ops(struct torture_context *tctx,
r.in.domain_name = &name;
r.out.info = &info;
- connect.in.system_name = 0;
- connect.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
- connect.out.connect_handle = &handle;
+ connect_r.in.system_name = 0;
+ connect_r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ connect_r.out.connect_handle = &handle;
printf("Testing Connect and OpenDomain on BUILTIN\n");
- status = dcerpc_samr_Connect(p, tctx, &connect);
+ status = dcerpc_samr_Connect(p, tctx, &connect_r);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
printf("Connect failed (expected, schannel mapped to anonymous): %s\n",