summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/rpc_sock_helper.c18
-rw-r--r--source3/smbd/server.c9
2 files changed, 9 insertions, 18 deletions
diff --git a/source3/rpc_server/rpc_sock_helper.c b/source3/rpc_server/rpc_sock_helper.c
index c767cd817d..198df903ad 100644
--- a/source3/rpc_server/rpc_sock_helper.c
+++ b/source3/rpc_server/rpc_sock_helper.c
@@ -98,18 +98,15 @@ NTSTATUS rpc_create_tcpip_sockets(const struct ndr_interface_table *iface,
}
}
} else {
- const char *sock_addr = lp_socket_address();
+ const char *sock_addr;
const char *sock_ptr;
char *sock_tok;
- if (strequal(sock_addr, "0.0.0.0") ||
- strequal(sock_addr, "::")) {
#if HAVE_IPV6
- sock_addr = "::,0.0.0.0";
+ sock_addr = "::,0.0.0.0";
#else
- sock_addr = "0.0.0.0";
+ sock_addr = "0.0.0.0";
#endif
- }
for (sock_ptr = sock_addr;
next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,");
@@ -217,18 +214,15 @@ NTSTATUS rpc_setup_tcpip_sockets(struct tevent_context *ev_ctx,
}
}
} else {
- const char *sock_addr = lp_socket_address();
+ const char *sock_addr;
const char *sock_ptr;
char *sock_tok;
- if (strequal(sock_addr, "0.0.0.0") ||
- strequal(sock_addr, "::")) {
#if HAVE_IPV6
- sock_addr = "::,0.0.0.0";
+ sock_addr = "::,0.0.0.0";
#else
- sock_addr = "0.0.0.0";
+ sock_addr = "0.0.0.0";
#endif
- }
for (sock_ptr = sock_addr;
next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,");
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 63edf0020a..6abf8ccaeb 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -796,18 +796,15 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
/* Just bind to 0.0.0.0 - accept connections
from anywhere. */
- const char *sock_addr = lp_socket_address();
+ const char *sock_addr;
char *sock_tok;
const char *sock_ptr;
- if (strequal(sock_addr, "0.0.0.0") ||
- strequal(sock_addr, "::")) {
#if HAVE_IPV6
- sock_addr = "::,0.0.0.0";
+ sock_addr = "::,0.0.0.0";
#else
- sock_addr = "0.0.0.0";
+ sock_addr = "0.0.0.0";
#endif
- }
for (sock_ptr=sock_addr;
next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,"); ) {