summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/dcerpc_server.c8
-rw-r--r--source4/rpc_server/dcerpc_server.h2
-rw-r--r--source4/rpc_server/dcerpc_sock.c22
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c8
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c3
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c1
6 files changed, 24 insertions, 20 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index c0cd221da6..b050830883 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -58,7 +58,7 @@ static struct dcesrv_endpoint *find_endpoint(struct dcesrv_context *dce_ctx,
{
struct dcesrv_endpoint *ep;
for (ep=dce_ctx->endpoint_list; ep; ep=ep->next) {
- if (endpoints_match(&ep->ep_description, ep_description)) {
+ if (endpoints_match(ep->ep_description, ep_description)) {
return ep;
}
}
@@ -166,7 +166,7 @@ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
{
struct dcesrv_endpoint *ep;
struct dcesrv_if_list *ifl;
- struct dcerpc_binding binding;
+ struct dcerpc_binding *binding;
BOOL add_ep = False;
NTSTATUS status;
@@ -179,13 +179,13 @@ NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
/* check if this endpoint exists
*/
- if ((ep=find_endpoint(dce_ctx, &binding))==NULL) {
+ if ((ep=find_endpoint(dce_ctx, binding))==NULL) {
ep = talloc(dce_ctx, struct dcesrv_endpoint);
if (!ep) {
return NT_STATUS_NO_MEMORY;
}
ZERO_STRUCTP(ep);
- ep->ep_description = binding;
+ ep->ep_description = talloc_reference(ep, binding);
add_ep = True;
}
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index c3a779326e..77fb76448c 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -212,7 +212,7 @@ struct dcesrv_context {
struct dcesrv_endpoint {
struct dcesrv_endpoint *next, *prev;
/* the type and location of the endpoint */
- struct dcerpc_binding ep_description;
+ struct dcerpc_binding *ep_description;
/* the security descriptor for smb named pipes */
struct security_descriptor *sd;
/* the list of interfaces available on this endpoint */
diff --git a/source4/rpc_server/dcerpc_sock.c b/source4/rpc_server/dcerpc_sock.c
index d2ebf794b3..56b55a9fbf 100644
--- a/source4/rpc_server/dcerpc_sock.c
+++ b/source4/rpc_server/dcerpc_sock.c
@@ -159,11 +159,11 @@ static NTSTATUS add_socket_rpc_unix(struct dcesrv_context *dce_ctx, struct dcesr
dcesrv_sock->dcesrv_ctx = talloc_reference(dcesrv_sock, dce_ctx);
status = stream_setup_socket(event_ctx, model_ops, &dcesrv_stream_ops,
- "unix", e->ep_description.endpoint, &port,
+ "unix", e->ep_description->endpoint, &port,
dcesrv_sock);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("service_setup_stream_socket(path=%s) failed - %s\n",
- e->ep_description.endpoint, nt_errstr(status)));
+ e->ep_description->endpoint, nt_errstr(status)));
}
return status;
@@ -177,14 +177,14 @@ static NTSTATUS add_socket_rpc_ncalrpc(struct dcesrv_context *dce_ctx, struct dc
char *full_path;
NTSTATUS status;
- if (!e->ep_description.endpoint) {
+ if (!e->ep_description->endpoint) {
/* No identifier specified: use DEFAULT.
* DO NOT hardcode this value anywhere else. Rather, specify
* no endpoint and let the epmapper worry about it. */
- e->ep_description.endpoint = talloc_strdup(dce_ctx, "DEFAULT");
+ e->ep_description->endpoint = talloc_strdup(dce_ctx, "DEFAULT");
}
- full_path = talloc_asprintf(dce_ctx, "%s/%s", lp_ncalrpc_dir(), e->ep_description.endpoint);
+ full_path = talloc_asprintf(dce_ctx, "%s/%s", lp_ncalrpc_dir(), e->ep_description->endpoint);
dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context);
NT_STATUS_HAVE_NO_MEMORY(dcesrv_sock);
@@ -197,7 +197,7 @@ static NTSTATUS add_socket_rpc_ncalrpc(struct dcesrv_context *dce_ctx, struct dc
"unix", full_path, &port, dcesrv_sock);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("service_setup_stream_socket(identifier=%s,path=%s) failed - %s\n",
- e->ep_description.endpoint, full_path, nt_errstr(status)));
+ e->ep_description->endpoint, full_path, nt_errstr(status)));
}
return status;
}
@@ -213,8 +213,8 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct
uint16_t port = 0;
NTSTATUS status;
- if (e->ep_description.endpoint) {
- port = atoi(e->ep_description.endpoint);
+ if (e->ep_description->endpoint) {
+ port = atoi(e->ep_description->endpoint);
}
dcesrv_sock = talloc(dce_ctx, struct dcesrv_socket_context);
@@ -231,8 +231,8 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct
address, port, nt_errstr(status)));
}
- if (e->ep_description.endpoint == NULL) {
- e->ep_description.endpoint = talloc_asprintf(dce_ctx, "%d", port);
+ if (e->ep_description->endpoint == NULL) {
+ e->ep_description->endpoint = talloc_asprintf(dce_ctx, "%d", port);
}
return status;
@@ -275,7 +275,7 @@ NTSTATUS dcesrv_sock_init(struct dcesrv_context *dce_ctx,
}
for (e=dce_ctx->endpoint_list;e;e=e->next) {
- switch (e->ep_description.transport) {
+ switch (e->ep_description->transport) {
case NCACN_UNIX_STREAM:
status = add_socket_rpc_unix(dce_ctx, e, event_ctx, model_ops);
NT_STATUS_NOT_OK_RETURN(status);
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 8a61fc6428..d7d447f852 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -64,7 +64,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
for (d=endpoint_list; d; d=d->next) {
struct dcesrv_if_list *iface;
- struct dcerpc_binding description;
+ struct dcerpc_binding *description;
for (iface=d->interface_list;iface;iface=iface->next) {
(*eps) = talloc_realloc(mem_ctx,
@@ -77,10 +77,10 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
(*eps)[total].name = iface->iface.name;
description = d->ep_description;
- GUID_from_string(iface->iface.uuid, &description.object);
- description.object_version = iface->iface.if_version;
+ GUID_from_string(iface->iface.uuid, &description->object);
+ description->object_version = iface->iface.if_version;
- status = dcerpc_binding_build_tower(mem_ctx, &description, &(*eps)[total].ep);
+ status = dcerpc_binding_build_tower(mem_ctx, description, &(*eps)[total].ep);
if (NT_STATUS_IS_ERR(status)) {
DEBUG(1, ("Unable to build tower for %s\n", iface->iface.name));
continue;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index fd93d495e2..6a29bf7db8 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -230,6 +230,9 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL
pipe_state->creds->secure_channel_type = r->in.secure_channel_type;
pipe_state->creds->rid = *r->out.rid;
+
+ pipe_state->creds->domain = talloc_strdup(pipe_state->creds, lp_workgroup());
+
/* remember this session key state */
nt_status = schannel_store_session_key(mem_ctx, pipe_state->creds);
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index ee526e1978..9ed6b5a1bd 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -43,6 +43,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
}
status = dcerpc_pipe_connect(&(private->c_pipe), binding, iface->uuid, iface->if_version,
+ lp_netbios_name(),
lp_workgroup(),
lp_parm_string(-1, "dcerpc_remote", "username"),
lp_parm_string(-1, "dcerpc_remote", "password"));