summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-31 18:37:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:07 -0500
commitad4c40b9278522e36c3d50d80658f03d9f8da805 (patch)
treec9527207c274cdb35fc1521facd32e1c8fb51316 /source4/torture
parentb33f17e11b801a002829a98bcac2c70d64f9c950 (diff)
downloadsamba-ad4c40b9278522e36c3d50d80658f03d9f8da805.tar.gz
samba-ad4c40b9278522e36c3d50d80658f03d9f8da805.tar.bz2
samba-ad4c40b9278522e36c3d50d80658f03d9f8da805.zip
r3413: RemoteActivation updates and fixes
Add torture test for RemoteActivation The request is now send correctly and we get back a valid response from Windows but r->in.Interfaces is set to 0 somewhere while parsing the response... (This used to be commit cabec03422f0c7140b56b2d5c4ec8ca663b406fc)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/config.mk1
-rw-r--r--source4/torture/rpc/epmapper.c71
-rw-r--r--source4/torture/torture.c1
3 files changed, 26 insertions, 47 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index 20f0f7bbc5..1c22506b07 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -68,6 +68,7 @@ ADD_OBJ_FILES = \
torture/rpc/epmapper.o \
torture/rpc/winreg.o \
torture/rpc/oxidresolve.o \
+ torture/rpc/remact.o \
torture/rpc/mgmt.o \
torture/rpc/scanner.o \
torture/rpc/autoidl.o \
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index b1076e64c6..6382800cec 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -130,7 +130,8 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct GUID uuid;
const char *uuid_str;
struct policy_handle handle;
- int i;
+ int i, j;
+ const char *test_bindings[] = { "ncacn_np:", "ncacn_ip_tcp:", "ncalrpc:", "ncadg_ip_udp:" };
ZERO_STRUCT(uuid);
ZERO_STRUCT(handle);
@@ -146,58 +147,34 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("epm_Map results for '%s':\n",
idl_pipe_name(uuid_str, twr->tower.floors[0].lhs.info.uuid.version));
- twr->tower.floors[2].lhs.protocol = EPM_PROTOCOL_NCACN;
- twr->tower.floors[2].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->tower.floors[2].rhs.ncacn.minor_version = 0;
-
- twr->tower.floors[3].lhs.protocol = EPM_PROTOCOL_TCP;
- twr->tower.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->tower.floors[3].rhs.tcp.port = 0;
+ for (i = 0; i < ARRAY_SIZE(test_bindings); i++)
+ {
+ struct dcerpc_binding binding;
+ status = dcerpc_parse_binding(mem_ctx, test_bindings[i], &binding);
- twr->tower.floors[4].lhs.protocol = EPM_PROTOCOL_IP;
- twr->tower.floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->tower.floors[4].rhs.ip.address = 0;
-
- status = dcerpc_epm_Map(p, mem_ctx, &r);
- if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
- for (i=0;i<r.out.num_towers;i++) {
- if (r.out.towers[i].twr) {
- display_tower(mem_ctx, &r.out.towers[i].twr->tower);
- }
+ if (NT_STATUS_IS_ERR(status)) {
+ printf("Error parsing binding string '%s'\n", test_bindings[i]);
+ return False;
}
- }
-
- twr->tower.floors[3].lhs.protocol = EPM_PROTOCOL_HTTP;
- twr->tower.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->tower.floors[3].rhs.http.port = 0;
- status = dcerpc_epm_Map(p, mem_ctx, &r);
- if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
- for (i=0;i<r.out.num_towers;i++) {
- if (r.out.towers[i].twr) {
- display_tower(mem_ctx, &r.out.towers[i].twr->tower);
+ binding.object = twr->tower.floors[0].lhs.info.uuid.uuid;
+ binding.object_version = twr->tower.floors[0].lhs.info.uuid.version;
+
+ status = dcerpc_binding_build_tower(mem_ctx, &binding, &twr->tower);
+ if (NT_STATUS_IS_ERR(status)) {
+ printf("Error parsing binding string '%s'\n", test_bindings[i]);
+ return False;
+ }
+
+ status = dcerpc_epm_Map(p, mem_ctx, &r);
+ if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
+ for (j=0;j<r.out.num_towers;j++) {
+ if (r.out.towers[j].twr) {
+ display_tower(mem_ctx, &r.out.towers[j].twr->tower);
+ }
}
}
}
-
- twr->tower.floors[3].lhs.protocol = EPM_PROTOCOL_SMB;
- twr->tower.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->tower.floors[3].rhs.smb.unc = "";
-
- twr->tower.floors[4].lhs.protocol = EPM_PROTOCOL_NETBIOS;
- twr->tower.floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->tower.floors[4].rhs.netbios.name = "";
-
- status = dcerpc_epm_Map(p, mem_ctx, &r);
- if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
- for (i=0;i<r.out.num_towers;i++) {
- if (r.out.towers[i].twr) {
- display_tower(mem_ctx, &r.out.towers[i].twr->tower);
- }
- }
- }
-
- /* FIXME: Extend to do other protocols as well (ncacn_unix_stream, ncalrpc) */
return True;
}
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 3aa74ac59b..462a46fbf1 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -2493,6 +2493,7 @@ static struct {
{"RPC-EPMAPPER", torture_rpc_epmapper, 0},
{"RPC-WINREG", torture_rpc_winreg, 0},
{"RPC-OXIDRESOLVE", torture_rpc_oxidresolve, 0},
+ {"RPC-REMACT", torture_rpc_remact, 0},
{"RPC-MGMT", torture_rpc_mgmt, 0},
{"RPC-SCANNER", torture_rpc_scanner, 0},
{"RPC-AUTOIDL", torture_rpc_autoidl, 0},