The Samba-Bugzilla – Attachment 10019 Details for
Bug 10653
Samba won't start on a machine configured with only IPv4.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.0.next
0001-s3-s4-smbd-rpc-ldap-cldap-kdc-services-4.0.patch (text/plain), 5.88 KB, created by
Jeremy Allison
on 2014-06-10 18:06:01 UTC
(
hide
)
Description:
git-am fix for 4.0.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2014-06-10 18:06:01 UTC
Size:
5.88 KB
patch
obsolete
>From a828c37ec5cf080dbb68c52c08910001e24c9238 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 10 Jun 2014 10:48:30 -0700 >Subject: [PATCH] s3/s4: smbd, rpc, ldap, cldap, kdc services. > >Allow us to start if we bind to *either* :: or 0.0.0.0. > >Allows us to cope with systems configured as only IPv4 >or only IPv6. > >Back-port to 4.0.x. > >Bug #10653 - Samba won't start on a machine configured with only IPv4. > >https://bugzilla.samba.org/show_bug.cgi?id=10653 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/smbd/server.c | 6 ++---- > source4/cldap_server/cldap_server.c | 8 +++++++- > source4/dns_server/dns_server.c | 9 ++++++++- > source4/kdc/kdc.c | 12 ++++++++++-- > source4/ldap_server/ldap_server.c | 8 +++++++- > source4/rpc_server/dcerpc_server.c | 8 +++++++- > 6 files changed, 41 insertions(+), 10 deletions(-) > >diff --git a/source3/smbd/server.c b/source3/smbd/server.c >index 86c20ba..7d9be06 100644 >--- a/source3/smbd/server.c >+++ b/source3/smbd/server.c >@@ -840,13 +840,11 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, > continue; > } > >- if (!smbd_open_one_socket(parent, >+ (void)smbd_open_one_socket(parent, > ev_ctx, > msg_ctx, > &ss, >- port)) { >- return false; >- } >+ port); > } > } > } >diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c >index ff8fe13..4b7e31c 100644 >--- a/source4/cldap_server/cldap_server.c >+++ b/source4/cldap_server/cldap_server.c >@@ -158,13 +158,19 @@ 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 (!lpcfg_bind_interfaces_only(lp_ctx)) { >+ int num_binds = 0; > char **wcard = iface_list_wildcard(cldapd); > NT_STATUS_HAVE_NO_MEMORY(wcard); > for (i=0; wcard[i]; i++) { > status = cldapd_add_socket(cldapd, lp_ctx, wcard[i]); >- NT_STATUS_NOT_OK_RETURN(status); >+ if (NT_STATUS_IS_OK(status)) { >+ num_binds++; >+ } > } > talloc_free(wcard); >+ if (num_binds == 0) { >+ return NT_STATUS_INVALID_PARAMETER_MIX; >+ } > } > > /* now we have to also listen on the specific interfaces, >diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c >index cd18c31..bd48e11 100644 >--- a/source4/dns_server/dns_server.c >+++ b/source4/dns_server/dns_server.c >@@ -686,6 +686,7 @@ static NTSTATUS dns_startup_interfaces(struct dns_server *dns, > NT_STATUS_NOT_OK_RETURN(status); > } > } else { >+ int num_binds = 0; > char **wcard; > wcard = iface_list_wildcard(tmp_ctx); > if (wcard == NULL) { >@@ -695,7 +696,13 @@ static NTSTATUS dns_startup_interfaces(struct dns_server *dns, > for (i = 0; wcard[i] != NULL; i++) { > status = dns_add_socket(dns, model_ops, "dns", wcard[i], > DNS_SERVICE_PORT); >- NT_STATUS_NOT_OK_RETURN(status); >+ if (NT_STATUS_IS_OK(status)) { >+ num_binds++; >+ } >+ } >+ if (num_binds == 0) { >+ talloc_free(tmp_ctx); >+ return NT_STATUS_INVALID_PARAMETER_MIX; > } > } > >diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c >index 2fa1755..9960103 100644 >--- a/source4/kdc/kdc.c >+++ b/source4/kdc/kdc.c >@@ -734,6 +734,7 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c > /* if we are allowing incoming packets from any address, then > we need to bind to the wildcard address */ > if (!lpcfg_bind_interfaces_only(lp_ctx)) { >+ int num_binds = 0; > char **wcard = iface_list_wildcard(kdc); > NT_STATUS_HAVE_NO_MEMORY(wcard); > for (i=0; wcard[i]; i++) { >@@ -741,17 +742,24 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c > status = kdc_add_socket(kdc, model_ops, > "kdc", wcard[i], kdc_port, > kdc_process, false); >- NT_STATUS_NOT_OK_RETURN(status); >+ if (NT_STATUS_IS_OK(status)) { >+ num_binds++; >+ } > } > > if (kpasswd_port) { > status = kdc_add_socket(kdc, model_ops, > "kpasswd", wcard[i], kpasswd_port, > kpasswdd_process, false); >- NT_STATUS_NOT_OK_RETURN(status); >+ if (NT_STATUS_IS_OK(status)) { >+ num_binds++; >+ } > } > } > talloc_free(wcard); >+ if (num_binds == 0) { >+ return NT_STATUS_INVALID_PARAMETER_MIX; >+ } > done_wildcard = true; > } > >diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c >index 99595eb..d59668b 100644 >--- a/source4/ldap_server/ldap_server.c >+++ b/source4/ldap_server/ldap_server.c >@@ -964,6 +964,7 @@ static void ldapsrv_task_init(struct task_server *task) > } else { > char **wcard; > int i; >+ int num_binds = 0; > wcard = iface_list_wildcard(task); > if (wcard == NULL) { > DEBUG(0,("No wildcard addresses available\n")); >@@ -971,9 +972,14 @@ static void ldapsrv_task_init(struct task_server *task) > } > for (i=0; wcard[i]; i++) { > status = add_socket(task, task->lp_ctx, model_ops, wcard[i], ldap_service); >- if (!NT_STATUS_IS_OK(status)) goto failed; >+ if (NT_STATUS_IS_OK(status)) { >+ num_binds++; >+ } > } > talloc_free(wcard); >+ if (num_binds == 0) { >+ goto failed; >+ } > } > > ldapi_path = lpcfg_private_path(ldap_service, task->lp_ctx, "ldapi"); >diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c >index e41c055..ad53685 100644 >--- a/source4/rpc_server/dcerpc_server.c >+++ b/source4/rpc_server/dcerpc_server.c >@@ -1741,13 +1741,19 @@ static NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx, > } else { > char **wcard; > int i; >+ int num_binds = 0; > wcard = iface_list_wildcard(dce_ctx); > NT_STATUS_HAVE_NO_MEMORY(wcard); > for (i=0; wcard[i]; i++) { > status = add_socket_rpc_tcp_iface(dce_ctx, e, event_ctx, model_ops, wcard[i]); >- NT_STATUS_NOT_OK_RETURN(status); >+ if (NT_STATUS_IS_OK(status)) { >+ num_binds++; >+ } > } > talloc_free(wcard); >+ if (num_binds == 0) { >+ return NT_STATUS_INVALID_PARAMETER_MIX; >+ } > } > > return NT_STATUS_OK; >-- >2.0.0.526.g5318336 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ab
:
review+
amitay
:
review+
Actions:
View
Attachments on
bug 10653
:
10011
| 10019