summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-08 02:12:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:39 -0500
commit8c2e179d477c99ab9c52e6b9af19a86d553d10b5 (patch)
tree386d8be6564c95686da8bf3eafb16de211dd28bc /source4/librpc/rpc
parent009892846fb25e6698c8e38c46cae3512abb7ec6 (diff)
downloadsamba-8c2e179d477c99ab9c52e6b9af19a86d553d10b5.tar.gz
samba-8c2e179d477c99ab9c52e6b9af19a86d553d10b5.tar.bz2
samba-8c2e179d477c99ab9c52e6b9af19a86d553d10b5.zip
r3611: DCOM client support works!!
The torture test DCOM-SIMPLE now successfully does an IStream_Read and a IStream_Write call. This test can now be run successfully against the "Simple DCOM" Visual Studio example. (You have to quote out line 337 in pidl. pidl complains if the variable that contains the array size follows the array. I still need to fix this properly) Next goals: - Clean up code - Server side support - Support custom marshalling - Support DCOM interfaces in files other then dcom.idl (This used to be commit 8693344772a9b700533179f4bacfe27ec27dfcfe)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c9
-rw-r--r--source4/librpc/rpc/dcerpc_util.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index dcbbe3ac7d..f4b10f6b52 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -321,6 +321,10 @@ static NTSTATUS dcerpc_push_request_sign(struct dcerpc_pipe *p,
ndr->flags |= LIBNDR_FLAG_BIGENDIAN;
}
+ if (pkt->pfc_flags & DCERPC_PFC_FLAG_ORPC) {
+ ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
+ }
+
status = ndr_push_dcerpc_packet(ndr, NDR_SCALARS|NDR_BUFFERS, pkt);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -883,10 +887,11 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
pkt.u.request.alloc_hint = remaining;
pkt.u.request.context_id = 0;
pkt.u.request.opnum = opnum;
+
if (object) {
- pkt.object.object = *object;
+ pkt.u.request.object.object = *object;
pkt.pfc_flags |= DCERPC_PFC_FLAG_ORPC;
- printf("OBJECT: %s\n", GUID_string(NULL, object));
+ chunk_size -= ndr_size_GUID(0,object,0);
}
DLIST_ADD(p->pending, req);
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 69dae46aef..c31cf2791b 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -106,6 +106,10 @@ NTSTATUS dcerpc_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
ndr->flags |= LIBNDR_FLAG_BIGENDIAN;
}
+ if (pkt->pfc_flags & DCERPC_PFC_FLAG_ORPC) {
+ ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
+ }
+
if (auth_info) {
pkt->auth_length = auth_info->credentials.length;
} else {