Volker Lendecke [Wed, 24 Oct 2018 12:31:34 +0000 (14:31 +0200)]
tdb: Make record deletion circular-chain safe
Before this patch we had 3 loops walking a hash chain to delete
records:
tdb_do_delete() to find the predecessor of the record that was to be
deleted. tdb_count_dead(), the name says it all and tdb_purge_dead()
to give back all dead records from a chain to the freelist.
This patch introduces tdb_trim_dead that walks a hash chain just
once. While it does so it counts the number of dead records, and all
records beyond tdb->max_dead_records are moved to the freelist.
Normal record deletion now works by always marking a record as dead in
step 1 and then calling tdb_trim_dead. This is made safe against
circular chains by doing the slow chain walk only in the case when we
did not delete a dead record during our walk.
It changes our dynamics a bit:
When deleting a record with non-zero max_dead_records, now we always
leave that number of records around when deleting, doing a blocking
lock on the freelist when we found too many dead records.
Previously when exceeding max_dead_records we wiped all dead records
to start accumulating them from scratch, assuming we could lock the
freelist in a nonblocking fashion.
The net effect for an uncontended freelist is the same: In
tdb_allocate() we still completely hand over all dead records to the
freelist when we could lock it, it just happens later than without
this patch.
This means for a lightly loaded system we will potentially leave more
dead records around in databases like locking.tdb. However, on a
heavily loaded system we become more predictable: If the freelist is
so heavily contended that across many deletes we can't get hold of it,
previously we accumulated more dead records than max_dead_records
would allow. This is a really lowlevel tradeoff that is likely hard to
measure, but to me becoming more deterministic without sacrificing too
much parallelism (we keep more dead records around) is worth trying.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 30 02:48:38 CET 2018 on sn-devel-144
Volker Lendecke [Thu, 25 Oct 2018 13:59:48 +0000 (15:59 +0200)]
tdb: Do early RDONLY error check for tdb_delete
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 25 Oct 2018 13:55:29 +0000 (15:55 +0200)]
tdb: Purge dead records whenever we block the freelist
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 23 Oct 2018 11:40:34 +0000 (13:40 +0200)]
tdb: Don't delete dead records in traverse
The next commit will change the handling of dead records, removing the
"tdb_do_delete" function. As traverses should not happen in normal
operations, dead records from them should be rare, and relying on
traverses to remove them is a very bad idea IMHO.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 24 Oct 2018 05:26:49 +0000 (07:26 +0200)]
tdb: Align an integer type
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 25 Oct 2018 18:53:52 +0000 (20:53 +0200)]
tdb: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Fri, 19 Oct 2018 10:15:42 +0000 (12:15 +0200)]
vfs_fruit: remove check for number of xattrs from ad_convert_xattr
Turns out that there exist AppleDouble files with an extended FinderInfo
entry that includes the xattr marshall buffer, but the count of xattrs
in the buffer is just zero.
We do want to discard this extended FinderInfo entry and convert it to a
simple fixed size FinderInfo entry, so remove the check.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Douglas Bagnall [Fri, 26 Oct 2018 07:25:59 +0000 (20:25 +1300)]
python: do not use "is" for string equality
This is not always going to work, and is not guaranteed to be
consistent even between minor versions.
Here is a simple counterexample:
>>> a = 'hello'
>>> a is 'hello'
True
>>> a is 'hello'.lower()
False
>>> a == a.lower()
True
Possibly it always works for the empty string, but we cannot rely
on that.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 29 23:13:36 CET 2018 on sn-devel-144
Douglas Bagnall [Thu, 25 Oct 2018 09:09:59 +0000 (22:09 +1300)]
python/samdb: properly use property()
Python's property() function works like this:
property([getter[, setter[, delete[, doc]]]])
but we have been forgetting the delete function, or rather setting it
to be a string. A string is not callable and is unlikely to succeed at
deleting the property.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 29 Oct 2018 18:45:58 +0000 (19:45 +0100)]
s3:winbind: Check return code of initialize_password_db()
See https://retrace.fedoraproject.org/faf/reports/
1577174/
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13668
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
David Mulder [Wed, 24 Oct 2018 16:55:02 +0000 (10:55 -0600)]
lib:socket: If returning early, set ifaces
Prevents a segfault in load_interfaces() when total interfaces == 1.
Fixes regression caused by
da68a1b2f417ec82ea4ed3e7a4d867cef8ca8f93.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13665
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Oct 28 00:35:35 CEST 2018 on sn-devel-144
Volker Lendecke [Tue, 25 Sep 2018 15:59:20 +0000 (08:59 -0700)]
lib: Remove unused tdb_trans_* functions
The transactions have all moved to dbwrap
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 19 Oct 2018 13:24:14 +0000 (15:24 +0200)]
s3:torture: Rename the test file and remove it if it exists
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 19 Oct 2018 12:38:34 +0000 (14:38 +0200)]
s3:torture: Don't use the same testdir twice
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 18 Oct 2018 12:00:13 +0000 (14:00 +0200)]
s3:selftest: Fix test names of smbtorture_s3.plain
The env name will be appended. There is no need to have it twice. Can't
we remove the tests againa ad_dc_ntvfs completely?
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christian Ambach [Tue, 23 Oct 2018 18:05:04 +0000 (20:05 +0200)]
s3:utils/smbget fix recursive download with empty source directories
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13199
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 26 09:58:07 CEST 2018 on sn-devel-144
Christian Ambach [Mon, 22 Oct 2018 14:28:21 +0000 (16:28 +0200)]
s3:utils/smbget add error handling for mkdir() calls
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Mon, 22 Oct 2018 14:22:00 +0000 (16:22 +0200)]
s3:script/tests reduce code duplication
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 22:52:49 +0000 (11:52 +1300)]
pytests/samba3sam: unshadow and fix a search_non_mapped test
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Fri Oct 26 00:50:37 CEST 2018 on sn-devel-144
Douglas Bagnall [Thu, 11 Oct 2018 01:45:58 +0000 (14:45 +1300)]
python/tests/ou: unshadow a test
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 24 Oct 2018 22:40:53 +0000 (11:40 +1300)]
samba-tool tests: fix bytes/str issue in masked test
This test will be revealed to the world in the next commit.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 01:42:40 +0000 (14:42 +1300)]
python/tests/raw_protocol: reveal shadowed test via disambiguation
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 04:00:46 +0000 (17:00 +1300)]
s4/dsdb/pytest/ldap_schema: remove duplicate test
The tests differ in two lines, thus:
def test_subClassOf(self):
- """ Testing usage of custom child schamaClass
+ """ Testing usage of custom child classSchema
[...]
-governsId: 1.3.6.1.4.1.7165.4.6.2.6.3.""" + str(random.randint(1, 100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.6.7.""" + str(random.randint(1, 100000)) + """
with the governsId OID changed because it was noticed they were colliding.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:47:44 +0000 (16:47 +1300)]
ldb/tests/py/api: reveal shadowed casefold test
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:15:43 +0000 (16:15 +1300)]
python/tests/kcc_utils: disambiguate/unshadow a test
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:50:06 +0000 (13:50 +1300)]
python/tests/lsa_string: remove duplicate method
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 25 Oct 2018 09:34:31 +0000 (22:34 +1300)]
python/gp_parse/gp_inf: remove unused variables
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:23:01 +0000 (13:23 +1300)]
python/gp_parse/gp_inf: remove shadowed method
The 'from_xml()' definition is replaced a few lines down
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 05:33:48 +0000 (18:33 +1300)]
s4/scripting/demodirsync: fix syntax error
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 05:32:52 +0000 (18:32 +1300)]
s4/scripting: py3 style 0o123 octal, not 0123
this works with py2.6+ too.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 04:23:54 +0000 (17:23 +1300)]
s4/dsdb/pytest/sort: use compat.cmp_fn instead of cmp
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
Douglas Bagnall [Thu, 11 Oct 2018 04:06:32 +0000 (17:06 +1300)]
s4/dsdb/pytest/ad_dc_medley: do not use xrange
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:52:14 +0000 (16:52 +1300)]
s4/dsdb/pytests: Py3 compatitble except clauses
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:04:38 +0000 (16:04 +1300)]
script/show_test_time: approach python 3 compatibility
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:37:28 +0000 (13:37 +1300)]
python/kcc: use compat.cmp_fn (PY3)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:07:30 +0000 (13:07 +1300)]
python/remove_dc: use a local variable in offline_remove_server
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:52:09 +0000 (12:52 +1300)]
python/samba/common: py3 compat raw_input
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:40:09 +0000 (12:40 +1300)]
samba-tool ldapcmp: use ValueError, not obsolete StandardError
The error is in the value, and StandardError is not in Python 3
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 24 Oct 2018 02:56:20 +0000 (15:56 +1300)]
python tests: always use Python's unicodedata
We had our own special version with very few entries, but only
used it in one place.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 05:31:09 +0000 (18:31 +1300)]
pytest/dcerpc.integer: force py2 long int without incompatible syntax
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:52:28 +0000 (16:52 +1300)]
s4/selftest/tests: don't use import *
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:51:23 +0000 (16:51 +1300)]
s3/selftest/tests: don't use import *
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:05:23 +0000 (16:05 +1300)]
selftest/tests.py: avoid import *
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:40:59 +0000 (13:40 +1300)]
python/tests/common: avoid import *
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:05:11 +0000 (16:05 +1300)]
selftest/perftests: avoid import *
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 01:51:55 +0000 (14:51 +1300)]
python/tests/kcc_*: avoid * imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 01:44:02 +0000 (14:44 +1300)]
python/tests/kcc.graph: avoid import *
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 05:33:23 +0000 (18:33 +1300)]
s4/scripting/pfm_verify: remove duplicate import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:34:53 +0000 (12:34 +1300)]
samba-tool: samba.getopt is not used here
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 05:25:53 +0000 (18:25 +1300)]
auth/cred/tests/bind: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 04:24:22 +0000 (17:24 +1300)]
s4/dsdb/pytest/: unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 04:07:22 +0000 (17:07 +1300)]
s4/dsdb/pytest/dsdb_schema_info: do not double import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 04:07:05 +0000 (17:07 +1300)]
s4/dsdb/pytest/dirsync: do not double import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:50:49 +0000 (16:50 +1300)]
py/tests: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:50:17 +0000 (16:50 +1300)]
tests/blackbox/py: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:49:47 +0000 (16:49 +1300)]
tdb/test/_tdbtext: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:49:05 +0000 (16:49 +1300)]
talloc/test/pytalloc: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:47:11 +0000 (16:47 +1300)]
ldb/tests/_ldb_text: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:46:44 +0000 (16:46 +1300)]
ldb-samba/tests/match-rules: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:05:57 +0000 (16:05 +1300)]
wintest/test-s3: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 03:04:00 +0000 (16:04 +1300)]
script/generate_param.py: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 01:33:49 +0000 (14:33 +1300)]
python/tests: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 01:00:30 +0000 (14:00 +1300)]
python/tests/samdb: avoid useless local variable
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:58:50 +0000 (13:58 +1300)]
python/tests/*: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:50:43 +0000 (13:50 +1300)]
python/tests/netbios: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:45:54 +0000 (13:45 +1300)]
python/tests/getdcname: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:44:45 +0000 (13:44 +1300)]
python/tests/dsdb_schema_attr: remove unused/duplicate imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:42:10 +0000 (13:42 +1300)]
python/tests/dns*: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:39:06 +0000 (13:39 +1300)]
python/provision: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:23:35 +0000 (13:23 +1300)]
python/gp_parse/gp_pol: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:10:33 +0000 (13:10 +1300)]
python/schema: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:06:40 +0000 (13:06 +1300)]
python/ntacls: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:05:32 +0000 (13:05 +1300)]
python/gp_ext_loader: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:57:15 +0000 (12:57 +1300)]
python/forest_update: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:55:41 +0000 (12:55 +1300)]
python/domain_update: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:45:54 +0000 (12:45 +1300)]
samba-tool domain: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:41:28 +0000 (12:41 +1300)]
samba-tool user: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:38:58 +0000 (12:38 +1300)]
samba-tool ldapcmp: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Wed, 10 Oct 2018 23:37:36 +0000 (12:37 +1300)]
samba-tool drs: remove duplicate and unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:49:05 +0000 (13:49 +1300)]
python/tests/__init__: import what we need
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 00:47:22 +0000 (13:47 +1300)]
python/tests/gpo: import what we need (errno, not gp_log)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Douglas Bagnall [Thu, 11 Oct 2018 01:43:29 +0000 (14:43 +1300)]
python/tests/unix: fix spelling and import of text_type
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 14:26:09 +0000 (16:26 +0200)]
s3:smbd: Move a variable declaration closer to its use
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Oct 25 21:44:17 CEST 2018 on sn-devel-144
Volker Lendecke [Mon, 24 Sep 2018 13:46:27 +0000 (15:46 +0200)]
smbd: Slightly optimize delay_rename_for_lease_break
Do the checks with increasing cost, possibly avoid more expensive ones
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Thu, 18 Oct 2018 03:46:03 +0000 (05:46 +0200)]
lib: Avoid an "includes.h"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Mon, 24 Sep 2018 13:40:46 +0000 (06:40 -0700)]
smbd: Replace some GUID_string by GUID_buf_string
It's only debug statements, but I would like to promote the
stack-allocation routines as good practice where they make sense.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Tue, 23 Oct 2018 03:53:24 +0000 (05:53 +0200)]
tdbtorture: Align integer types
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Mon, 22 Oct 2018 15:18:43 +0000 (17:18 +0200)]
tdbtorture: No transaction with mutexes
Right now we don't do transactions with mutexed tdbs. tdbtorture -m
locks up. I haven't really investigated why that is the case. The lockup
confused me quite a bit until I figured out it works fine as long as it
does not do transactions, which is all we need right now.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Mon, 22 Oct 2018 08:10:24 +0000 (10:10 +0200)]
tdb: Remove "USE_RIGHT_MERGES" code
This has not been activated by default for ages and can be very
inefficient. With check_merge_with_left_record() we have an
alternative that will merge freelist records while we walk it
anyway. This has reduced fragmentation significantly
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Mon, 22 Oct 2018 08:14:23 +0000 (10:14 +0200)]
tdb: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Mon, 22 Oct 2018 05:08:58 +0000 (07:08 +0200)]
tdb: Use explicit initialization
Let the compiler figure out the optimal code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Volker Lendecke [Mon, 22 Oct 2018 05:42:14 +0000 (07:42 +0200)]
tdb: Avoid casts
We have %PRIu32 and %zu these days
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Noel Power [Thu, 18 Oct 2018 08:49:24 +0000 (09:49 +0100)]
CI/Autobuild: Remove samba-none-env-py3 test
We now run a purepython3 none-env test, later when the whole
build is running under python3 we will resurrect this job
but as (samba-none-env-py2) for python2
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 23 09:10:22 CEST 2018 on sn-devel-144
Noel Power [Tue, 16 Oct 2018 18:39:41 +0000 (19:39 +0100)]
Add new CI job for new purepy3-none-env autobuild task
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Noel Power [Tue, 16 Oct 2018 18:25:26 +0000 (19:25 +0100)]
script: Add new (temporary) autobuild task for none-env tests.
Ideally we want all the tests to run under python3 by default (no
special task for this) and then convert the existing '-py3' tasks
to run the python tests with python3.
However at the moment the convertion process is not ready to do this,
for a while we need to run separate autobuild tasks for this.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Noel Power [Wed, 17 Oct 2018 17:06:34 +0000 (18:06 +0100)]
python/samba/netcmd: PY3 fix CI error for samba.tests.samba_tool.help
Strangely the test was failing on CI only, looks like there is an
issue with order of elements returned from dict.items() with python3.4
(version of python in CI docker instance) and python3.6 (version on my
development machine). Changed code to sort the keys so order of help
printed out should be the same for each invocation.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Noel Power [Wed, 10 Oct 2018 11:25:09 +0000 (12:25 +0100)]
python/samba/provision: PY3 PY3 port samba4.blackbox.provision-backend
Enclose filter with list as filter object has no 'len' method
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Noel Power [Wed, 10 Oct 2018 11:21:10 +0000 (12:21 +0100)]
python/samba: PY3 port samba4.blackbox.provision-backend
convert ldif content to str when necessary
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Noel Power [Wed, 10 Oct 2018 11:18:32 +0000 (12:18 +0100)]
python/samba/provision: PY3 port samba4.blackbox.provision-backend
Fix some attibrutes that need to be treated as str
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Noel Power [Wed, 10 Oct 2018 10:18:13 +0000 (11:18 +0100)]
python/samba/netcmd: PY3 make sure get_testparm_var returns 'str'
part of PY3 port samba4.blackbox.upgrade.samba3-upgrade*
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>