summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/Parse/Pidl/NDR.pm4
-rw-r--r--source4/build/pidl/Parse/Pidl/Samba/NDR/Parser.pm6
-rw-r--r--source4/build/pidl/TODO3
-rw-r--r--source4/librpc/idl/remact.idl6
-rwxr-xr-xsource4/script/tests/selftest.sh2
-rwxr-xr-x[-rw-r--r--]source4/script/tests/test_functions.sh0
-rw-r--r--source4/torture/rpc/oxidresolve.c4
-rw-r--r--source4/torture/rpc/remact.c9
8 files changed, 20 insertions, 14 deletions
diff --git a/source4/build/pidl/Parse/Pidl/NDR.pm b/source4/build/pidl/Parse/Pidl/NDR.pm
index e039934b1b..0c2b00539d 100644
--- a/source4/build/pidl/Parse/Pidl/NDR.pm
+++ b/source4/build/pidl/Parse/Pidl/NDR.pm
@@ -257,7 +257,9 @@ sub find_largest_alignment($)
if ($e->{POINTERS}) {
$a = 4;
- } else {
+ } elsif (has_property($e, "subcontext")){
+ $a = 1;
+ } else {
$a = align_type($e->{TYPE});
}
diff --git a/source4/build/pidl/Parse/Pidl/Samba/NDR/Parser.pm b/source4/build/pidl/Parse/Pidl/Samba/NDR/Parser.pm
index b281dae9e7..bf245c0ac6 100644
--- a/source4/build/pidl/Parse/Pidl/Samba/NDR/Parser.pm
+++ b/source4/build/pidl/Parse/Pidl/Samba/NDR/Parser.pm
@@ -231,7 +231,7 @@ sub ParseArrayPushHeader($$$$$)
}
if ($l->{IS_VARYING}) {
- pidl "NDR_CHECK(ndr_push_uint32($ndr, NDR_SCALARS, 0));";
+ pidl "NDR_CHECK(ndr_push_uint32($ndr, NDR_SCALARS, 0));"; # array offset
pidl "NDR_CHECK(ndr_push_uint32($ndr, NDR_SCALARS, $length));";
}
@@ -552,7 +552,7 @@ sub ParseElementPushLevel
}
}
$var_name = get_value_of($var_name);
- ParseElementPushLevel($e, Parse::Pidl::NDR::GetNextLevel($e, $l), $ndr, $var_name, $env, $primitives, $deferred);
+ ParseElementPushLevel($e, Parse::Pidl::NDR::GetNextLevel($e, $l), $ndr, $var_name, $env, 1, 1);
if ($l->{POINTER_TYPE} ne "ref") {
deindent;
@@ -865,7 +865,7 @@ sub ParseElementPullLevel
}
$var_name = get_value_of($var_name);
- ParseElementPullLevel($e,Parse::Pidl::NDR::GetNextLevel($e,$l), $ndr, $var_name, $env, $primitives, $deferred);
+ ParseElementPullLevel($e,Parse::Pidl::NDR::GetNextLevel($e,$l), $ndr, $var_name, $env, 1, 1);
if ($l->{POINTER_TYPE} ne "ref") {
if ($l->{POINTER_TYPE} eq "relative") {
diff --git a/source4/build/pidl/TODO b/source4/build/pidl/TODO
index 00f875e00d..860b5d912c 100644
--- a/source4/build/pidl/TODO
+++ b/source4/build/pidl/TODO
@@ -4,3 +4,6 @@
- compatibility mode for generating MIDL-readable data:
- strip out pidl-specific properties
- convert subcontext() to an array of uint8.
+
+- don't be so strict on array boundaries.. arrays can and will be empty when
+ a (regular) remote error occurs
diff --git a/source4/librpc/idl/remact.idl b/source4/librpc/idl/remact.idl
index 6f64a5c02c..05192e31a5 100644
--- a/source4/librpc/idl/remact.idl
+++ b/source4/librpc/idl/remact.idl
@@ -23,10 +23,6 @@ interface IRemoteActivation
RPC_C_IMP_LEVEL_DELEGATE = 4
} imp_levels;
- typedef struct {
- MInterfacePointer *ip;
- } pMInterfacePointer;
-
const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff;
WERROR RemoteActivation (
[in] ORPCTHIS this,
@@ -46,7 +42,7 @@ interface IRemoteActivation
[out] uint32 AuthnHint,
[out] COMVERSION ServerVersion,
[out] WERROR hr,
- [out,size_is(Interfaces)] pMInterfacePointer ifaces[],
+ [out,size_is(Interfaces)] MInterfacePointer *ifaces[],
[out,size_is(Interfaces)] WERROR results[]
);
}
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index 6579623e2c..9b0c5f3a4a 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+# Bootstrap Samba and run a number of tests against it.
+
DOMAIN=SAMBADOMAIN
USERNAME=administrator
REALM=$DOMAIN
diff --git a/source4/script/tests/test_functions.sh b/source4/script/tests/test_functions.sh
index e228fe8a93..e228fe8a93 100644..100755
--- a/source4/script/tests/test_functions.sh
+++ b/source4/script/tests/test_functions.sh
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 3b0269891c..8bb1a7ae0a 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -25,6 +25,8 @@
#include "librpc/gen_ndr/ndr_epmapper.h"
#include "librpc/gen_ndr/com_dcom.h"
+#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
+
static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_t *oxid, struct GUID *oid)
{
struct RemoteActivation r;
@@ -36,7 +38,7 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
r.in.this.version.MajorVersion = 5;
r.in.this.version.MinorVersion = 1;
r.in.this.cid = GUID_random();
- GUID_from_string(CLSID_SIMPLE, &r.in.Clsid);
+ GUID_from_string(CLSID_IMAGEDOC, &r.in.Clsid);
r.in.ClientImpLevel = RPC_C_IMP_LEVEL_IDENTIFY;
r.in.num_protseqs = 3;
r.in.protseq = protseq;
diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c
index 1d145dd1cb..bbda197854 100644
--- a/source4/torture/rpc/remact.c
+++ b/source4/torture/rpc/remact.c
@@ -24,24 +24,25 @@
#include "librpc/gen_ndr/ndr_epmapper.h"
#include "librpc/gen_ndr/com_dcom.h"
+#define CLSID_IMAGEDOC "02B01C80-E03D-101A-B294-00DD010F2BF9"
+
static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct RemoteActivation r;
NTSTATUS status;
- struct GUID iids[2];
+ struct GUID iids[1];
uint16_t protseq[3] = { EPM_PROTOCOL_TCP, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID };
ZERO_STRUCT(r.in);
r.in.this.version.MajorVersion = 5;
r.in.this.version.MinorVersion = 1;
r.in.this.cid = GUID_random();
- GUID_from_string(CLSID_SIMPLE, &r.in.Clsid);
+ GUID_from_string(CLSID_IMAGEDOC, &r.in.Clsid);
r.in.ClientImpLevel = RPC_C_IMP_LEVEL_IDENTIFY;
r.in.num_protseqs = 3;
r.in.protseq = protseq;
- r.in.Interfaces = 2;
+ r.in.Interfaces = 1;
GUID_from_string(DCERPC_IUNKNOWN_UUID, &iids[0]);
- GUID_from_string(DCERPC_ISTREAM_UUID, &iids[1]);
r.in.pIIDs = iids;
status = dcerpc_RemoteActivation(p, mem_ctx, &r);