summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
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 {