[SCM] Samba Shared Repository - branch v4-6-stable updated
Karolin Seeger
kseeger at samba.org
Wed Nov 15 08:57:37 UTC 2017
The branch, v4-6-stable has been updated
via a56f9ed VERSION: Disable GIT_SNAPSHOT for the 4.6.10 release.
via ee75be8 WHATSNEW: Add release notes for Samba 4.6.10.
via c5d7a7d s4: torture: kernel oplocks. Add smb2.kernel-oplocks.kernel_oplocks8
via c64f58e s3: smbd: kernel oplocks. Replace retry_open() with setup_kernel_oplock_poll_open().
via 8e338d8 selftest: Also run smbtorture smb2.compound with aio enabled
via 8212d13 torture: Add testcase for compound CREATE-WRITE-CLOSE request
via d005547 smbd/aio: Do not go async for SMB2 compound requests
via 13da33f smbd: Move check for SMB2 compound request to new function
via 13e0f78 python: use communicate to fix Popen deadlock
via 2514616 blackbox tests: method to check specific exit codes
via 339f19a tevent: version 0.9.34
via 5cb686d tevent: Fix a race condition
via 148ab67 lib: tevent: Remove select backend.
via 61819d6 tevent: version 0.9.33
via bd4ced8 tevent: handle passing req = NULL to tevent_req_print()
via 4cc205c tevent: avoid calling talloc_get_name(NULL) in tevent_req_default_print()
via 3bafcb5 tevent: version 0.9.32
via c2159d1 tevent: include the finish location in tevent_req_default_print()
via 82572f0 tevent: Simplify create_immediate
via 9abf13e tevent_threads: Fix a rundown race introduced with 1828011317b
via dd516b9 tevent: Fix a race condition in tevent context rundown
via 5a6d5c4 tevent: Fix a memleak on FreeBSD
via 1375ed8 tevent: Add tevent_re_initialise to threaded test
via 83c8bb7 tevent: Re-init threading in tevent_re_initialise
via 1ea66fb tevent: Factor out context initialization
via 03b43ed tevent: Fix a typo
via d4f07b4 Revert "tevent: Fix a race condition"
via 6a43b1b tevent: Fix a race condition
via df214a3 s4: torture: Add smb2 FIND_and_set_DOC test case.
via b3ac865 s3: smbd: Fix delete-on-close after smb2_find
via 38f0d93 s4: torture: kernel_oplocks. Create a regression test case for bug #13058.
via 32ee9d1 Revert "s3/smbd: fix deferred open with streams and kernel oplocks"
via 003eefb Revert "s3: smbclient: Test we can rename with a name containing."
via 5b414d9 s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()
via 35b1523 s4:pyparam: Fix resource leaks on error
via 0d04dba s3:passdb: Make sure the salt is fully initialized before passing
via 733aa17 s3:secrets: Do not leak memory of pw and old_pw
via 781e5a6 ctdb-tests: Process-exists unit tests should wait until PID is registered
via 5038300 ctdb-tests: Wait for fake_ctdbd to start, fail if it doesn't
via 2340354 ctdb-tests: Skip starting fake_ctdbd when current node is disconnected
via b1f422e ctdb-tests: Wait for ctdb_eventd to start, fail if it doesn't
via ec36025 ctdb-tests: Allow wait_until() to be used in unit tests
via 08100fc s3: smbclient: Test we can rename with a name containing.
via f01aac9 s3: smbclient: Ensure we call client_clean_name() before all operations on remote pathnames.
via f36e99e s3: client: Add new utility function client_clean_name().
via 992d7dc vfs_glusterfs: Fix exporting subdirs with shadow_copy2
via 6ef07b5 vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR
via c1d6a04 VERSION: Bump version up to 4.6.10...
from b77f419 VERSION: Disable GIT_SNAPSHOTS for the 4.6.9 release.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-6-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 75 ++++-
ctdb/tests/eventd/scripts/local.sh | 7 +-
ctdb/tests/scripts/common.sh | 44 +++
ctdb/tests/scripts/integration.bash | 44 ---
ctdb/tests/tool/ctdb.getcapabilities.003.sh | 13 +-
ctdb/tests/tool/ctdb.lvs.008.sh | 13 +-
ctdb/tests/tool/ctdb.process-exists.001.sh | 2 +
ctdb/tests/tool/scripts/local.sh | 6 +-
.../ABI/{tevent-0.9.31.sigs => tevent-0.9.32.sigs} | 0
.../ABI/{tevent-0.9.31.sigs => tevent-0.9.33.sigs} | 0
.../ABI/{tevent-0.9.31.sigs => tevent-0.9.34.sigs} | 0
lib/tevent/testsuite.c | 8 +
lib/tevent/tevent.c | 78 ++---
lib/tevent/tevent.h | 2 +-
lib/tevent/tevent_internal.h | 1 -
lib/tevent/tevent_req.c | 11 +-
lib/tevent/tevent_select.c | 280 ----------------
lib/tevent/tevent_threads.c | 37 ++-
lib/tevent/wscript | 4 +-
python/samba/tests/__init__.py | 25 +-
selftest/knownfail | 1 +
source3/client/client.c | 222 ++++++++++++-
source3/client/client_proto.h | 1 +
source3/client/clitar.c | 31 ++
source3/modules/vfs_fruit.c | 2 +-
source3/modules/vfs_glusterfs.c | 13 +-
source3/passdb/machine_account_secrets.c | 18 +-
source3/selftest/tests.py | 8 +-
source3/smbd/aio.c | 8 +
source3/smbd/dir.c | 4 +-
source3/smbd/globals.h | 1 +
source3/smbd/open.c | 201 +++++-------
source3/smbd/smb2_read.c | 2 +-
source3/smbd/smb2_server.c | 5 +
source3/torture/torture.c | 10 +-
source4/param/pyparam.c | 6 +
source4/torture/smb2/compound.c | 73 +++++
source4/torture/smb2/delete-on-close.c | 66 ++++
source4/torture/smb2/oplock.c | 353 +++++++++++++++++++++
40 files changed, 1126 insertions(+), 551 deletions(-)
copy lib/tevent/ABI/{tevent-0.9.31.sigs => tevent-0.9.32.sigs} (100%)
copy lib/tevent/ABI/{tevent-0.9.31.sigs => tevent-0.9.33.sigs} (100%)
copy lib/tevent/ABI/{tevent-0.9.31.sigs => tevent-0.9.34.sigs} (100%)
delete mode 100644 lib/tevent/tevent_select.c
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index 4fe4545..4ccbdb5 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=9
+SAMBA_VERSION_RELEASE=10
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 65c1137..375d340 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,74 @@
+ ==============================
+ Release Notes for Samba 4.6.10
+ November 15, 2017
+ =============================
+
+
+This is an additional bugfix release to address a possible data corruption
+issue. Please update immediately! For details, please see
+
+ https://bugzilla.samba.org/show_bug.cgi?id=13130
+
+Samba 4.6.0 and newer is affected by this issue.
+
+
+Changes since 4.6.9:
+--------------------
+
+o Michael Adam <obnox at samba.org>
+ * BUG 13091: vfs_glusterfs: Fix exporting subdirs with shadow_copy2.
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 13093: s3: smbclient: Ensure we call client_clean_name() before all
+ operations on remote pathnames.
+ * BUG 13121: Non-smbd processes using kernel oplocks can hang smbd.
+
+o Joe Guo <joeg at catalyst.net.nz>
+ * BUG 13127: python: use communicate to fix Popen deadlock.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 13130: smbd on disk file corruption bug under heavy threaded load.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 13130: tevent: version 0.9.34.
+
+o Anoop C S <anoopcs at redhat.com>
+ * BUG 13086: vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR.
+
+o Christof Schmitt <cs at samba.org>
+ * BUG 13047: smbd: Move check for SMB2 compound request to new function.
+
+o Andreas Schneider <asn at samba.org>
+ * BUG 13100: s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd().
+ * BUG 13101: s4:pyparam: Fix resource leaks on error.
+
+o Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
+ * BUG 13118: s3: smbd: Fix delete-on-close after smb2_find.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
=============================
Release Notes for Samba 4.6.9
October 25, 2017
@@ -94,8 +165,8 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
=============================
Release Notes for Samba 4.6.8
diff --git a/ctdb/tests/eventd/scripts/local.sh b/ctdb/tests/eventd/scripts/local.sh
index 343205e..c8f7775 100644
--- a/ctdb/tests/eventd/scripts/local.sh
+++ b/ctdb/tests/eventd/scripts/local.sh
@@ -42,7 +42,7 @@ cleanup_eventd ()
setup_eventd ()
{
- debug "Setting up eventd"
+ echo "Setting up eventd"
if [ -n "$1" ]; then
extra_args="-D $1"
@@ -53,9 +53,8 @@ setup_eventd ()
-e "$eventd_scriptdir" \
-l "file:" -d "DEBUG" $extra_args 2>&1 | tee "$eventd_logfile" &
# Wait till eventd is running
- while [ ! -S "$eventd_socket" ] ; do
- sleep 1
- done
+ wait_until 10 test -S "$eventd_socket" || \
+ die "ctdb_eventd failed to start"
test_cleanup cleanup_eventd
}
diff --git a/ctdb/tests/scripts/common.sh b/ctdb/tests/scripts/common.sh
index 287fb71..e20b6d0 100644
--- a/ctdb/tests/scripts/common.sh
+++ b/ctdb/tests/scripts/common.sh
@@ -43,3 +43,47 @@ die ()
{
echo "$1" >&2 ; exit ${2:-1}
}
+
+# Wait until either timeout expires or command succeeds. The command
+# will be tried once per second, unless timeout has format T/I, where
+# I is the recheck interval.
+wait_until ()
+{
+ local timeout="$1" ; shift # "$@" is the command...
+
+ local interval=1
+ case "$timeout" in
+ */*)
+ interval="${timeout#*/}"
+ timeout="${timeout%/*}"
+ esac
+
+ local negate=false
+ if [ "$1" = "!" ] ; then
+ negate=true
+ shift
+ fi
+
+ echo -n "<${timeout}|"
+ local t=$timeout
+ while [ $t -gt 0 ] ; do
+ local rc=0
+ "$@" || rc=$?
+ if { ! $negate && [ $rc -eq 0 ] ; } || \
+ { $negate && [ $rc -ne 0 ] ; } ; then
+ echo "|$(($timeout - $t))|"
+ echo "OK"
+ return 0
+ fi
+ local i
+ for i in $(seq 1 $interval) ; do
+ echo -n .
+ done
+ t=$(($t - $interval))
+ sleep $interval
+ done
+
+ echo "*TIMEOUT*"
+
+ return 1
+}
diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash
index b2a3451..86dbbdc 100644
--- a/ctdb/tests/scripts/integration.bash
+++ b/ctdb/tests/scripts/integration.bash
@@ -259,50 +259,6 @@ delete_ip_from_all_nodes ()
#######################################
-# Wait until either timeout expires or command succeeds. The command
-# will be tried once per second, unless timeout has format T/I, where
-# I is the recheck interval.
-wait_until ()
-{
- local timeout="$1" ; shift # "$@" is the command...
-
- local interval=1
- case "$timeout" in
- */*)
- interval="${timeout#*/}"
- timeout="${timeout%/*}"
- esac
-
- local negate=false
- if [ "$1" = "!" ] ; then
- negate=true
- shift
- fi
-
- echo -n "<${timeout}|"
- local t=$timeout
- while [ $t -gt 0 ] ; do
- local rc=0
- "$@" || rc=$?
- if { ! $negate && [ $rc -eq 0 ] ; } || \
- { $negate && [ $rc -ne 0 ] ; } ; then
- echo "|$(($timeout - $t))|"
- echo "OK"
- return 0
- fi
- local i
- for i in $(seq 1 $interval) ; do
- echo -n .
- done
- t=$(($t - $interval))
- sleep $interval
- done
-
- echo "*TIMEOUT*"
-
- return 1
-}
-
sleep_for ()
{
echo -n "=${1}|"
diff --git a/ctdb/tests/tool/ctdb.getcapabilities.003.sh b/ctdb/tests/tool/ctdb.getcapabilities.003.sh
index 91d38b8..74702d5 100755
--- a/ctdb/tests/tool/ctdb.getcapabilities.003.sh
+++ b/ctdb/tests/tool/ctdb.getcapabilities.003.sh
@@ -10,12 +10,13 @@ setup_nodes <<EOF
192.168.20.43
EOF
-setup_ctdbd <<EOF
-NODEMAP
-0 192.168.20.41 0x1 CURRENT RECMASTER
-1 192.168.20.42 0x0
-2 192.168.20.43 0x0
-EOF
+# Don't setup ctdbd - disconnected on current node
+#setup_ctdbd <<EOF
+#NODEMAP
+#0 192.168.20.41 0x1 CURRENT RECMASTER
+#1 192.168.20.42 0x0
+#2 192.168.20.43 0x0
+#EOF
required_result 1 <<EOF
connect() failed, errno=2
diff --git a/ctdb/tests/tool/ctdb.lvs.008.sh b/ctdb/tests/tool/ctdb.lvs.008.sh
index a0e24b1..6cdd702 100755
--- a/ctdb/tests/tool/ctdb.lvs.008.sh
+++ b/ctdb/tests/tool/ctdb.lvs.008.sh
@@ -13,12 +13,13 @@ EOF
setup_lvs <<EOF
EOF
-setup_ctdbd <<EOF
-NODEMAP
-0 192.168.20.41 0x1 CURRENT RECMASTER
-1 192.168.20.42 0x0
-2 192.168.20.43 0x0
-EOF
+# Don't setup ctdbd - disconnected on current node
+#setup_ctdbd <<EOF
+#NODEMAP
+#0 192.168.20.41 0x1 CURRENT RECMASTER
+#1 192.168.20.42 0x0
+#2 192.168.20.43 0x0
+#EOF
#####
diff --git a/ctdb/tests/tool/ctdb.process-exists.001.sh b/ctdb/tests/tool/ctdb.process-exists.001.sh
index 2339344..1b6d213 100755
--- a/ctdb/tests/tool/ctdb.process-exists.001.sh
+++ b/ctdb/tests/tool/ctdb.process-exists.001.sh
@@ -14,6 +14,8 @@ EOF
dummy_client -s $ctdbd_socket &
pid=$!
+wait_until 10 $CTDB process-exists "$pid"
+
ok "PID $pid exists"
simple_test "$pid"
diff --git a/ctdb/tests/tool/scripts/local.sh b/ctdb/tests/tool/scripts/local.sh
index 2c9be2d..7cee84a 100644
--- a/ctdb/tests/tool/scripts/local.sh
+++ b/ctdb/tests/tool/scripts/local.sh
@@ -48,10 +48,14 @@ cleanup_ctdbd ()
setup_ctdbd ()
{
- debug "Setting up fake ctdbd"
+ echo "Setting up fake ctdbd"
$VALGRIND fake_ctdbd -d "$FAKE_CTDBD_DEBUGLEVEL" \
-s "$ctdbd_socket" -p "$ctdbd_pidfile"
+ # Wait till fake_ctdbd is running
+ wait_until 10 test -S "$ctdbd_socket" || \
+ die "fake_ctdbd failed to start"
+
test_cleanup cleanup_ctdbd
}
diff --git a/lib/tevent/ABI/tevent-0.9.31.sigs b/lib/tevent/ABI/tevent-0.9.32.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.31.sigs
copy to lib/tevent/ABI/tevent-0.9.32.sigs
diff --git a/lib/tevent/ABI/tevent-0.9.31.sigs b/lib/tevent/ABI/tevent-0.9.33.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.31.sigs
copy to lib/tevent/ABI/tevent-0.9.33.sigs
diff --git a/lib/tevent/ABI/tevent-0.9.31.sigs b/lib/tevent/ABI/tevent-0.9.34.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.31.sigs
copy to lib/tevent/ABI/tevent-0.9.34.sigs
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
index 4783ab4..ee29e5b 100644
--- a/lib/tevent/testsuite.c
+++ b/lib/tevent/testsuite.c
@@ -1207,6 +1207,14 @@ static bool test_multi_tevent_threaded_2(struct torture_context *test,
ev = tevent_context_init(test);
torture_assert(test, ev != NULL, "tevent_context_init failed");
+ /*
+ * tevent_re_initialise used to have a bug where it did not
+ * re-initialise the thread support after taking it
+ * down. Excercise that code path.
+ */
+ ret = tevent_re_initialise(ev);
+ torture_assert(test, ret == 0, "tevent_re_initialise failed");
+
tctx = tevent_threaded_context_create(ev, ev);
torture_assert(test, tctx != NULL,
"tevent_threaded_context_create failed");
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 65b101f..a2d2003 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -128,7 +128,6 @@ static void tevent_backend_init(void)
done = true;
- tevent_select_init();
tevent_poll_init();
tevent_poll_mt_init();
#if defined(HAVE_EPOLL)
@@ -341,6 +340,11 @@ int tevent_common_context_destructor(struct tevent_context *ev)
DLIST_REMOVE(ev->threaded_contexts, tctx);
}
+
+ ret = pthread_mutex_destroy(&ev->scheduled_mutex);
+ if (ret != 0) {
+ abort();
+ }
#endif
tevent_common_wakeup_fini(ev);
@@ -392,46 +396,26 @@ int tevent_common_context_destructor(struct tevent_context *ev)
return 0;
}
-/*
- create a event_context structure for a specific implemementation.
- This must be the first events call, and all subsequent calls pass
- this event_context as the first element. Event handlers also
- receive this as their first argument.
-
- This function is for allowing third-party-applications to hook in gluecode
- to their own event loop code, so that they can make async usage of our client libs
-
- NOTE: use tevent_context_init() inside of samba!
-*/
-struct tevent_context *tevent_context_init_ops(TALLOC_CTX *mem_ctx,
- const struct tevent_ops *ops,
- void *additional_data)
+static int tevent_common_context_constructor(struct tevent_context *ev)
{
- struct tevent_context *ev;
int ret;
- ev = talloc_zero(mem_ctx, struct tevent_context);
- if (!ev) return NULL;
-
#ifdef HAVE_PTHREAD
ret = pthread_once(&tevent_atfork_initialized, tevent_prep_atfork);
if (ret != 0) {
- talloc_free(ev);
- return NULL;
+ return ret;
}
ret = pthread_mutex_init(&ev->scheduled_mutex, NULL);
if (ret != 0) {
- talloc_free(ev);
- return NULL;
+ return ret;
}
ret = pthread_mutex_lock(&tevent_contexts_mutex);
if (ret != 0) {
pthread_mutex_destroy(&ev->scheduled_mutex);
- talloc_free(ev);
- return NULL;
+ return ret;
}
DLIST_ADD(tevent_contexts, ev);
@@ -440,11 +424,40 @@ struct tevent_context *tevent_context_init_ops(TALLOC_CTX *mem_ctx,
if (ret != 0) {
abort();
}
-
#endif
talloc_set_destructor(ev, tevent_common_context_destructor);
+ return 0;
+}
+
+/*
+ create a event_context structure for a specific implemementation.
+ This must be the first events call, and all subsequent calls pass
+ this event_context as the first element. Event handlers also
+ receive this as their first argument.
+
+ This function is for allowing third-party-applications to hook in gluecode
+ to their own event loop code, so that they can make async usage of our client libs
+
+ NOTE: use tevent_context_init() inside of samba!
+*/
+struct tevent_context *tevent_context_init_ops(TALLOC_CTX *mem_ctx,
+ const struct tevent_ops *ops,
+ void *additional_data)
+{
+ struct tevent_context *ev;
+ int ret;
+
+ ev = talloc_zero(mem_ctx, struct tevent_context);
+ if (!ev) return NULL;
+
+ ret = tevent_common_context_constructor(ev);
+ if (ret != 0) {
+ talloc_free(ev);
+ return NULL;
+ }
+
ev->ops = ops;
ev->additional_data = additional_data;
@@ -602,16 +615,7 @@ struct tevent_immediate *_tevent_create_immediate(TALLOC_CTX *mem_ctx,
im = talloc(mem_ctx, struct tevent_immediate);
if (im == NULL) return NULL;
- im->prev = NULL;
- im->next = NULL;
- im->event_ctx = NULL;
- im->create_location = location;
- im->handler = NULL;
- im->private_data = NULL;
- im->handler_name = NULL;
- im->schedule_location = NULL;
- im->cancel_fn = NULL;
- im->additional_data = NULL;
+ *im = (struct tevent_immediate) { .create_location = location };
return im;
}
@@ -875,6 +879,8 @@ int tevent_re_initialise(struct tevent_context *ev)
{
tevent_common_context_destructor(ev);
+ tevent_common_context_constructor(ev);
+
return ev->ops->context_init(ev);
}
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index ba4bb4d..728cf62 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -1777,7 +1777,7 @@ void tevent_thread_proxy_schedule(struct tevent_thread_proxy *tp,
*
* It is the duty of the caller of tevent_threaded_context_create() to
* keep the event context around longer than any
- * tevent_threaded_context. tevent will abort if ev is talllc_free'ed
--
Samba Shared Repository
More information about the samba-cvs
mailing list