summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-08 22:18:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:40 -0500
commite056ed97d79c046a7f4b9562ad785fc54719a8ce (patch)
treea2000af9b0e4da9b3768708966114fe80e071f81
parent73c1f61350a01c0cc5825ae0a08bb4c03121eda4 (diff)
downloadsamba-e056ed97d79c046a7f4b9562ad785fc54719a8ce.tar.gz
samba-e056ed97d79c046a7f4b9562ad785fc54719a8ce.tar.bz2
samba-e056ed97d79c046a7f4b9562ad785fc54719a8ce.zip
r3626: More minor DCOM fixes
(This used to be commit 709f279b192c8f9eeea04749169c00f2d57b20d3)
-rw-r--r--source4/build/pidl/client.pm4
-rw-r--r--source4/build/pidl/parser.pm4
-rw-r--r--source4/lib/dcom/common/main.c17
-rw-r--r--source4/librpc/idl/dcom.idl81
-rw-r--r--source4/torture/rpc/epmapper.c13
5 files changed, 48 insertions, 71 deletions
diff --git a/source4/build/pidl/client.pm b/source4/build/pidl/client.pm
index 1c0baa16f8..549a5d0dd3 100644
--- a/source4/build/pidl/client.pm
+++ b/source4/build/pidl/client.pm
@@ -35,8 +35,8 @@ struct rpc_request *dcerpc_$name\_send(struct dcom_interface *d, TALLOC_CTX *mem
}
ZERO_STRUCT(r->in.ORPCthis);
- r->in.ORPCthis.version.MajorVersion = 5;
- r->in.ORPCthis.version.MinorVersion = 1;
+ r->in.ORPCthis.version.MajorVersion = COM_MAJOR_VERSION;
+ r->in.ORPCthis.version.MinorVersion = COM_MINOR_VERSION;
";
} else {
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index 2ace0fdd8f..fd95f91665 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -1316,10 +1316,6 @@ sub ParseFunctionPush($)
pidl "\n\tif (!(flags & NDR_IN)) goto ndr_out;\n\n";
- if (util::has_property($fn, "object")) {
- # FIXME: Set COM version and possibly causality ID
- }
-
foreach my $e (@{$fn->{DATA}}) {
if (util::has_property($e, "in")) {
ParseFunctionElementPush($e, "in");
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c
index c276b5e61a..b2cb782953 100644
--- a/source4/lib/dcom/common/main.c
+++ b/source4/lib/dcom/common/main.c
@@ -115,6 +115,13 @@ WERROR dcom_init(struct dcom_context **ctx, const char *domain, const char *user
return WERR_OK;
}
+WERROR dcom_ping(struct dcom_context *ctx)
+{
+ /* FIXME: If OID's waiting in queue, do a ComplexPing call */
+ /* FIXME: otherwise, do a SimplePing call */
+ return WERR_OK;
+}
+
WERROR dcom_create_object(struct dcom_context *ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct dcom_interface **ip, WERROR *results)
{
struct dcom_oxid_mapping *m;
@@ -131,8 +138,8 @@ WERROR dcom_create_object(struct dcom_context *ctx, struct GUID *clsid, const ch
}
ZERO_STRUCT(r.in);
- r.in.this.version.MajorVersion = 5;
- r.in.this.version.MinorVersion = 1;
+ r.in.this.version.MajorVersion = COM_MAJOR_VERSION;
+ r.in.this.version.MinorVersion = COM_MINOR_VERSION;
uuid_generate_random(&r.in.this.cid);
r.in.Clsid = *clsid;
r.in.ClientImpLevel = RPC_C_IMP_LEVEL_IDENTIFY;
@@ -171,7 +178,7 @@ WERROR dcom_create_object(struct dcom_context *ctx, struct GUID *clsid, const ch
m->oxid = r.out.pOxid;
m->bindings = *r.out.pdsaOxidBindings;
DLIST_ADD(ctx->oxids, m);
-
+
return WERR_OK;
}
@@ -191,8 +198,8 @@ WERROR dcom_get_class_object(struct dcom_context *ctx, struct GUID *clsid, const
}
ZERO_STRUCT(r.in);
- r.in.this.version.MajorVersion = 5;
- r.in.this.version.MinorVersion = 1;
+ r.in.this.version.MajorVersion = COM_MAJOR_VERSION;
+ r.in.this.version.MinorVersion = COM_MINOR_VERSION;
uuid_generate_random(&r.in.this.cid);
r.in.Clsid = *clsid;
r.in.ClientImpLevel = RPC_C_IMP_LEVEL_IDENTIFY;
diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl
index 10e63772dd..165d47473a 100644
--- a/source4/librpc/idl/dcom.idl
+++ b/source4/librpc/idl/dcom.idl
@@ -17,36 +17,8 @@
void dcomu_UpdateResolverBindings();
}
-[
- uuid("99fcfe60-5260-101b-bbcb-00aa0021347a"),
- pointer_default(unique)
-]
interface ObjectRpcBaseTypes
{
- WERROR stub();
-
- /* Machine Identifier */
-#define MID HYPER_T
-
- /* Object Exporter Identifier */
-#define OXID HYPER_T
-
- /* Object Identifer */
-#define OID HYPER_T
-
- /* Interface Pointer Identifier */
-#define IPID GUID
-
- /* Causality Identifier */
-#define CID GUID
-
- /* Interface identifier */
-#define IID GUID
-
-#define LCID uint32
-
-#define DISPID uint32
-
/*//////////////////////////////////////////////////////////////// */
/* ORPC Call Packet Format */
/*//////////////////////////////////////////////////////////////// */
@@ -70,7 +42,7 @@ interface ObjectRpcBaseTypes
/* current version */
const uint16 COM_MAJOR_VERSION = 5;
- const uint16 COM_MINOR_VERSION = 6;
+ const uint16 COM_MINOR_VERSION = 1;
/* Body Extensions */
const string dcom_ext_debugging = "f1f19680-4d2a-11ce-a66a-0020af6e72f4";
@@ -84,17 +56,6 @@ interface ObjectRpcBaseTypes
uint16 MinorVersion; /* Minor version number */
} COMVERSION;
- typedef [public] struct
- {
- uint32 reserved1;
- uint32 reserved2;
- } COSERVERINFO;
-
- typedef [public] struct
- {
- uint32 FIXME;
- } MULTI_QI;
-
/* enumeration of additional information present in the call packet. */
/* Should be an enum but DCE IDL does not support sparse enumerators. */
typedef enum {
@@ -133,7 +94,7 @@ interface ObjectRpcBaseTypes
COMVERSION version; /* COM version number */
uint32 flags; /* ORPCF flags for presence of other data */
uint32 reserved1; /* set to zero */
- CID cid; /* causality id of caller */
+ GUID cid; /* causality id of caller */
/* Extensions. */
[unique] ORPC_EXTENT_ARRAY *extensions;
} ORPCTHIS;
@@ -198,9 +159,9 @@ interface ObjectRpcBaseTypes
{
uint32 flags; /* STDOBJREF flags (see above) */
uint32 cPublicRefs; /* count of references passed */
- OXID oxid; /* oxid of server with this oid */
- OID oid; /* oid of object with this ipid */
- IPID ipid; /* ipid of interface pointer to this object */
+ HYPER_T oxid; /* oxid of server with this oid */
+ HYPER_T oid; /* oid of object with this ipid */
+ GUID ipid; /* ipid of interface pointer to this object */
} STDOBJREF;
typedef struct
@@ -221,7 +182,7 @@ interface ObjectRpcBaseTypes
GUID clsid; /* Clsid of unmarshaling code */
uint32 cbExtension; /* size of extension data */
uint32 size; /* size of data that follows */
- [size_is(size)] uint8 pData[]; /* extension + class specific data */
+ uint8 pData[size]; /* extension + class specific data */
} u_custom;
typedef struct
@@ -265,7 +226,7 @@ interface IUnknown
/* Function 0x00 */
/* Returns the interface with the specified IID
if implemented by this object */
- [local] WERROR IUnknown_QueryInterface([in] IID *riid,
+ [local] WERROR IUnknown_QueryInterface([in] GUID *iid,
[out,iid_is(riid)] MInterfacePointer *data);
/*****************/
@@ -285,7 +246,7 @@ interface IUnknown
] interface IClassFactory : IUnknown
{
[local] WERROR CreateInstance(/*FIXME[in] IUnknown *pUnknown*/,
- [in] IID *riid,
+ [in] GUID *iid,
[out, iid_is(riid)] MInterfacePointer *ppv);
[call_as(CreateInstance)] WERROR RemoteCreateInstance();
@@ -321,16 +282,16 @@ interface IRemUnknown : IUnknown
REMQIRESULT;
[call_as(QueryInterface)] WERROR RemQueryInterface (
- [in] IPID *ripid, /* interface to QI on */
+ [in] GUID *ripid, /* interface to QI on */
[in] uint32 cRefs, /* count of AddRefs requested */
[in] uint16 cIids, /* count of IIDs that follow */
- [in, size_is(cIids)] IID* iids, /*, // IIDs to QI for */
+ [in, size_is(cIids)] GUID* iids, /*, // IIDs to QI for */
[out, size_is(cIids)] MInterfacePointer *ip
);
typedef struct
{
- IPID ipid; /* ipid to AddRef/Release */
+ GUID ipid; /* ipid to AddRef/Release */
uint32 cPublicRefs;
uint32 cPrivateRefs;
} REMINTERFACEREF;
@@ -354,7 +315,7 @@ interface IRemUnknown : IUnknown
{
void GetClassObject([in] GUID clsid,
[in] uint32 context,
- [in] LCID locale,
+ [in] uint32 locale,
[in] GUID iid,
[out, iid_is(iid)] MInterfacePointer data);
}
@@ -395,9 +356,9 @@ interface IRemUnknown : IUnknown
interface IRemUnknown2 : IRemUnknown
{
[call_as(QueryInterface2)] WERROR RemQueryInterface2 (
- [in] IPID *ripid,
+ [in] GUID *ripid,
[in] uint16 cIids,
- [in, size_is(cIids)] IID *iids,
+ [in, size_is(cIids)] GUID*iids,
[out, size_is(cIids)] WERROR *phr,
[out, size_is(cIids)] MInterfacePointer *ppMIF
);
@@ -428,17 +389,17 @@ object,
/* Function 0x04 */
WERROR GetTypeInfo (
[in] uint16 iTInfo,
- [in] LCID lcid,
+ [in] uint32 lcid,
[out] REF_ITypeInfo *ppTInfo);
/*****************/
/* Function 0x05 */
WERROR GetIDsOfNames(
- [in] IID *riid,
+ [in] GUID *riid,
/*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
[in] uint16 cNames,
- [in] LCID lcid,
- [out,size_is(cNames)] DISPID *rgDispId);
+ [in] uint32 lcid,
+ [out,size_is(cNames)] uint32 *rgDispId);
typedef struct {
uint16 vartype;
@@ -457,9 +418,9 @@ object,
/*****************/
/* Function 0x06 */
WERROR Invoke(
- [in] DISPID dispIdMember,
- [in] IID *riid,
- [in] LCID lcid,
+ [in] uint32 dispIdMember,
+ [in] GUID *riid,
+ [in] uint32 lcid,
[in] uint16 wFlags,
[out,in] DISPPARAMS *pDispParams,
[out] VARIANT *pVarResult,
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 714e6f3f8c..c3a847684f 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -182,6 +182,19 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
}
+ twr->tower.floors[3].lhs.protocol = EPM_PROTOCOL_UDP;
+ 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);
+ }
+ }
+ }
+
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 = "";