The branch, master has been updated via be704c8 selftest: add dbwrap_tdb_require_mutexes:* = yes, when using dbwrap_tdb_mutexes:* = yes by default via 719428f s3:dbwrap: add dbwrap_tdb_require_mutexes:*= option via 00f4bf3 test:docs: remove unused param_table/get_param_table_full() via 9219756 tldap: Add a missing TALLOC_FREE(frame) from 4953b1f Fix ETIME handling for Solaris event ports.
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit be704c87650d85159c054b03fc94e2eee1eab17e Author: Stefan Metzmacher <me...@samba.org> Date: Sat Jan 16 10:20:32 2016 +0100 selftest: add dbwrap_tdb_require_mutexes:* = yes, when using dbwrap_tdb_mutexes:* = yes by default export SELFTEST_DONT_REQUIRE_TDB_MUTEX_SUPPORT=1 can overwrite this. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Autobuild-User(master): Ralph Böhme <s...@samba.org> Autobuild-Date(master): Tue Feb 9 01:42:14 CET 2016 on sn-devel-144 commit 719428f587702fa07b88d23ccf484dd7fd9ccc3e Author: Stefan Metzmacher <me...@samba.org> Date: Sat Jan 16 10:19:23 2016 +0100 s3:dbwrap: add dbwrap_tdb_require_mutexes:*= option This is similar to dbwrap_tdb_mutexes:*= (which is autodetected by default), but dbwrap_tdb_require_mutexes is off by default. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 00f4bf32db3e4cde5dc5278de218efc49a2f4fe1 Author: Michael Adam <ob...@samba.org> Date: Tue Feb 2 15:32:26 2016 +0100 test:docs: remove unused param_table/get_param_table_full() No tests use this any more, hence we should not parse the file anymore either. It is generated directly from the parametersr.all.xml file. Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> commit 9219756a369d31f44a77de2c43b8176c95108665 Author: Volker Lendecke <v...@samba.org> Date: Mon Feb 8 14:40:19 2016 +0100 tldap: Add a missing TALLOC_FREE(frame) Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> ----------------------------------------------------------------------- Summary of changes: python/samba/tests/docs.py | 64 ---------------------------------------- selftest/target/Samba3.pm | 4 +++ selftest/target/Samba4.pm | 4 +++ source3/lib/dbwrap/dbwrap_open.c | 10 +++++++ source3/lib/tldap.c | 2 +- 5 files changed, 19 insertions(+), 65 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py index e7123b6..238b5c7 100644 --- a/python/samba/tests/docs.py +++ b/python/samba/tests/docs.py @@ -59,64 +59,6 @@ def get_documented_parameters(sourcedir): p.close() -def get_param_table_full(sourcedir, filename="lib/param/param_table_static.c"): - # Reading entries from source code - f = open(os.path.join(sourcedir, filename), "r") - try: - # burn through the preceding lines - while True: - l = f.readline() - if l.startswith("struct parm_struct parm_table"): - break - - for l in f.readlines(): - - if re.match("^\s*\}\;\s*$", l): - # end of the table reached - break - - if re.match("^\s*\{\s*$", l): - # start a new entry - _label = "" - _type = "" - _class = "" - _offset = "" - _special = "" - _enum_list = "" - _flags = "" - continue - - if re.match("^\s*\},\s*$", l): - # finish the entry - yield _label, _type, _class, _offset, _special, _enum_list, _flags - continue - - m = re.match("^\s*\.([^\s]+)\s*=\s*(.*),.*", l) - if not m: - continue - - attrib = m.group(1) - value = m.group(2) - - if attrib == "label": - _label = value - elif attrib == "type": - _type = value - elif attrib == "p_class": - _class = value - elif attrib == "offset": - _offset = value - elif attrib == "special": - _special = value - elif attrib == "enum_list": - _special = value - elif attrib == "flags": - _flags = value - - finally: - f.close() - - def get_documented_tuples(sourcedir, omit_no_default=True): path = os.path.join(sourcedir, "bin", "default", "docs-xml", "smbdotconf") if not os.path.exists(os.path.join(path, "parameters.all.xml")): @@ -195,12 +137,6 @@ class SmbDotConfTests(TestCase): self.fail("Unable to load documented parameters") try: - self.table_gen = set(get_param_table_full(self.topdir, - "bin/default/lib/param/param_table_gen.c")) - except: - self.fail("Unable to load generated parameter table") - - try: self.defaults = set(get_documented_tuples(self.topdir)) except: self.fail("Unable to load parameters") diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 076bcb1..cb9ee08 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -308,10 +308,14 @@ sub setup_nt4_member($$$) print "PROVISIONING MEMBER..."; + my $require_mutexes = "dbwrap_tdb_require_mutexes:* = yes"; + $require_mutexes = "" if ($ENV{SELFTEST_DONT_REQUIRE_TDB_MUTEX_SUPPORT} eq "1"); + my $member_options = " security = domain server signing = on dbwrap_tdb_mutexes:* = yes + ${require_mutexes} "; my $ret = $self->provision($prefix, "LOCALNT4MEMBER3", diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index fbefda7..2343cec 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1794,11 +1794,15 @@ sub provision_ad_dc($$) my $lockdir="$prefix_abs/lockdir"; my $conffile="$prefix_abs/etc/smb.conf"; + my $require_mutexes = "dbwrap_tdb_require_mutexes:* = yes"; + $require_mutexes = "" if ($ENV{SELFTEST_DONT_REQUIRE_TDB_MUTEX_SUPPORT} eq "1"); + my $extra_smbconf_options = " server services = -smb +s3fs xattr_tdb:file = $prefix_abs/statedir/xattr.tdb dbwrap_tdb_mutexes:* = yes + ${require_mutexes} kernel oplocks = no kernel change notify = no diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c index 59fb3e4..98e4f41 100644 --- a/source3/lib/dbwrap/dbwrap_open.c +++ b/source3/lib/dbwrap/dbwrap_open.c @@ -97,6 +97,7 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, if (tdb_flags & TDB_CLEAR_IF_FIRST) { const char *base; bool try_mutex = false; + bool require_mutex = false; base = strrchr_m(name, '/'); if (base != NULL) { @@ -111,6 +112,15 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, if (try_mutex && tdb_runtime_check_for_robust_mutexes()) { tdb_flags |= TDB_MUTEX_LOCKING; } + + require_mutex = lp_parm_bool(-1, "dbwrap_tdb_require_mutexes", + "*", require_mutex); + require_mutex = lp_parm_bool(-1, "dbwrap_tdb_require_mutexes", + base, require_mutex); + + if (require_mutex) { + tdb_flags |= TDB_MUTEX_LOCKING; + } } sockname = lp_ctdbd_socket(); diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index a702783..6f42e61 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -1987,7 +1987,7 @@ TLDAPRC tldap_search(struct tldap_context *ld, rc = tldap_search_all_recv(req, mem_ctx, &msgs, &result); TALLOC_FREE(req); if (!TLDAP_RC_IS_SUCCESS(rc)) { - return rc; + goto fail; } TALLOC_FREE(ld->last_msg); -- Samba Shared Repository