[SCM] Samba Shared Repository - branch v4-0-test updated
Karolin Seeger
kseeger at samba.org
Tue Jul 1 03:24:03 MDT 2014
The branch, v4-0-test has been updated
via 34e7133 s3/s4: smbd, rpc, ldap, cldap, kdc services.
via 8a62b81 msg_channel: Fix a 100% CPU loop
via a25becd autobuild: delete $NSS_MODULES in "make clean"
from d6ce4d6 VERSION: Bump version up to 4.0.20.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 34e7133719f8a10848bce4e77e84c8ab1085067f
Author: Jeremy Allison <jra at samba.org>
Date: Tue Jun 10 10:48:30 2014 -0700
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 at samba.org>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-0-test): Tue Jul 1 11:23:13 CEST 2014 on sn-devel-104
commit 8a62b81170b4e158e6592c1ca60470113e744e8f
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 10 14:21:07 2014 +0000
msg_channel: Fix a 100% CPU loop
In a ctdb setup, msg_read_got_ctdb did not set channel->pending_req to
NULL. In smbXsrv_session_close_loop in any error condition this leads to
a 100% loop. smbXsrv_session_close_loop continously retries, but because
close_channel->pending_req is != NULL, msg_read_send will always return
EBUSY, making smbXsrv_session_close_loop retry infinitely.
This patch makes sure that msg_read_got_ctdb correctly NULLs out pending_req.
msg_channel.c does not exist in master anymore, so this patch is 4.1 only.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10663
100% smbd cpu loop in ctdb setups
commit a25becd1458c02a2a9d14eb296e63a7bbc86b85b
Author: Björn Jacke <bj at sernet.de>
Date: Tue Jun 10 15:51:58 2014 +0200
autobuild: delete $NSS_MODULES in "make clean"
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10657
Signed-off-by: Bjoern Jacke <bj at sernet.de>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/Makefile.in | 2 +-
source3/lib/msg_channel.c | 12 ++++++++++++
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 +++++++-
8 files changed, 54 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/Makefile.in b/source3/Makefile.in
index ad3112c..8d2a2cd 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -3223,7 +3223,7 @@ clean:: cleanlibs
-rm -f core */*~ *~ \
*/*.o */*/*.o */*/*/*.o */*/*/*/*.o \
../testsuite/*/*.o \
- ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o ../nsswitch/*. at SHLIBEXT@ \
+ ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o ../nsswitch/*. at SHLIBEXT@ $(NSS_MODULES) \
../client/*.o \
*/*. at SHLIBEXT@ */*/*. at SHLIBEXT@ */*/*/*. at SHLIBEXT@ \
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) \
diff --git a/source3/lib/msg_channel.c b/source3/lib/msg_channel.c
index 5f6ddeb..8c97e21 100644
--- a/source3/lib/msg_channel.c
+++ b/source3/lib/msg_channel.c
@@ -213,6 +213,7 @@ fail:
}
static void msg_read_got_ctdb(struct tevent_req *subreq);
+static int msg_read_state_destructor(struct msg_read_state *s);
struct tevent_req *msg_read_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
@@ -248,6 +249,8 @@ struct tevent_req *msg_read_send(TALLOC_CTX *mem_ctx,
}
channel->pending_req = req;
+ talloc_set_destructor(state, msg_read_state_destructor);
+
channel->ev = ev;
msg_tdb_event = messaging_tdb_event(state, channel->msg, ev);
@@ -268,6 +271,12 @@ struct tevent_req *msg_read_send(TALLOC_CTX *mem_ctx,
return req;
}
+static int msg_read_state_destructor(struct msg_read_state *s)
+{
+ s->channel->pending_req = NULL;
+ return 0;
+}
+
static void msg_read_got_ctdb(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
@@ -278,6 +287,8 @@ static void msg_read_got_ctdb(struct tevent_req *subreq)
enum ndr_err_code ndr_err;
int ret;
+ state->channel->pending_req = NULL;
+
ret = ctdb_msg_read_recv(subreq, talloc_tos(),
&blob.data, &blob.length);
TALLOC_FREE(subreq);
@@ -316,6 +327,7 @@ static void msg_read_got_ctdb(struct tevent_req *subreq)
return;
}
tevent_req_set_callback(subreq, msg_read_got_ctdb, req);
+ state->channel->pending_req = req;
}
int msg_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
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;
--
Samba Shared Repository
More information about the samba-cvs
mailing list