summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-10 21:20:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:43 -0500
commit0d696dc0e9867889fe198e61ed576af51ee732d1 (patch)
treec41461d05cdfb72d62cabef049c364f4e5fef128 /source4/lib
parentf847f3a3e13d2d96f9b74a398047d84b4ad78127 (diff)
downloadsamba-0d696dc0e9867889fe198e61ed576af51ee732d1.tar.gz
samba-0d696dc0e9867889fe198e61ed576af51ee732d1.tar.bz2
samba-0d696dc0e9867889fe198e61ed576af51ee732d1.zip
r3667: Small COM fixes
(This used to be commit 7484b9be7423ccd7e37432951700939e8a53d513)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/dcom/common/dcom.h1
-rw-r--r--source4/lib/dcom/common/local.c10
-rw-r--r--source4/lib/dcom/common/main.c30
3 files changed, 27 insertions, 14 deletions
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;
}