diff --git a/source/cldap_server/cldap_server.c b/source/cldap_server/cldap_server.c index 783e31d..5415c03 100644 --- a/source/cldap_server/cldap_server.c +++ b/source/cldap_server/cldap_server.c @@ -133,9 +133,10 @@ static NTSTATUS cldapd_startup_interfaces(struct cldapd_server *cldapd, struct l /* if we are allowing incoming packets from any address, then we need to bind to the wildcard address */ if (!lp_bind_interfaces_only(lp_ctx)) { - status = cldapd_add_socket(cldapd, lp_ctx, "0.0.0.0"); + status = cldapd_add_socket(cldapd, lp_ctx, "::"); NT_STATUS_NOT_OK_RETURN(status); - } else { + } + /*} else { int i; for (i=0; isock, 0); + status = socket_create("ipv6", SOCKET_TYPE_DGRAM, &kdc_socket->sock, 0); if (!NT_STATUS_IS_OK(status)) { talloc_free(kdc_socket); return status; } - status = socket_create("ip", SOCKET_TYPE_DGRAM, &kpasswd_socket->sock, 0); + status = socket_create("ipv6", SOCKET_TYPE_DGRAM, &kpasswd_socket->sock, 0); if (!NT_STATUS_IS_OK(status)) { talloc_free(kpasswd_socket); return status; @@ -495,7 +495,7 @@ static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address, kdc->task->lp_ctx, model_ops, &kdc_tcp_stream_ops, - "ip", address, &kdc_port, + "ipv6", address, &kdc_port, lp_socket_options(kdc->task->lp_ctx), kdc); if (!NT_STATUS_IS_OK(status)) { @@ -509,7 +509,7 @@ static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address, kdc->task->lp_ctx, model_ops, &kpasswdd_tcp_stream_ops, - "ip", address, &kpasswd_port, + "ipv6", address, &kpasswd_port, lp_socket_options(kdc->task->lp_ctx), kdc); if (!NT_STATUS_IS_OK(status)) { @@ -534,15 +534,8 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c NTSTATUS status; int i; - num_interfaces = iface_count(ifaces); - - for (i=0; itype) { case SOCKET_TYPE_STREAM: type = SOCK_STREAM; + protocol = IPPROTO_TCP; break; case SOCKET_TYPE_DGRAM: type = SOCK_DGRAM; + protocol = IPPROTO_UDP; break; default: return NT_STATUS_INVALID_PARAMETER; } - sock->fd = socket(PF_INET6, type, 0); + sock->fd = socket(PF_INET6, type, protocol); if (sock->fd == -1) { return map_nt_error_from_unix(errno); } diff --git a/source/lib/util/fault.c b/source/lib/util/fault.c index cb51cbd..40d0534 100644 --- a/source/lib/util/fault.c +++ b/source/lib/util/fault.c @@ -160,7 +160,7 @@ _NORETURN_ static void fault_report(int sig) if (counter) _exit(1); DEBUG(0,("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n")); - DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)",sig,(int)getpid(),SAMBA_VERSION_STRING)); + DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)\n",sig,(int)getpid(), "SAMBA_VERSION_STRING" )); DEBUG(0,("\nPlease read the file BUGS.txt in the distribution\n")); DEBUG(0,("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n")); diff --git a/source/lib/version.c b/source/lib/version.c index e81f463..7a250d8 100644 --- a/source/lib/version.c +++ b/source/lib/version.c @@ -19,7 +19,7 @@ */ #include "includes.h" -#include "version.h" +#include "../version.h" const char *samba_version_string(void) { diff --git a/source/libcli/cldap/cldap.c b/source/libcli/cldap/cldap.c index d10eeb8..0508ea7 100644 --- a/source/libcli/cldap/cldap.c +++ b/source/libcli/cldap/cldap.c @@ -260,7 +260,7 @@ struct cldap_socket *cldap_socket_init(TALLOC_CTX *mem_ctx, cldap->idr = idr_init(cldap); if (cldap->idr == NULL) goto failed; - status = socket_create("ip", SOCKET_TYPE_DGRAM, &cldap->sock, 0); + status = socket_create("ipv6", SOCKET_TYPE_DGRAM, &cldap->sock, 0); if (!NT_STATUS_IS_OK(status)) goto failed; talloc_steal(cldap, cldap->sock); diff --git a/source/rpc_server/service_rpc.c b/source/rpc_server/service_rpc.c index ddcf1c2..e8849a4 100644 --- a/source/rpc_server/service_rpc.c +++ b/source/rpc_server/service_rpc.c @@ -356,7 +356,7 @@ static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct status = stream_setup_socket(event_ctx, dce_ctx->lp_ctx, model_ops, &dcesrv_stream_ops, - "ipv4", address, &port, + "ipv6", address, &port, lp_socket_options(dce_ctx->lp_ctx), dcesrv_sock); if (!NT_STATUS_IS_OK(status)) { diff --git a/source/smb_server/smb_server.c b/source/smb_server/smb_server.c index 4f8e628..0149687 100644 --- a/source/smb_server/smb_server.c +++ b/source/smb_server/smb_server.c @@ -187,7 +187,7 @@ _PUBLIC_ NTSTATUS smbsrv_add_socket(struct event_context *event_context, if (port == 0) continue; status = stream_setup_socket(event_context, lp_ctx, model_ops, &smb_stream_ops, - "ipv4", address, &port, + "ipv6", address, &port, lp_socket_options(lp_ctx), NULL); NT_STATUS_NOT_OK_RETURN(status); diff --git a/source/web_server/web_server.c b/source/web_server/web_server.c index ac83a33..961d61b 100644 --- a/source/web_server/web_server.c +++ b/source/web_server/web_server.c @@ -263,7 +263,7 @@ static void websrv_task_init(struct task_server *task) status = stream_setup_socket(task->event_ctx, task->lp_ctx, model_ops, &web_stream_ops, - "ipv4", address, + "ipv6", address, &port, lp_socket_options(task->lp_ctx), task); if (!NT_STATUS_IS_OK(status)) goto failed; @@ -273,7 +273,7 @@ static void websrv_task_init(struct task_server *task) } else { status = stream_setup_socket(task->event_ctx, task->lp_ctx, model_ops, &web_stream_ops, - "ipv4", lp_socket_address(task->lp_ctx), + "ipv6", lp_socket_address(task->lp_ctx), &port, lp_socket_options(task->lp_ctx), task); if (!NT_STATUS_IS_OK(status)) goto failed; } diff --git a/source/wrepl_server/wrepl_in_connection.c b/source/wrepl_server/wrepl_in_connection.c index 34d94d7..e371a4f 100644 --- a/source/wrepl_server/wrepl_in_connection.c +++ b/source/wrepl_server/wrepl_in_connection.c @@ -297,7 +297,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar status = stream_setup_socket(task->event_ctx, task->lp_ctx, model_ops, &wreplsrv_stream_ops, - "ipv4", address, &port, + "ipv6", address, &port, lp_socket_options(task->lp_ctx), service); if (!NT_STATUS_IS_OK(status)) { @@ -310,7 +310,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar address = lp_socket_address(lp_ctx); status = stream_setup_socket(task->event_ctx, task->lp_ctx, model_ops, &wreplsrv_stream_ops, - "ipv4", address, &port, lp_socket_options(task->lp_ctx), + "ipv6", address, &port, lp_socket_options(task->lp_ctx), service); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("stream_setup_socket(address=%s,port=%u) failed - %s\n",