summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/client.pm4
-rw-r--r--source4/build/pidl/parser.pm5
-rw-r--r--source4/lib/dcom/common/dcom.h2
-rw-r--r--source4/lib/dcom/common/main.c113
-rw-r--r--source4/librpc/config.mk3
-rw-r--r--source4/librpc/idl/dcom.idl16
-rw-r--r--source4/librpc/ndr/ndr_dcom.c173
-rw-r--r--source4/librpc/ndr/ndr_dcom.h32
-rw-r--r--source4/librpc/rpc/dcerpc.c11
9 files changed, 311 insertions, 48 deletions
diff --git a/source4/build/pidl/client.pm b/source4/build/pidl/client.pm
index d9d2a0ca14..9502c68e1a 100644
--- a/source4/build/pidl/client.pm
+++ b/source4/build/pidl/client.pm
@@ -69,6 +69,7 @@ NTSTATUS dcerpc_$name(struct dcom_interface *d, TALLOC_CTX *mem_ctx, struct $nam
}
";
+ $objarg = "d";
} else {
$res .=
"
@@ -77,10 +78,11 @@ NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *
struct rpc_request *req;
NTSTATUS status;
";
+ $objarg = "p";
}
$res .= "
- req = dcerpc_$name\_send(p, mem_ctx, r);
+ req = dcerpc_$name\_send($objarg, mem_ctx, r);
if (req == NULL) return NT_STATUS_NO_MEMORY;
status = dcerpc_ndr_request_recv(req);
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index 39ec8a89a0..2ace0fdd8f 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -162,10 +162,7 @@ sub struct_alignment
for my $e (@{$s->{ELEMENTS}}) {
my $a = 1;
- if (util::has_property($e, "align"))
- {
- $a = $e->{PROPERTIES}->{align};
- } elsif (!util::need_wire_pointer($e)
+ if (!util::need_wire_pointer($e)
&& defined $structs{$e->{TYPE}}) {
if ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "STRUCT") {
$a = struct_alignment($structs{$e->{TYPE}}->{DATA});
diff --git a/source4/lib/dcom/common/dcom.h b/source4/lib/dcom/common/dcom.h
index 06407cf2f4..526340c384 100644
--- a/source4/lib/dcom/common/dcom.h
+++ b/source4/lib/dcom/common/dcom.h
@@ -21,6 +21,8 @@
#ifndef _DCOM_H /* _DCOM_H */
#define _DCOM_H
+#include "librpc/ndr/ndr_dcom.h"
+
struct IUnknown_AddRef;
struct IUnknown_Release;
struct IUnknown_QueryInterface;
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c
index a2650e3446..a4fcb7ec0d 100644
--- a/source4/lib/dcom/common/main.c
+++ b/source4/lib/dcom/common/main.c
@@ -27,6 +27,42 @@
#define DCOM_NEGOTIATED_PROTOCOLS { EPM_PROTOCOL_TCP, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NCALRPC }
+struct dcom_oxid_mapping {
+ struct dcom_oxid_mapping *prev, *next;
+ struct DUALSTRINGARRAY bindings;
+ HYPER_T oxid;
+ struct dcerpc_pipe *pipe;
+};
+
+static NTSTATUS dcerpc_binding_from_STRINGBINDING(TALLOC_CTX *mem_ctx, struct dcerpc_binding *b, struct STRINGBINDING *bd)
+{
+ char *host, *endpoint;
+
+ ZERO_STRUCTP(b);
+
+ b->transport = dcerpc_transport_by_endpoint_protocol(bd->wTowerId);
+
+ if (b->transport == -1) {
+ DEBUG(1, ("Can't find transport match endpoint protocol %d\n", bd->wTowerId));
+ return NT_STATUS_NOT_SUPPORTED;
+ }
+
+ host = talloc_strdup(mem_ctx, bd->NetworkAddr);
+ endpoint = strchr(host, '[');
+
+ if (endpoint) {
+ *endpoint = '\0';
+ endpoint++;
+
+ endpoint[strlen(endpoint)-1] = '\0';
+ }
+
+ b->host = host;
+ b->endpoint = endpoint;
+
+ return NT_STATUS_OK;
+}
+
static NTSTATUS dcom_connect_host(struct dcom_context *ctx, struct dcerpc_pipe **p, const char *server)
{
struct dcerpc_binding bd;
@@ -37,7 +73,11 @@ static NTSTATUS dcom_connect_host(struct dcom_context *ctx, struct dcerpc_pipe *
/* Allow server name to contain a binding string */
if (NT_STATUS_IS_OK(dcerpc_parse_binding(mem_ctx, server, &bd))) {
- status = dcerpc_pipe_connect_b(p, &bd, DCERPC_IREMOTEACTIVATION_UUID, DCERPC_IREMOTEACTIVATION_VERSION, ctx->domain, ctx->user, ctx->password);
+ status = dcerpc_pipe_connect_b(p, &bd,
+ DCERPC_IREMOTEACTIVATION_UUID,
+ DCERPC_IREMOTEACTIVATION_VERSION,
+ ctx->domain, ctx->user, ctx->password);
+
talloc_destroy(mem_ctx);
return status;
}
@@ -48,14 +88,20 @@ static NTSTATUS dcom_connect_host(struct dcom_context *ctx, struct dcerpc_pipe *
if (server == NULL) {
bd.transport = NCALRPC;
- return dcerpc_pipe_connect_b(p, &bd, DCERPC_IREMOTEACTIVATION_UUID, DCERPC_IREMOTEACTIVATION_VERSION, ctx->domain, ctx->user, ctx->password);
+ return dcerpc_pipe_connect_b(p, &bd,
+ DCERPC_IREMOTEACTIVATION_UUID,
+ DCERPC_IREMOTEACTIVATION_VERSION,
+ ctx->domain, ctx->user, ctx->password);
}
for (i = 0; i < ARRAY_SIZE(available_transports); i++)
{
bd.transport = available_transports[i];
- status = dcerpc_pipe_connect_b(p, &bd, DCERPC_IREMOTEACTIVATION_UUID, DCERPC_IREMOTEACTIVATION_VERSION, ctx->domain, ctx->user, ctx->password);
+ status = dcerpc_pipe_connect_b(p, &bd,
+ DCERPC_IREMOTEACTIVATION_UUID,
+ DCERPC_IREMOTEACTIVATION_VERSION,
+ ctx->domain, ctx->user, ctx->password);
if (NT_STATUS_IS_OK(status)) {
return status;
@@ -65,16 +111,6 @@ static NTSTATUS dcom_connect_host(struct dcom_context *ctx, struct dcerpc_pipe *
return status;
}
-static NTSTATUS dcom_connect_STRINGBINDINGARRAY(struct dcom_context *ctx, struct dcerpc_pipe **p, DATA_BLOB *stringbindingarray)
-{
- return NT_STATUS_NOT_SUPPORTED;
-}
-
-static NTSTATUS dcom_connect_DUALSTRINGBINDINGARRAY(struct dcom_context *ctx, struct dcerpc_pipe **p, struct DUALSTRINGARRAY *array)
-{
- return NT_STATUS_NOT_SUPPORTED;
-}
-
NTSTATUS dcerpc_IUnknown_AddRef(struct dcom_interface *p, TALLOC_CTX *mem_ctx, struct IUnknown_AddRef *rr)
{
struct RemAddRef r;
@@ -133,6 +169,7 @@ WERROR dcom_init(struct dcom_context **ctx, const char *domain, const char *user
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;
struct RemoteActivation r;
int i;
struct dcerpc_pipe *p;
@@ -156,6 +193,8 @@ WERROR dcom_create_object(struct dcom_context *ctx, struct GUID *clsid, const ch
r.in.Interfaces = num_ifaces;
r.in.pIIDs = iid;
r.out.ifaces = talloc_array_p(ctx, struct pMInterfacePointer, num_ifaces);
+ m = talloc_zero_p(ctx, struct dcom_oxid_mapping);
+ r.out.pdsaOxidBindings = &m->bindings;
status = dcerpc_RemoteActivation(p, ctx, &r);
if(NT_STATUS_IS_ERR(status)) {
@@ -180,11 +219,17 @@ WERROR dcom_create_object(struct dcom_context *ctx, struct GUID *clsid, const ch
(*ip)[i].ctx = ctx;
}
+ /* Add the OXID data for the returned oxid */
+ m->oxid = r.out.pOxid;
+ m->bindings = *r.out.pdsaOxidBindings;
+ DLIST_ADD(ctx->oxids, m);
+
return WERR_OK;
}
WERROR dcom_get_class_object(struct dcom_context *ctx, struct GUID *clsid, const char *server, struct GUID *iid, struct dcom_interface *ip)
{
+ struct dcom_oxid_mapping *m;
struct RemoteActivation r;
struct dcerpc_pipe *p;
NTSTATUS status;
@@ -209,6 +254,8 @@ WERROR dcom_get_class_object(struct dcom_context *ctx, struct GUID *clsid, const
r.in.pIIDs = iid;
r.in.Mode = MODE_GET_CLASS_OBJECT;
r.out.ifaces = &pm;
+ m = talloc_zero_p(ctx, struct dcom_oxid_mapping);
+ r.out.pdsaOxidBindings = &m->bindings;
status = dcerpc_RemoteActivation(p, ctx, &r);
if(NT_STATUS_IS_ERR(status)) {
@@ -220,21 +267,20 @@ WERROR dcom_get_class_object(struct dcom_context *ctx, struct GUID *clsid, const
if(!W_ERROR_IS_OK(r.out.hr)) { return r.out.hr; }
if(!W_ERROR_IS_OK(r.out.results[0])) { return r.out.results[0]; }
+ /* Set up the interface data */
ip->private_references = 1;
ip->pipe = NULL;
ip->objref = &pm.p->obj;
ip->ctx = ctx;
+
+ /* Add the OXID data for the returned oxid */
+ m->oxid = r.out.pOxid;
+ m->bindings = *r.out.pdsaOxidBindings;
+ DLIST_ADD(ctx->oxids, m);
return WERR_OK;
}
-struct dcom_oxid_mapping {
- struct dcom_oxid_mapping *prev, *next;
- struct DUALSTRINGARRAY bindings;
- HYPER_T oxid;
- struct dcerpc_pipe *pipe;
-};
-
static struct dcom_oxid_mapping *oxid_mapping_by_oxid (struct dcom_context *ctx, HYPER_T oxid)
{
struct dcom_oxid_mapping *m;
@@ -251,6 +297,8 @@ static struct dcom_oxid_mapping *oxid_mapping_by_oxid (struct dcom_context *ctx,
NTSTATUS dcom_get_pipe (struct dcom_interface *iface, struct dcerpc_pipe **p)
{
struct dcom_oxid_mapping *m;
+ struct dcerpc_binding binding;
+ struct GUID iid;
HYPER_T oxid;
NTSTATUS status;
@@ -269,6 +317,7 @@ NTSTATUS dcom_get_pipe (struct dcom_interface *iface, struct dcerpc_pipe **p)
DEBUG(1, ("DCOM: Connecting to %s\n", GUID_string(NULL, &iface->objref->iid)));
oxid = iface->objref->u_objref.u_standard.std.oxid;
+ iid = iface->objref->iid;
m = oxid_mapping_by_oxid(iface->ctx, oxid);
@@ -283,7 +332,15 @@ NTSTATUS dcom_get_pipe (struct dcom_interface *iface, struct dcerpc_pipe **p)
m = talloc_zero_p(iface->ctx, struct dcom_oxid_mapping);
m->oxid = oxid;
- status = dcom_connect_STRINGBINDINGARRAY(iface->ctx, &po, &iface->objref->u_objref.u_standard.saResAddr);
+ /* FIXME: Check other string bindings as well, not just 0 */
+ status = dcerpc_binding_from_STRINGBINDING(iface->ctx, &binding, iface->objref->u_objref.u_standard.saResAddr.stringbindings[0]);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ DEBUG(1, ("Error parsing string binding"));
+ return status;
+ }
+
+ status = dcerpc_pipe_connect_b(&po, &binding, DCERPC_IOXIDRESOLVER_UUID, DCERPC_IOXIDRESOLVER_VERSION, iface->ctx->domain, iface->ctx->user, iface->ctx->password);
if (NT_STATUS_IS_ERR(status)) {
DEBUG(1, ("Error while connecting to OXID Resolver : %s\n", nt_errstr(status)));
@@ -311,12 +368,22 @@ NTSTATUS dcom_get_pipe (struct dcom_interface *iface, struct dcerpc_pipe **p)
/* FIXME: Switch to correct IID using an alter context call */
return NT_STATUS_OK;
}
-
- status = dcom_connect_DUALSTRINGBINDINGARRAY(iface->ctx, &m->pipe, &m->bindings);
+
+ /* FIXME: Check other string bindings as well, not just 0 */
+ status = dcerpc_binding_from_STRINGBINDING(iface->ctx, &binding, m->bindings.stringbindings[0]);
if (NT_STATUS_IS_ERR(status)) {
+ DEBUG(1, ("Error parsing string binding"));
return status;
}
+
+ status = dcerpc_pipe_connect_b(&m->pipe, &binding, GUID_string(iface->ctx, &iid) , 0.0, iface->ctx->domain, iface->ctx->user, iface->ctx->password);
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ DEBUG(2, ("Successfully connected to OXID %llx\n", oxid));
*p = m->pipe;
return NT_STATUS_OK;
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index b16c42b938..8a60406bd9 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -6,7 +6,8 @@ INIT_OBJ_FILES = \
ADD_OBJ_FILES = \
librpc/ndr/ndr_basic.o \
librpc/ndr/ndr_sec.o \
- librpc/ndr/ndr_spoolss_buf.o
+ librpc/ndr/ndr_spoolss_buf.o \
+ librpc/ndr/ndr_dcom.o
# End SUBSYSTEM LIBNDR_RAW
################################################
diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl
index 41e2ccb73c..912902a29a 100644
--- a/source4/librpc/idl/dcom.idl
+++ b/source4/librpc/idl/dcom.idl
@@ -162,21 +162,9 @@ interface ObjectRpcBaseTypes
typedef [public] struct
{
uint16 wAuthnSvc; /* Cannot be zero. */
- uint16 wAuthzSvc; /* Must not be zero. */
nstring PrincName;
} SECURITYBINDING;
-
- typedef [public] struct
- {
- uint16 wNumEntries; /* Number of entries in array. */
- uint16 wSecurityOffset; /* Offset of security info. */
- /* The array contains two parts, a set of STRINGBINDINGs */
- /* and a set of SECURITYBINDINGs. Each set is terminated by an */
- /* extra zero. The shortest array contains four zeros. */
- [size_is(wNumEntries)] uint16 aStringArray[];
- } DUALSTRINGARRAY;
-
/* signature value for OBJREF (object reference, actually the */
/* marshaled form of a COM interface). */
const uint32 OBJREF_SIGNATURE = 0x574f454d; /* 'MEOW' */
@@ -218,14 +206,14 @@ interface ObjectRpcBaseTypes
typedef struct
{
STDOBJREF std; /* standard objref */
- [flag(NDR_REMAINING)] DATA_BLOB saResAddr; /* resolver address */
+ STRINGARRAY saResAddr; /* resolver address */
} u_standard;
typedef struct
{
STDOBJREF std; /* standard objref */
GUID clsid; /* Clsid of handler code */
- [flag(NDR_REMAINING)] DATA_BLOB saResAddr; /* resolver address */
+ STRINGARRAY saResAddr; /* resolver address */
} u_handler;
typedef struct
diff --git a/source4/librpc/ndr/ndr_dcom.c b/source4/librpc/ndr/ndr_dcom.c
new file mode 100644
index 0000000000..ee077dfd4f
--- /dev/null
+++ b/source4/librpc/ndr/ndr_dcom.c
@@ -0,0 +1,173 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ routines for marshalling/unmarshalling DCOM string arrays
+
+ Copyright (C) Jelmer Vernooij 2004
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include "includes.h"
+
+NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DUALSTRINGARRAY *ar)
+{
+ uint16_t num_entries, security_offset;
+ uint16_t towerid;
+ uint32_t towernum = 0, conformant_size;
+
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+
+ NDR_CHECK(ndr_pull_uint32(ndr, &conformant_size));
+ NDR_CHECK(ndr_pull_uint16(ndr, &num_entries));
+ NDR_CHECK(ndr_pull_uint16(ndr, &security_offset));
+
+ ar->stringbindings = talloc_array_p(ndr, struct STRINGBINDING *, num_entries);
+ ar->stringbindings[0] = NULL;
+
+ do {
+ /* 'Peek' */
+ NDR_CHECK(ndr_pull_uint16(ndr, &towerid));
+
+ if (towerid > 0) {
+ ndr->offset -= 2;
+ ar->stringbindings = talloc_realloc_p(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
+ ar->stringbindings[towernum] = talloc_p(ndr, struct STRINGBINDING);
+ NDR_CHECK(ndr_pull_STRINGBINDING(ndr, ndr_flags, ar->stringbindings[towernum]));
+ towernum++;
+ }
+ } while (towerid != 0);
+
+ ar->stringbindings[towernum] = NULL;
+ towernum = 0;
+
+ ar->securitybindings = talloc_array_p(ndr, struct SECURITYBINDING *, num_entries);
+ ar->securitybindings[0] = NULL;
+
+ do {
+ /* 'Peek' */
+ NDR_CHECK(ndr_pull_uint16(ndr, &towerid));
+
+ if (towerid > 0) {
+ ndr->offset -= 2;
+ ar->securitybindings = talloc_realloc_p(ndr, ar->securitybindings, struct SECURITYBINDING *, towernum+2);
+ ar->securitybindings[towernum] = talloc_p(ndr, struct SECURITYBINDING);
+ NDR_CHECK(ndr_pull_SECURITYBINDING(ndr, ndr_flags, ar->securitybindings[towernum]));
+ towernum++;
+ }
+ } while (towerid != 0);
+
+ ar->securitybindings[towernum] = NULL;
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_DUALSTRINGARRAY(struct ndr_push *ndr, int ndr_flags, struct DUALSTRINGARRAY *ar)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+/*
+ print a dom_sid
+*/
+void ndr_print_DUALSTRINGARRAY(struct ndr_print *ndr, const char *name, struct DUALSTRINGARRAY *ar)
+{
+ int i;
+ ndr->print(ndr, "%-25s: DUALSTRINGARRAY", name);
+ ndr->depth++;
+ ndr->print(ndr, "STRING BINDINGS");
+ ndr->depth++;
+ for (i=0;ar->stringbindings[i];i++) {
+ char *idx = NULL;
+ asprintf(&idx, "[%d]", i);
+ if (idx) {
+ ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]);
+ free(idx);
+ }
+ }
+ ndr->depth--;
+ ndr->print(ndr, "SECURITY BINDINGS");
+ ndr->depth++;
+ for (i=0;ar->securitybindings[i];i++) {
+ char *idx = NULL;
+ asprintf(&idx, "[%d]", i);
+ if (idx) {
+ ndr_print_SECURITYBINDING(ndr, idx, ar->securitybindings[i]);
+ free(idx);
+ }
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRINGARRAY *ar)
+{
+ uint16_t towerid;
+ uint32_t towernum = 0;
+ uint16_t num_entries;
+
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+
+ NDR_CHECK(ndr_pull_uint16(ndr, &num_entries));
+
+ ar->stringbindings = talloc_array_p(ndr, struct STRINGBINDING *, 1);
+ ar->stringbindings[0] = NULL;
+
+ do {
+ /* 'Peek' */
+ NDR_CHECK(ndr_pull_uint16(ndr, &towerid));
+
+ if (towerid > 0) {
+ ndr->offset -= 2;
+ ar->stringbindings = talloc_realloc_p(ndr, ar->stringbindings, struct STRINGBINDING *, towernum+2);
+ ar->stringbindings[towernum] = talloc_p(ndr, struct STRINGBINDING);
+ NDR_CHECK(ndr_pull_STRINGBINDING(ndr, ndr_flags, ar->stringbindings[towernum]));
+ towernum++;
+ }
+ } while (towerid != 0);
+
+ ar->stringbindings[towernum] = NULL;
+ towernum = 0;
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_STRINGARRAY(struct ndr_push *ndr, int ndr_flags, struct STRINGARRAY *ar)
+{
+ return NT_STATUS_NOT_SUPPORTED;
+}
+
+/*
+ print a dom_sid
+*/
+void ndr_print_STRINGARRAY(struct ndr_print *ndr, const char *name, struct STRINGARRAY *ar)
+{
+ int i;
+ ndr->print(ndr, "%-25s: STRINGARRAY", name);
+ ndr->depth++;
+ for (i=0;ar->stringbindings[i];i++) {
+ char *idx = NULL;
+ asprintf(&idx, "[%d]", i);
+ if (idx) {
+ ndr_print_STRINGBINDING(ndr, idx, ar->stringbindings[i]);
+ free(idx);
+ }
+ }
+ ndr->depth--;
+}
diff --git a/source4/librpc/ndr/ndr_dcom.h b/source4/librpc/ndr/ndr_dcom.h
new file mode 100644
index 0000000000..06c2681621
--- /dev/null
+++ b/source4/librpc/ndr/ndr_dcom.h
@@ -0,0 +1,32 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ definitions for marshalling/unmarshalling DCOM string arrays
+
+ Copyright (C) Jelmer Vernooij 2004
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+struct STRINGARRAY
+{
+ struct STRINGBINDING **stringbindings;
+};
+
+struct DUALSTRINGARRAY
+{
+ struct STRINGBINDING **stringbindings;
+ struct SECURITYBINDING **securitybindings;
+};
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index beccac78ca..dcbbe3ac7d 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -879,13 +879,14 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
pkt.ptype = DCERPC_PKT_REQUEST;
pkt.call_id = req->call_id;
pkt.auth_length = 0;
+ pkt.pfc_flags = 0;
pkt.u.request.alloc_hint = remaining;
pkt.u.request.context_id = 0;
pkt.u.request.opnum = opnum;
if (object) {
pkt.object.object = *object;
pkt.pfc_flags |= DCERPC_PFC_FLAG_ORPC;
- /* FIXME: pfc_cflags is reset below! */
+ printf("OBJECT: %s\n", GUID_string(NULL, object));
}
DLIST_ADD(p->pending, req);
@@ -896,7 +897,7 @@ struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
BOOL last_frag = False;
first_packet = False;
- pkt.pfc_flags = 0;
+ pkt.pfc_flags &= ~(DCERPC_PFC_FLAG_FIRST |DCERPC_PFC_FLAG_LAST);
if (remaining == stub_data->length) {
pkt.pfc_flags |= DCERPC_PFC_FLAG_FIRST;
@@ -974,7 +975,7 @@ NTSTATUS dcerpc_request_recv(struct rpc_request *req,
perform a full request/response pair on a dcerpc pipe
*/
NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
- struct OBJREF *object,
+ struct GUID *object,
uint16_t opnum,
TALLOC_CTX *mem_ctx,
DATA_BLOB *stub_data_in,
@@ -1141,7 +1142,7 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_pipe *p,
call dcerpc_ndr_request_recv() to receive the answer
*/
struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
- struct OBJREF *object,
+ struct GUID *object,
uint32_t opnum,
TALLOC_CTX *mem_ctx,
NTSTATUS (*ndr_push)(struct ndr_push *, int, void *),
@@ -1278,7 +1279,7 @@ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
standard format
*/
NTSTATUS dcerpc_ndr_request(struct dcerpc_pipe *p,
- struct OBJREF *object,
+ struct GUID *object,
uint32_t opnum,
TALLOC_CTX *mem_ctx,
NTSTATUS (*ndr_push)(struct ndr_push *, int, void *),