diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-11-09 00:30:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:40 -0500 |
commit | b3ef49946f9c064f05e387d8786112809d2f2da6 (patch) | |
tree | 0625e123dcbdec168c2482932dba2b66ce81b98d /source4/rpc_server/dcom | |
parent | e056ed97d79c046a7f4b9562ad785fc54719a8ce (diff) | |
download | samba-b3ef49946f9c064f05e387d8786112809d2f2da6.tar.gz samba-b3ef49946f9c064f05e387d8786112809d2f2da6.tar.bz2 samba-b3ef49946f9c064f05e387d8786112809d2f2da6.zip |
r3629: A bit of work on the DCOM server architecture, small fixes
(This used to be commit e7b67ff22fe0a76afc93ee522b253eaf5dccb11d)
Diffstat (limited to 'source4/rpc_server/dcom')
-rw-r--r-- | source4/rpc_server/dcom/oxidresolver.c | 17 | ||||
-rw-r--r-- | source4/rpc_server/dcom/remact.c | 47 | ||||
-rw-r--r-- | source4/rpc_server/dcom/rot.c | 46 |
3 files changed, 88 insertions, 22 deletions
diff --git a/source4/rpc_server/dcom/oxidresolver.c b/source4/rpc_server/dcom/oxidresolver.c index 213802fade..a3f65b62e5 100644 --- a/source4/rpc_server/dcom/oxidresolver.c +++ b/source4/rpc_server/dcom/oxidresolver.c @@ -89,21 +89,30 @@ static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ct */ static WERROR ResolveOxid2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ResolveOxid2 *r) { + ZERO_STRUCT(r->out); + r->out.ComVersion.MajorVersion = COM_MAJOR_VERSION; + r->out.ComVersion.MinorVersion = COM_MINOR_VERSION; return WERR_NOT_SUPPORTED; } +struct DUALSTRINGARRAY *dcom_server_generate_dual_string(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *state) +{ + return NULL; /* FIXME */ +} /* ServerAlive2 */ static WERROR ServerAlive2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ServerAlive2 *r) { - return WERR_NOT_SUPPORTED; + ZERO_STRUCT(r->out); + r->out.info.version.MajorVersion = COM_MAJOR_VERSION; + r->out.info.version.MinorVersion = COM_MINOR_VERSION; + r->out.dualstring = *dcom_server_generate_dual_string(mem_ctx, dce_call); + return WERR_OK; } -/* FIXME: Regularly ping objects in use by local programs on - * remote servers */ - +/* FIXME: Garbage collect objects that haven't been pinged */ /* include the generated boilerplate */ #include "librpc/gen_ndr/ndr_oxidresolver_s.c" diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c index 8259b96a51..086d32a82f 100644 --- a/source4/rpc_server/dcom/remact.c +++ b/source4/rpc_server/dcom/remact.c @@ -24,26 +24,9 @@ #include "rpc_server/dcerpc_server.h" #include "rpc_server/common/common.h" #include "librpc/gen_ndr/ndr_remact.h" +#include "librpc/gen_ndr/ndr_oxidresolver.h" #include "rpc_server/dcom/dcom.h" -static void register_dcom_class(void *_c) -{ - struct dcom_class *class = _c; - /* FIXME */ -} - -struct dcom_object *dcom_object_by_oid(struct GUID *oid) -{ - /* FIXME */ - return NULL; -} - -struct dcom_class *dcom_class_by_clsid(struct GUID *clsid) -{ - /* FIXME */ - return NULL; -} - struct dcom_interface_pointer *dcom_interface_pointer_by_ipid(struct GUID *ipid) { /* FIXME */ @@ -57,10 +40,38 @@ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *m { /* FIXME: CoGetClassObject() */ /* FIXME: IClassFactory::CreateInstance() */ + /* FIXME: Register newly created object with dcerpc subsystem */ /* FIXME: IClassFactory::Release() */ + + ZERO_STRUCT(r->out); + r->out.ServerVersion.MajorVersion = COM_MAJOR_VERSION; + r->out.ServerVersion.MinorVersion = COM_MINOR_VERSION; + + /* FIXME: */ + r->out.hr = WERR_NOT_SUPPORTED; + r->out.pOxid = 0; + r->out.AuthnHint = 0; + /* FIXME: Loop thru given interfaces and set r->out.results and + * r->out.interfaces */ + return WERR_NOT_SUPPORTED; } +NTSTATUS dcerpc_server_dcom_init(void) +{ + NTSTATUS status; + status = dcerpc_server_IOXIDResolver_init(); + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + status = dcerpc_server_IRemoteActivation_init(); + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + return NT_STATUS_OK; +} /* include the generated boilerplate */ #include "librpc/gen_ndr/ndr_remact_s.c" diff --git a/source4/rpc_server/dcom/rot.c b/source4/rpc_server/dcom/rot.c new file mode 100644 index 0000000000..f55ff59af4 --- /dev/null +++ b/source4/rpc_server/dcom/rot.c @@ -0,0 +1,46 @@ +/* + Unix SMB/CIFS implementation. + + Running object table functions + + 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" +#include "rpc_server/dcerpc_server.h" +#include "rpc_server/common/common.h" +#include "rpc_server/dcom/dcom.h" + + +static void register_dcom_class(void *_c) +{ + struct dcom_class *class = _c; + /* FIXME */ +} + +struct dcom_object *dcom_object_by_oid(struct GUID *oid) +{ + /* FIXME */ + return NULL; +} + +struct dcom_class *dcom_class_by_clsid(struct GUID *clsid) +{ + /* FIXME */ + return NULL; +} + |