From bd6bc9c5ee434793686981413c14646a06cf092f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 2 Nov 2004 19:52:51 +0000 Subject: r3490: All tests work against NT4 now (This used to be commit 640e3a8ce865a72b171bdf15c8cf5afc2987a5d3) --- source4/librpc/idl/dcom.idl | 19 ++++++++++++++++- source4/librpc/idl/oxidresolver.idl | 42 +++++++++++++++++-------------------- source4/torture/rpc/oxidresolve.c | 4 ++-- source4/utils/ndrdump.c | 2 +- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl index da0b51cf36..454faa0d6b 100644 --- a/source4/librpc/idl/dcom.idl +++ b/source4/librpc/idl/dcom.idl @@ -262,7 +262,8 @@ interface ObjectRpcBaseTypes typedef [public] struct { uint32 size; - [subcontext(4)] OBJREF obj; + uint32 sizex; + [subcontext(4),align(1)] OBJREF obj; } MInterfacePointer; } @@ -504,3 +505,19 @@ uuid(DB7C21F8-FE33-4C11-AEA5-CEB56F076FBB), [helpstring("method MakeCoffee")] HRESULT MakeCoffee(BSTR *flavor); } } + +[ + object, + uuid("0000000C-0000-0000-C000-000000000046"), + helpstring("Stream") +] +interface IStream : IUnknown +{ + WERROR Read([in] uint32 num_requested, + [out,size_is(*num_read)] uint8 *data, + [out] uint32 *num_read); + + WERROR Write([in,size_is(num_requested)] uint8 *data, + [in] uint32 num_requested, + [out] uint32 *num_written); +} diff --git a/source4/librpc/idl/oxidresolver.idl b/source4/librpc/idl/oxidresolver.idl index 4e33b5a639..611144e40b 100644 --- a/source4/librpc/idl/oxidresolver.idl +++ b/source4/librpc/idl/oxidresolver.idl @@ -29,17 +29,13 @@ interface IOXIDResolver /* Method to get the protocol sequences, string bindings */ /* and machine id for an object server given its OXID. */ - typedef [public] struct { - DUALSTRINGARRAY *ppdsaOxidBindings; - } ppdsaOxidBindingsArray; - [idempotent] WERROR ResolveOxid ( - [in] OXID *pOxid, + [in] OXID pOxid, [in] uint16 cRequestedProtseqs, [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[], - [out, ref] ppdsaOxidBindingsArray *ppdsaOxidBindings, - [out, ref] IPID *pipidRemUnknown, - [out, ref] uint32 *pAuthnHint + [out] DUALSTRINGARRAY *ppdsaOxidBindings, + [out] IPID pipidRemUnknown, + [out] uint32 pAuthnHint ); /* Simple ping is used to ping a Set. Client machines use this */ @@ -55,15 +51,16 @@ interface IOXIDResolver /* whole set can subsequently be pinged using SimplePing, */ /* thus reducing network traffic. */ [idempotent] WERROR ComplexPing ( - [in, out, ref] SETID *SetId, /* In of 0 on first call for new set. */ - [in] uint16 SequenceNum, - [in] uint16 cAddToSet, - [in] uint16 cDelFromSet, + [in] SETID *SetId, /* In of 0 on first call for new set. */ + [out] SETID SetId, + [in] uint16 SequenceNum, + [in] uint16 cAddToSet, + [in] uint16 cDelFromSet, /* add these OIDs to the set */ - [in, size_is(cAddToSet)] OID AddToSet[], + [in, size_is(cAddToSet)] OID AddToSet[], /*remove these OIDs from the set */ - [in, size_is(cDelFromSet)] OID DelFromSet[], - [out] uint16 pPingBackoffFactor/* 2^factor = multipler */ + [in, size_is(cDelFromSet)] OID DelFromSet[], + [out] uint16 PingBackoffFactor/* 2^factor = multipler */ ); /* In some cases the client maybe unsure that a particular */ @@ -79,16 +76,15 @@ interface IOXIDResolver /* version 5.2 and above. Looks like that means * Windows 2003/XP and above */ [idempotent] WERROR ResolveOxid2 ( - [in] OXID *pOxid, + [in] OXID pOxid, [in] uint16 cRequestedProtseqs, - [in, size_is(cRequestedProtseqs)] - uint16 arRequestedProtseqs[], - [out, ref] ppdsaOxidBindingsArray *ppdsaOxidBindings, - [out, ref] IPID *pipidRemUnknown, - [out, ref] uint32 *pAuthnHint, - [out, ref] COMVERSION *pComVersion + [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[], + [out] DUALSTRINGARRAY *pdsaOxidBindings, + [out] IPID ipidRemUnknown, + [out] uint32 AuthnHint, + [out] COMVERSION ComVersion ); - typedef struct { + typedef struct { COMVERSION version; uint32 unknown1; } COMINFO; diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c index 1865cbceb1..1364ef022f 100644 --- a/source4/torture/rpc/oxidresolve.c +++ b/source4/torture/rpc/oxidresolve.c @@ -150,7 +150,7 @@ static int test_ResolveOxid(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T NTSTATUS status; uint16 protseq[2] = { EPM_PROTOCOL_TCP, EPM_PROTOCOL_SMB }; - r.in.pOxid = &oxid; + r.in.pOxid = oxid; r.in.cRequestedProtseqs = 2; r.in.arRequestedProtseqs = protseq; @@ -189,7 +189,7 @@ static int test_ResolveOxid2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T return 0; } - printf("Remote server versions: %d, %d\n", r.out.pComVersion->MajorVersion, r.out.pComVersion->MinorVersion); + printf("Remote server versions: %d, %d\n", r.out.ComVersion.MajorVersion, r.out.ComVersion.MinorVersion); return 1; } diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c index 75f6ea0b32..9ccc1e2859 100644 --- a/source4/utils/ndrdump.c +++ b/source4/utils/ndrdump.c @@ -216,7 +216,7 @@ static void show_functions(const struct dcerpc_interface_table *p) pr = talloc_p(NULL, struct ndr_print); pr->print = ndr_print_debug_helper; pr->depth = 1; - f->ndr_print(pr, function, flags | NDR_IN, st); + f->ndr_print(pr, function, flags, st); if (!NT_STATUS_IS_OK(status) || ndr->offset != ndr->data_size) { -- cgit