From 0639758dd9b19926baac1fd5636d00e3a3d23404 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 9 Nov 2004 01:04:29 +0000 Subject: r3630: More work on DCOM server side (This used to be commit e995a1c0e5d2ee2dc50c31c01ce281a303dd5231) --- source4/rpc_server/dcom/remact.c | 33 +++++++++++++++++++++++++++++---- source4/rpc_server/dcom/rot.c | 19 ++++++++++++------- 2 files changed, 41 insertions(+), 11 deletions(-) (limited to 'source4/rpc_server/dcom') diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c index 086d32a82f..0ec1ea5a51 100644 --- a/source4/rpc_server/dcom/remact.c +++ b/source4/rpc_server/dcom/remact.c @@ -38,6 +38,7 @@ struct dcom_interface_pointer *dcom_interface_pointer_by_ipid(struct GUID *ipid) */ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct RemoteActivation *r) { + int i; /* FIXME: CoGetClassObject() */ /* FIXME: IClassFactory::CreateInstance() */ /* FIXME: Register newly created object with dcerpc subsystem */ @@ -47,16 +48,35 @@ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *m 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; + r->out.AuthnHint = DCERPC_AUTH_LEVEL_DEFAULT; + r->out.pdsaOxidBindings = dcom_server_generate_dual_string(mem_ctx, dce_call); + /* FIXME: Loop thru given interfaces and set r->out.results and * r->out.interfaces */ + r->out.ifaces = talloc_array_p(mem_ctx, struct pMInterfacePointer, r->in.Interfaces); + r->out.results = talloc_array_p(mem_ctx, WERROR, r->in.Interfaces); + for (i = 0; i < r->in.Interfaces; i++) { + ZERO_STRUCT(r->out.ifaces[i]); + r->out.results[i] = WERR_NOT_SUPPORTED; + } + + /* FIXME: */ + r->out.pOxid = 0; + ZERO_STRUCT(r->out.ipidRemUnknown); + r->out.hr = WERR_NOT_SUPPORTED; return WERR_NOT_SUPPORTED; } + +static NTSTATUS register_dcom_class(const void *_c) +{ + const struct dcom_class *class = _c; + /* FIXME */ + + return NT_STATUS_NOT_SUPPORTED; +} + NTSTATUS dcerpc_server_dcom_init(void) { NTSTATUS status; @@ -70,6 +90,11 @@ NTSTATUS dcerpc_server_dcom_init(void) return status; } + status = register_subsystem("dcom", register_dcom_class); + if (NT_STATUS_IS_ERR(status)) { + return status; + } + return NT_STATUS_OK; } diff --git a/source4/rpc_server/dcom/rot.c b/source4/rpc_server/dcom/rot.c index f55ff59af4..eb19aa0501 100644 --- a/source4/rpc_server/dcom/rot.c +++ b/source4/rpc_server/dcom/rot.c @@ -25,13 +25,6 @@ #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 */ @@ -44,3 +37,15 @@ struct dcom_class *dcom_class_by_clsid(struct GUID *clsid) return NULL; } +struct dcom_object *dcom_call_get_object(struct dcesrv_call_state *call) +{ + struct GUID *object; + + if (! (call->pkt.pfc_flags & DCERPC_PFC_FLAG_ORPC) ) { + return NULL; + } + + object = &call->pkt.u.request.object.object; + /* FIXME */ + return NULL; +} -- cgit