summaryrefslogtreecommitdiff
path: root/source4/torture/nbt
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
commit5209a846a9157e649fcdcb561f7eaf19c8c0e465 (patch)
treeb0a7e52b5646c8eec182dbc391e7934b6804488c /source4/torture/nbt
parent625359b2e266105022309df8985720108ecd6f67 (diff)
parent2ee8d29d22bcb1c350ab59d71b0aee548489bc9c (diff)
downloadsamba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.gz
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.bz2
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts: source4/lib/registry/ldb.c source4/rpc_server/winreg/rpc_winreg.c
Diffstat (limited to 'source4/torture/nbt')
-rw-r--r--source4/torture/nbt/dgram.c42
-rw-r--r--source4/torture/nbt/nbt.c2
-rw-r--r--source4/torture/nbt/query.c4
-rw-r--r--source4/torture/nbt/wins.c8
-rw-r--r--source4/torture/nbt/winsbench.c12
-rw-r--r--source4/torture/nbt/winsreplication.c6
6 files changed, 37 insertions, 37 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index eac2b1fe30..5d26d65e0c 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -148,7 +148,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert(tctx, response->response_type == NETLOGON_GET_PDC, "Got incorrect type of netlogon response");
- torture_assert(tctx, response->get_pdc.command == NETLOGON_RESPONSE_FROM_PDC, "Got incorrect netlogon response command");
+ torture_assert(tctx, response->data.get_pdc.command == NETLOGON_RESPONSE_FROM_PDC, "Got incorrect netlogon response command");
return true;
}
@@ -243,10 +243,10 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX, "Got incorrect netlogon response command");
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.nt_version, NETLOGON_NT_VERSION_5EX_WITH_IP|NETLOGON_NT_VERSION_5EX|NETLOGON_NT_VERSION_1, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE_EX, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.nt_version, NETLOGON_NT_VERSION_5EX_WITH_IP|NETLOGON_NT_VERSION_5EX|NETLOGON_NT_VERSION_1, "Got incorrect netlogon response command");
/* setup (another) temporary mailslot listener for replies */
dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC,
@@ -282,11 +282,11 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command");
- torture_assert_str_equal(tctx, response->samlogon.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response");
+ torture_assert_str_equal(tctx, response->data.samlogon.data.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response");
join_ctx = torture_join_domain(tctx, TEST_NAME,
ACB_WSTRUST, &machine_credentials);
@@ -333,9 +333,9 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command");
/* setup (another) temporary mailslot listener for replies */
dgmslot = dgram_mailslot_temp(dgmsock, NBT_MAILSLOT_GETDC,
@@ -374,9 +374,9 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command");
dgmslot->private = NULL;
@@ -413,9 +413,9 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_USER_UNKNOWN, "Got incorrect netlogon response command");
torture_leave_domain(tctx, join_ctx);
return true;
@@ -522,11 +522,11 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command");
- torture_assert_str_equal(tctx, response->samlogon.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response");
+ torture_assert_str_equal(tctx, response->data.samlogon.data.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response");
/* setup a temporary mailslot listener for replies */
@@ -566,11 +566,11 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_SAMLOGON, "Got incorrect type of netlogon response");
- map_netlogon_samlogon_response(&response->samlogon);
+ map_netlogon_samlogon_response(&response->data.samlogon);
- torture_assert_int_equal(tctx, response->samlogon.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command");
+ torture_assert_int_equal(tctx, response->data.samlogon.data.nt5_ex.command, LOGON_SAM_LOGON_RESPONSE, "Got incorrect netlogon response command");
- torture_assert_str_equal(tctx, response->samlogon.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response");
+ torture_assert_str_equal(tctx, response->data.samlogon.data.nt5_ex.user_name, TEST_NAME"$", "Got incorrect user in netlogon response");
/* setup (another) temporary mailslot listener for replies */
@@ -606,7 +606,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_GET_PDC, "Got incorrect type of ntlogon response");
- torture_assert_int_equal(tctx, response->get_pdc.command, NETLOGON_RESPONSE_FROM_PDC, "Got incorrect ntlogon response command");
+ torture_assert_int_equal(tctx, response->data.get_pdc.command, NETLOGON_RESPONSE_FROM_PDC, "Got incorrect ntlogon response command");
torture_leave_domain(tctx, join_ctx);
@@ -643,7 +643,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
torture_assert(tctx, response != NULL, "Failed to receive a netlogon reply packet");
torture_assert_int_equal(tctx, response->response_type, NETLOGON_GET_PDC, "Got incorrect type of ntlogon response");
- torture_assert_int_equal(tctx, response->get_pdc.command, NETLOGON_RESPONSE_FROM_PDC, "Got incorrect ntlogon response command");
+ torture_assert_int_equal(tctx, response->data.get_pdc.command, NETLOGON_RESPONSE_FROM_PDC, "Got incorrect ntlogon response command");
return true;
diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c
index 7d35fc856a..aee0c54358 100644
--- a/source4/torture/nbt/nbt.c
+++ b/source4/torture/nbt/nbt.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include "libcli/nbt/libnbt.h"
+#include "../libcli/nbt/libnbt.h"
#include "torture/torture.h"
#include "torture/nbt/proto.h"
#include "torture/smbtorture.h"
diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c
index 80027a1b68..b1b703a3c2 100644
--- a/source4/torture/nbt/query.c
+++ b/source4/torture/nbt/query.c
@@ -33,7 +33,7 @@ struct result_struct {
static void increment_handler(struct nbt_name_request *req)
{
- struct result_struct *v = talloc_get_type(req->async.private, struct result_struct);
+ struct result_struct *v = talloc_get_type(req->async.private_data, struct result_struct);
if (req->state != NBT_REQUEST_DONE) {
v->num_fail++;
} else {
@@ -76,7 +76,7 @@ static bool bench_namequery(struct torture_context *tctx)
req = nbt_name_query_send(nbtsock, &io);
torture_assert(tctx, req != NULL, "Failed to setup request!");
req->async.fn = increment_handler;
- req->async.private = result;
+ req->async.private_data = result;
num_sent++;
if (num_sent % 1000 == 0) {
if (torture_setting_bool(tctx, "progress", true)) {
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index ad9a97f133..0399daedf0 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -95,8 +95,8 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "register the name\n");
io.in.name = *name;
io.in.wins_port = lp_nbt_port(tctx->lp_ctx);
- io.in.wins_servers = str_list_make(tctx, address, NULL);
- io.in.addresses = str_list_make(tctx, myaddress, NULL);
+ io.in.wins_servers = (const char **)str_list_make(tctx, address, NULL);
+ io.in.addresses = (const char **)str_list_make(tctx, myaddress, NULL);
io.in.nb_flags = nb_flags;
io.in.ttl = 300000;
@@ -168,8 +168,8 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
torture_comment(tctx, "refresh the name\n");
refresh.in.name = *name;
refresh.in.wins_port = lp_nbt_port(tctx->lp_ctx);
- refresh.in.wins_servers = str_list_make(tctx, address, NULL);
- refresh.in.addresses = str_list_make(tctx, myaddress, NULL);
+ refresh.in.wins_servers = (const char **)str_list_make(tctx, address, NULL);
+ refresh.in.addresses = (const char **)str_list_make(tctx, myaddress, NULL);
refresh.in.nb_flags = nb_flags;
refresh.in.ttl = 12345;
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index a0d90fb653..bea3d4f9cf 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -56,7 +56,7 @@ static struct nbt_name generate_name(TALLOC_CTX *tctx, int idx)
static void register_handler(struct nbt_name_request *req)
{
- struct idx_state *istate = talloc_get_type(req->async.private, struct idx_state);
+ struct idx_state *istate = talloc_get_type(req->async.private_data, struct idx_state);
struct wins_state *state = istate->state;
struct nbt_name_register io;
NTSTATUS status;
@@ -100,7 +100,7 @@ static void generate_register(struct nbt_name_socket *nbtsock, struct wins_state
req = nbt_name_register_send(nbtsock, &io);
req->async.fn = register_handler;
- req->async.private = istate;
+ req->async.private_data = istate;
talloc_free(tmp_ctx);
}
@@ -108,7 +108,7 @@ static void generate_register(struct nbt_name_socket *nbtsock, struct wins_state
static void release_handler(struct nbt_name_request *req)
{
- struct idx_state *istate = talloc_get_type(req->async.private, struct idx_state);
+ struct idx_state *istate = talloc_get_type(req->async.private_data, struct idx_state);
struct wins_state *state = istate->state;
struct nbt_name_release io;
NTSTATUS status;
@@ -150,7 +150,7 @@ static void generate_release(struct nbt_name_socket *nbtsock, struct wins_state
req = nbt_name_release_send(nbtsock, &io);
req->async.fn = release_handler;
- req->async.private = istate;
+ req->async.private_data = istate;
talloc_free(tmp_ctx);
}
@@ -158,7 +158,7 @@ static void generate_release(struct nbt_name_socket *nbtsock, struct wins_state
static void query_handler(struct nbt_name_request *req)
{
- struct idx_state *istate = talloc_get_type(req->async.private, struct idx_state);
+ struct idx_state *istate = talloc_get_type(req->async.private_data, struct idx_state);
struct wins_state *state = istate->state;
struct nbt_name_query io;
NTSTATUS status;
@@ -197,7 +197,7 @@ static void generate_query(struct nbt_name_socket *nbtsock, struct wins_state *s
req = nbt_name_query_send(nbtsock, &io);
req->async.fn = query_handler;
- req->async.private = istate;
+ req->async.private_data = istate;
talloc_free(tmp_ctx);
}
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 6b600bd7cd..b688f1fbfe 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -9457,7 +9457,7 @@ static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_
struct nbt_name *name;
struct nbt_name_packet *rep_packet;
struct test_conflict_owned_active_vs_replica_struct *rec =
- (struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private;
+ (struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private_data;
_NBT_ASSERT(req_packet->qdcount, 1);
_NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
@@ -9556,7 +9556,7 @@ static void test_conflict_owned_active_vs_replica_handler_release(
struct nbt_name *name;
struct nbt_name_packet *rep_packet;
struct test_conflict_owned_active_vs_replica_struct *rec =
- (struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private;
+ (struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private_data;
_NBT_ASSERT(req_packet->qdcount, 1);
_NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
@@ -9610,7 +9610,7 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
struct socket_address *src)
{
struct test_conflict_owned_active_vs_replica_struct *rec =
- (struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private;
+ (struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private_data;
rec->defend.ret = false;