diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-06 22:37:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:59 -0500 |
commit | dd2aefd56b0968da8b1c4d055bc8c2f30382fb23 (patch) | |
tree | 328c4ce52593338ffe6433e7b88098516f389222 /source4/lib/com/dcom | |
parent | 77ec3f684dc8563965ae5118ef5549925ea81d0f (diff) | |
download | samba-dd2aefd56b0968da8b1c4d055bc8c2f30382fb23.tar.gz samba-dd2aefd56b0968da8b1c4d055bc8c2f30382fb23.tar.bz2 samba-dd2aefd56b0968da8b1c4d055bc8c2f30382fb23.zip |
r5675: - More DCOM bug fixes
- Keep COM and DCOM more seperated
(This used to be commit f694f484c422d0c86beb58e8f62f134f8676d5e1)
Diffstat (limited to 'source4/lib/com/dcom')
-rw-r--r-- | source4/lib/com/dcom/dcom.h | 36 | ||||
-rw-r--r-- | source4/lib/com/dcom/main.c | 11 |
2 files changed, 42 insertions, 5 deletions
diff --git a/source4/lib/com/dcom/dcom.h b/source4/lib/com/dcom/dcom.h new file mode 100644 index 0000000000..668d952124 --- /dev/null +++ b/source4/lib/com/dcom/dcom.h @@ -0,0 +1,36 @@ +/* + Unix SMB/CIFS implementation. + COM standard objects + Copyright (C) Jelmer Vernooij 2004-2005. + + 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. +*/ + +#ifndef _DCOM_H /* _DCOM_H */ +#define _DCOM_H + +struct dcom_client_context { + const char *domain; + const char *user; + const char *password; + struct dcom_object_exporter { + uint64_t oxid; + struct DUALSTRINGARRAY bindings; + struct dcerpc_pipe *pipe; + struct dcom_object_exporter *prev, *next; + } *object_exporters; +}; + +#endif /* _DCOM_H */ diff --git a/source4/lib/com/dcom/main.c b/source4/lib/com/dcom/main.c index b8c2eef82c..853af4c739 100644 --- a/source4/lib/com/dcom/main.c +++ b/source4/lib/com/dcom/main.c @@ -26,6 +26,7 @@ #include "librpc/gen_ndr/ndr_oxidresolver.h" #include "librpc/gen_ndr/ndr_dcom.h" #include "librpc/gen_ndr/com_dcom.h" +#include "lib/com/dcom/dcom.h" #define DCOM_NEGOTIATED_PROTOCOLS { EPM_PROTOCOL_TCP, EPM_PROTOCOL_SMB, EPM_PROTOCOL_NCALRPC } @@ -71,7 +72,7 @@ static NTSTATUS dcom_connect_host(struct com_context *ctx, struct dcerpc_pipe ** return dcerpc_pipe_connect_b(p, &bd, DCERPC_IREMOTEACTIVATION_UUID, DCERPC_IREMOTEACTIVATION_VERSION, - ctx->dcom.domain, ctx->dcom.user, ctx->dcom.password); + ctx->dcom->domain, ctx->dcom->user, ctx->dcom->password); } /* Allow server name to contain a binding string */ @@ -79,7 +80,7 @@ static NTSTATUS dcom_connect_host(struct com_context *ctx, struct dcerpc_pipe ** status = dcerpc_pipe_connect_b(p, &bd, DCERPC_IREMOTEACTIVATION_UUID, DCERPC_IREMOTEACTIVATION_VERSION, - ctx->dcom.domain, ctx->dcom.user, ctx->dcom.password); + ctx->dcom->domain, ctx->dcom->user, ctx->dcom->password); talloc_free(mem_ctx); return status; @@ -96,7 +97,7 @@ static NTSTATUS dcom_connect_host(struct com_context *ctx, struct dcerpc_pipe ** status = dcerpc_pipe_connect_b(p, &bd, DCERPC_IREMOTEACTIVATION_UUID, DCERPC_IREMOTEACTIVATION_VERSION, - ctx->dcom.domain, ctx->dcom.user, ctx->dcom.password); + ctx->dcom->domain, ctx->dcom->user, ctx->dcom->password); if (NT_STATUS_IS_OK(status)) { return status; @@ -279,8 +280,8 @@ NTSTATUS dcom_get_pipe (struct IUnknown *iface, struct dcerpc_pipe **pp) } else { status = dcerpc_pipe_connect_b(&p, &binding, uuid, 0.0, - iface->ctx->dcom.domain, iface->ctx->dcom.user, - iface->ctx->dcom.password); + iface->ctx->dcom->domain, iface->ctx->dcom->user, + iface->ctx->dcom->password); } i++; |