mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
rpc_server: Pass dcerpc_binding to dcesrv_create_ncalrpc_socket()
It does not need a dcesrv_endpoint. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
f0aa39017b
commit
cc456ac882
@ -178,14 +178,13 @@ NTSTATUS dcesrv_create_ncacn_ip_tcp_socket(const struct sockaddr_storage *ifss,
|
|||||||
* Start listening on the ncalrpc socket
|
* Start listening on the ncalrpc socket
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
NTSTATUS dcesrv_create_ncalrpc_socket(struct dcesrv_endpoint *e, int *out_fd)
|
NTSTATUS dcesrv_create_ncalrpc_socket(struct dcerpc_binding *b, int *out_fd)
|
||||||
{
|
{
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
const char *endpoint = NULL;
|
const char *endpoint = NULL;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
endpoint = dcerpc_binding_get_string_option(e->ep_description,
|
endpoint = dcerpc_binding_get_string_option(b, "endpoint");
|
||||||
"endpoint");
|
|
||||||
if (endpoint == NULL) {
|
if (endpoint == NULL) {
|
||||||
/*
|
/*
|
||||||
* No identifier specified: use DEFAULT or SMBD.
|
* No identifier specified: use DEFAULT or SMBD.
|
||||||
@ -205,9 +204,8 @@ NTSTATUS dcesrv_create_ncalrpc_socket(struct dcesrv_endpoint *e, int *out_fd)
|
|||||||
} else {
|
} else {
|
||||||
endpoint = "DEFAULT";
|
endpoint = "DEFAULT";
|
||||||
}
|
}
|
||||||
status = dcerpc_binding_set_string_option(e->ep_description,
|
status = dcerpc_binding_set_string_option(
|
||||||
"endpoint",
|
b, "endpoint", endpoint);
|
||||||
endpoint);
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DBG_ERR("Failed to set ncalrpc 'endpoint' binding "
|
DBG_ERR("Failed to set ncalrpc 'endpoint' binding "
|
||||||
"string option to '%s': %s\n",
|
"string option to '%s': %s\n",
|
||||||
|
@ -73,7 +73,7 @@ NTSTATUS dcesrv_create_ncacn_ip_tcp_socket(const struct sockaddr_storage *ifss,
|
|||||||
uint16_t *port,
|
uint16_t *port,
|
||||||
int *out_fd);
|
int *out_fd);
|
||||||
|
|
||||||
NTSTATUS dcesrv_create_ncalrpc_socket(struct dcesrv_endpoint *e, int *fd);
|
NTSTATUS dcesrv_create_ncalrpc_socket(struct dcerpc_binding *b, int *fd);
|
||||||
|
|
||||||
struct dcerpc_ncacn_listen_state;
|
struct dcerpc_ncacn_listen_state;
|
||||||
int dcesrv_setup_ncacn_listener(
|
int dcesrv_setup_ncacn_listener(
|
||||||
|
@ -114,7 +114,7 @@ NTSTATUS dcesrv_create_endpoint_sockets(struct tevent_context *ev_ctx,
|
|||||||
|
|
||||||
switch (transport) {
|
switch (transport) {
|
||||||
case NCALRPC:
|
case NCALRPC:
|
||||||
status = dcesrv_create_ncalrpc_socket(e, fds);
|
status = dcesrv_create_ncalrpc_socket(e->ep_description, fds);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NCACN_IP_TCP: {
|
case NCACN_IP_TCP: {
|
||||||
@ -269,7 +269,7 @@ NTSTATUS dcesrv_setup_endpoint_sockets(struct tevent_context *ev_ctx,
|
|||||||
|
|
||||||
switch (transport) {
|
switch (transport) {
|
||||||
case NCALRPC:
|
case NCALRPC:
|
||||||
status = dcesrv_create_ncalrpc_socket(e, &fd);
|
status = dcesrv_create_ncalrpc_socket(e->ep_description, &fd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NCACN_IP_TCP:
|
case NCACN_IP_TCP:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user