summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-09 01:04:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:40 -0500
commit0639758dd9b19926baac1fd5636d00e3a3d23404 (patch)
treefe82072075b7716db636be20effc8b376605d1b7 /source4
parentb3ef49946f9c064f05e387d8786112809d2f2da6 (diff)
downloadsamba-0639758dd9b19926baac1fd5636d00e3a3d23404.tar.gz
samba-0639758dd9b19926baac1fd5636d00e3a3d23404.tar.bz2
samba-0639758dd9b19926baac1fd5636d00e3a3d23404.zip
r3630: More work on DCOM server side
(This used to be commit e995a1c0e5d2ee2dc50c31c01ce281a303dd5231)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/auth/gensec_ntlmssp.c3
-rw-r--r--source4/param/loadparm.c2
-rw-r--r--source4/rpc_server/dcerpc_server.c4
-rw-r--r--source4/rpc_server/dcom/remact.c33
-rw-r--r--source4/rpc_server/dcom/rot.c19
5 files changed, 46 insertions, 15 deletions
diff --git a/source4/libcli/auth/gensec_ntlmssp.c b/source4/libcli/auth/gensec_ntlmssp.c
index 8ab90ebcfb..c033705f10 100644
--- a/source4/libcli/auth/gensec_ntlmssp.c
+++ b/source4/libcli/auth/gensec_ntlmssp.c
@@ -442,8 +442,5 @@ NTSTATUS gensec_ntlmssp_init(void)
return ret;
}
- /* ugly cludge, but we need the auth subsystem for this to work */
- auth_init();
-
return ret;
}
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index bbdf835e95..f823c32091 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -928,7 +928,7 @@ static void init_globals(void)
do_parameter("fstype", FSTYPE_STRING);
do_parameter("ntvfs handler", "unixuid default");
- do_parameter("dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg");
+ do_parameter("dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg IOXIDResolver IRemoteActivation");
do_parameter("server services", "smb rpc");
do_parameter("auth methods", "guest sam_ignoredomain");
do_parameter("smb passwd file", dyn_SMB_PASSWD_FILE);
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 70b7d18f39..83c0872ba7 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -595,6 +595,10 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
return NT_STATUS_NO_MEMORY;
}
+ if (call->pkt.pfc_flags & DCERPC_PFC_FLAG_ORPC) {
+ pull->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
+ }
+
r = talloc(call, call->conn->iface->ndr->calls[opnum].struct_size);
if (!r) {
return NT_STATUS_NO_MEMORY;
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;
+}