summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@samba.org>2019-10-01 16:48:01 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-10-18 16:07:37 +0000
commit6a6546b565793341f3be6a6fcf30a40a186f9ae9 (patch)
tree2d065ccfedb8ee13d663d0216c3afc2d6da5449f /source4
parent52727543b05c80742e187014ce1048fe7b104bdc (diff)
downloadsamba-6a6546b565793341f3be6a6fcf30a40a186f9ae9.tar.gz
librpc:core: Allocate struct dcesrv_interface with talloc
The S3 implementation needs to reinit the dcesrv_context and free the endpoints list with their registered interfaces. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/dcerpc_server.c4
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index ffdf34f02f8..084857a44bf 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -508,7 +508,7 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx,
DEBUG(0,("service_setup_stream_socket(address=%s,port=%u) for ",
address, port));
for (iface = e->interface_list; iface; iface = iface->next) {
- DEBUGADD(0, ("%s ", iface->iface.name));
+ DEBUGADD(0, ("%s ", iface->iface->name));
}
DEBUGADD(0, ("failed - %s\n",
nt_errstr(status)));
@@ -528,7 +528,7 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx,
DEBUG(4,("Successfully listening on ncacn_ip_tcp endpoint [%s]:[%s] for ",
address, port_str));
for (iface = e->interface_list; iface; iface = iface->next) {
- DEBUGADD(4, ("%s ", iface->iface.name));
+ DEBUGADD(4, ("%s ", iface->iface->name));
}
DEBUGADD(4, ("\n"));
}
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 793070d470e..462553dfe6f 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -69,7 +69,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
if (!*eps) {
return 0;
}
- (*eps)[total].name = iface->iface.name;
+ (*eps)[total].name = iface->iface->name;
description = dcerpc_binding_dup(*eps, d->ep_description);
if (description == NULL) {
@@ -77,7 +77,7 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
}
status = dcerpc_binding_set_abstract_syntax(description,
- &iface->iface.syntax_id);
+ &iface->iface->syntax_id);
if (!NT_STATUS_IS_OK(status)) {
return 0;
}
@@ -85,8 +85,9 @@ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
status = dcerpc_binding_build_tower(*eps, description, &(*eps)[total].ep);
TALLOC_FREE(description);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Unable to build tower for %s - %s\n",
- iface->iface.name, nt_errstr(status)));
+ DBG_ERR("Unable to build tower for %s - %s\n",
+ iface->iface->name,
+ nt_errstr(status));
continue;
}
total++;