summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/dcom.idl10
-rw-r--r--source4/librpc/idl/remact.idl28
-rw-r--r--source4/torture/config.mk1
-rw-r--r--source4/torture/rpc/epmapper.c71
-rw-r--r--source4/torture/torture.c1
5 files changed, 41 insertions, 70 deletions
diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl
index d51d9ccaa3..864a764705 100644
--- a/source4/librpc/idl/dcom.idl
+++ b/source4/librpc/idl/dcom.idl
@@ -480,16 +480,6 @@ object,
}
[
-object,
- uuid("330E9E75-DF48-11CF-8E2C-00A0C90DC94B"),
- pointer_default(unique)
- ]
- interface IDcomEchoServ : IDispatch
-{
- HRESULT EchoPlusOne([in] uint32 x, [out] uint32 *y);
-}
-
-[
object,
uuid("00000003-0000-0000-C000-000000000046")
] interface IMarshal : IUnknown
diff --git a/source4/librpc/idl/remact.idl b/source4/librpc/idl/remact.idl
index 1756ed3c8b..b9e73a2b14 100644
--- a/source4/librpc/idl/remact.idl
+++ b/source4/librpc/idl/remact.idl
@@ -14,17 +14,19 @@
]
interface IRemoteActivation
{
- typedef struct {
- /* Looks very much like a protocol tower to me, but it appears
- to be aligned differently then it is in epmapper -jelmer
- */
- uint8 FIXME[12];
- } floor_tmp;
+ typedef enum
+ {
+ RPC_C_IMP_LEVEL_DEFAULT = 0,
+ RPC_C_IMP_LEVEL_ANONYMOUS = 1,
+ RPC_C_IMP_LEVEL_IDENTIFY = 2,
+ RPC_C_IMP_LEVEL_IMPERSONATE = 3,
+ RPC_C_IMP_LEVEL_DELEGATE = 4
+ } imp_levels;
const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff;
- HRESULT RemoteActivation (
- [in] ORPCTHIS ORPCthis,
- [out] ORPCTHAT ORPCthat,
+ WERROR RemoteActivation (
+ [in] ORPCTHIS this,
+ [out] ORPCTHAT that,
[in] GUID Clsid,
[in, unique] unistr *pwszObjectName,
[in, unique] MInterfacePointer *pObjectStorage,
@@ -33,13 +35,13 @@ interface IRemoteActivation
[in] uint32 Interfaces,
[in, unique,size_is(Interfaces)] GUID *pIIDs,
[in] uint16 num_protseqs,
- [in, size_is(num_protseqs)] floor_tmp protseq[],
+ [in, size_is(num_protseqs)] uint16 protseq[],
[out] HYPER_T pOxid,
[out] DUALSTRINGARRAY *pdsaOxidBindings,
[out] IPID ipidRemUnknown,
- [out] uint32 pAuthnHint,
- [out] COMVERSION pServerVersion,
- [out] HRESULT phr,
+ [out] uint32 AuthnHint,
+ [out] COMVERSION ServerVersion,
+ [out] HRESULT hr,
[out,size_is(Interfaces)] MInterfacePointer ifaces[],
[out,size_is(Interfaces)] HRESULT results[]
);
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},