From 0d696dc0e9867889fe198e61ed576af51ee732d1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 10 Nov 2004 21:20:51 +0000 Subject: r3667: Small COM fixes (This used to be commit 7484b9be7423ccd7e37432951700939e8a53d513) --- source4/lib/dcom/common/dcom.h | 1 + source4/lib/dcom/common/local.c | 10 ++++++++++ source4/lib/dcom/common/main.c | 30 ++++++++++++++++-------------- 3 files changed, 27 insertions(+), 14 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/dcom/common/dcom.h b/source4/lib/dcom/common/dcom.h index 23db4c355f..320b5a4a9f 100644 --- a/source4/lib/dcom/common/dcom.h +++ b/source4/lib/dcom/common/dcom.h @@ -38,6 +38,7 @@ struct dcom_context const char *domain; const char *user; const char *password; + uint32_t dcerpc_flags; }; struct dcom_interface diff --git a/source4/lib/dcom/common/local.c b/source4/lib/dcom/common/local.c index 3c5405e9dc..a68f5f4593 100644 --- a/source4/lib/dcom/common/local.c +++ b/source4/lib/dcom/common/local.c @@ -70,3 +70,13 @@ NTSTATUS dcerpc_IUnknown_QueryInterface(struct dcom_interface *o, TALLOC_CTX *me * call RemQueryInterface if necessary */ return NT_STATUS_NOT_SUPPORTED; } + +NTSTATUS dcerpc_IClassFactory_CreateInstance(struct dcom_interface *o, TALLOC_CTX *mem_ctx, struct IClassFactory_CreateInstance *rr) +{ + return NT_STATUS_NOT_SUPPORTED; +} + +NTSTATUS dcerpc_IClassFactory_LockServer(struct dcom_interface *o, TALLOC_CTX *mem_ctx, struct IClassFactory_LockServer *rr) +{ + return NT_STATUS_NOT_SUPPORTED; +} diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c index b2cb782953..996432181a 100644 --- a/source4/lib/dcom/common/main.c +++ b/source4/lib/dcom/common/main.c @@ -291,15 +291,16 @@ NTSTATUS dcom_get_pipe (struct dcom_interface *iface, struct dcerpc_pipe **p) i = 0; do { status = dcerpc_binding_from_STRINGBINDING(iface->ctx, &binding, iface->objref->u_objref.u_standard.saResAddr.stringbindings[i]); - i++; - } while (!NT_STATUS_IS_OK(status) && iface->objref->u_objref.u_standard.saResAddr.stringbindings[i]); - if (NT_STATUS_IS_ERR(status)) { - DEBUG(1, ("Error parsing string binding")); - return status; - } + if (NT_STATUS_IS_OK(status)) { + binding.flags = iface->ctx->dcerpc_flags; + status = dcerpc_pipe_connect_b(&po, &binding, DCERPC_IOXIDRESOLVER_UUID, DCERPC_IOXIDRESOLVER_VERSION, iface->ctx->domain, iface->ctx->user, iface->ctx->password); + } else { + DEBUG(1, ("Error parsing string binding - %s", nt_errstr(status))); + } - status = dcerpc_pipe_connect_b(&po, &binding, DCERPC_IOXIDRESOLVER_UUID, DCERPC_IOXIDRESOLVER_VERSION, iface->ctx->domain, iface->ctx->user, iface->ctx->password); + i++; + } while (!NT_STATUS_IS_OK(status) && iface->objref->u_objref.u_standard.saResAddr.stringbindings[i]); if (NT_STATUS_IS_ERR(status)) { DEBUG(1, ("Error while connecting to OXID Resolver : %s\n", nt_errstr(status))); @@ -337,17 +338,18 @@ NTSTATUS dcom_get_pipe (struct dcom_interface *iface, struct dcerpc_pipe **p) i = 0; do { status = dcerpc_binding_from_STRINGBINDING(iface->ctx, &binding, m->bindings.stringbindings[i]); + if (NT_STATUS_IS_ERR(status)) { + DEBUG(1, ("Error parsing string binding")); + } else { + binding.flags = iface->ctx->dcerpc_flags; + status = dcerpc_pipe_connect_b(&m->pipe, &binding, GUID_string(iface->ctx, &iid) , 0.0, iface->ctx->domain, iface->ctx->user, iface->ctx->password); + } + i++; } while (NT_STATUS_IS_ERR(status) && m->bindings.stringbindings[i]); 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)) { + DEBUG(0, ("Unable to connect to remote host - %s\n", nt_errstr(status))); return status; } -- cgit