1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

114276 Commits

Author SHA1 Message Date
Douglas Bagnall
eac85232e2 python/tests/netbios: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:54 +02:00
Douglas Bagnall
4fc99a04d2 python/tests/getdcname: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:54 +02:00
Douglas Bagnall
0c18c3738a 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>
2018-10-25 21:45:54 +02:00
Douglas Bagnall
018c0138c2 python/tests/dns*: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:54 +02:00
Douglas Bagnall
f5df55d244 python/provision: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
1ecdde4f10 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>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
9d24ded27d python/schema: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
8519502cb5 python/ntacls: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
74a5448bd0 python/gp_ext_loader: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
daea7c1b2c python/forest_update: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
db6ab2cf6f python/domain_update: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
fe6daff22a samba-tool domain: remove unused imports
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:53 +02:00
Douglas Bagnall
c3b53264cc samba-tool user: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:52 +02:00
Douglas Bagnall
ca40183d0c samba-tool ldapcmp: remove unused import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:52 +02:00
Douglas Bagnall
24a3acb248 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>
2018-10-25 21:45:52 +02:00
Douglas Bagnall
2ce9890126 python/tests/__init__: import what we need
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2018-10-25 21:45:52 +02:00
Douglas Bagnall
3f56dc1a1f 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>
2018-10-25 21:45:52 +02:00
Douglas Bagnall
b3e913ed74 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>
2018-10-25 21:45:52 +02:00
Volker Lendecke
a03804c4fc 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
2018-10-25 21:44:17 +02:00
Volker Lendecke
05954fce42 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>
2018-10-25 17:58:24 +02:00
Volker Lendecke
74de5a5d25 lib: Avoid an "includes.h"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-10-25 17:58:24 +02:00
Volker Lendecke
34b0f41cda 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>
2018-10-25 17:58:24 +02:00
Volker Lendecke
e2d9abd421 tdbtorture: Align integer types
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-10-25 17:58:24 +02:00
Volker Lendecke
afc616b67b 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>
2018-10-25 17:58:24 +02:00
Volker Lendecke
8df11518c0 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>
2018-10-25 17:58:23 +02:00
Volker Lendecke
a895cc2a59 tdb: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-10-25 17:58:23 +02:00
Volker Lendecke
c37bf2f938 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>
2018-10-25 17:58:23 +02:00
Volker Lendecke
ec209d28a2 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>
2018-10-25 17:58:22 +02:00
Noel Power
d357141546 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
2018-10-23 09:10:22 +02:00
Noel Power
8ba6bb59c1 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>
2018-10-23 05:50:29 +02:00
Noel Power
f8b5dd9544 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>
2018-10-23 05:50:29 +02:00
Noel Power
25b16fa064 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>
2018-10-23 05:50:29 +02:00
Noel Power
c11e90a123 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>
2018-10-23 05:50:29 +02:00
Noel Power
cf38a067e8 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>
2018-10-23 05:50:29 +02:00
Noel Power
86e22c0606 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>
2018-10-23 05:50:29 +02:00
Noel Power
2c0f7f07c6 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>
2018-10-23 05:50:29 +02:00
Noel Power
a114ff2182 python/samba/samba3: PY3 tdb.Tdb.get method expects bytes in PY3
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>
2018-10-23 05:50:29 +02:00
Noel Power
7aa40311d7 python/samba/netcmd: PY3 fix samba.tests.domain_backup_offline
Fix attributes that need to be treated as str not bytes

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:28 +02:00
Noel Power
09f6b86403 python/samba: PY3 port samba4.blackbox.functionalprep
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:28 +02:00
Noel Power
7562a5518f python/samba/netcmd: PY3 Fix error in samba4.blackbox.schemaupgrade
Getting Exception: must be str, not ldb.bytes error in scheme_upgrade
phase of test
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:28 +02:00
Noel Power
55f51476ac selftest/filter: PY3 Make filter-subunit forgiving of decoding errors
samba4.local.ndr for one is a test that outputs string in an encoding
that stdin.readline() guesses to be utf8 (but it isn't) filter subunit
can afford to be forgiving of some random text that can't be decoded as
utf8 so lets do that.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:28 +02:00
Noel Power
b142e28e35 python/samba: PY3 fix samba4.blackbox.upgradeprovision.release-4-0-0
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:28 +02:00
Noel Power
60e7aa86d8 s4/scripting/bin: blobs needs to be bytes
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:28 +02:00
Noel Power
c377bcd487 s4/scripting/bin: PY3 fix samba4.blackbox.upgradeprovision.alpha13 2018-10-23 05:50:28 +02:00
Noel Power
1a4e95da2b s4/scripting/bin: PY3 make sure GUID result of format is string
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:27 +02:00
Noel Power
f94a813796 s4/scripting: Py2/Py3 for samba4.blackbox.upgradeprovision.alpha13
fixup source4/scripting/bin/samba_upgradedns
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:27 +02:00
Noel Power
0febd003b5 s4/scripting: PY2/PY3 port for samba4.blackbox.upgradeprovision.current
o Fix various ldb attribute that need to be converted to string
o dict has no 'has_key' method
o ndr_unpack needs bytes not string
o b64encode needs bytes (so open file with binary mode)
o StandardError was removed in python3 use Exception instead
o fix octal literals
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:27 +02:00
Noel Power
557ff7b7ff python/samba: samba4.blackbox.dbcheck.release-4-1-0rc3
* Various string related fixed py2/py3
* Fix strange double decode followed by encode code (see comments
  in change)
* Added dump_attr_values, simply printing attribute values (from
  sequence) doesn't work (when using string '%s' format codes in
  existing string). We need to print out string from bytes in PY3
  and fallback to repr(which will print b'blah') if we get a decode error

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:27 +02:00
Noel Power
370dcbb791 samba_tool: Enclose iterator with list
Really strange bug caused by map being updated while being iterated.
This caused keys to be skipped and inconsistent and incorrect
results from ldapcmp.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:27 +02:00
Noel Power
e5cac2b843 python/samba: misc use of str for ldb.bytes
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-10-23 05:50:27 +02:00