1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r25922: Make it easier to bind to a unix domain socket, without messing with

ports...

Andrew Bartlett
(This used to be commit 70de473980)
This commit is contained in:
Andrew Bartlett 2007-11-10 05:48:38 +01:00 committed by Stefan Metzmacher
parent 716391f106
commit b45b8fa9c3

View File

@ -266,7 +266,15 @@ NTSTATUS stream_setup_socket(struct event_context *event_context,
/* TODO: set socket ACL's here when they're implemented */
if (*port == 0) {
if (!port) {
socket_address = socket_address_from_strings(stream_socket,
stream_socket->sock->backend_name,
sock_addr, 0);
NT_STATUS_HAVE_NO_MEMORY(socket_address);
status = socket_listen(stream_socket->sock, socket_address, SERVER_LISTEN_BACKLOG, 0);
talloc_free(socket_address);
} else if (*port == 0) {
for (i=SERVER_TCP_LOW_PORT;i<= SERVER_TCP_HIGH_PORT;i++) {
socket_address = socket_address_from_strings(stream_socket,
stream_socket->sock->backend_name,