summaryrefslogtreecommitdiff
path: root/python/samba/samba3
Commit message (Collapse)AuthorAgeFilesLines
* python/samba3: import passdb in the manner it is usedDouglas Bagnall2018-11-011-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
* python/samba/samba3: PY3 tdb.Tdb.get method expects bytes in PY3Noel Power2018-10-231-15/+15
| | | | | | | 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>
* PEP8: fix E713: test for membership should be 'not in'Joe Guo2018-08-241-1/+1
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E302: expected 2 blank lines, found 1Joe Guo2018-08-241-0/+2
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E261: at least two spaces before inline commentJoe Guo2018-08-241-2/+2
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* PEP8: fix E225: missing whitespace around operatorJoe Guo2018-08-241-1/+1
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* Fix spelling s/retrive/retrieve/Mathieu Parent2018-05-121-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* python: bulk port tdb iterkeys for py3Joe Guo2018-04-131-4/+4
| | | | | | | | | | | | | | | | In py3, `dict.iterkeys()` is removed, we need to use `keys()` instead. This is compatible with py2 since `dict.keys()` exists for py2. tdb pretents to be a dict, however, not completely. It provides `iterkeys()` for py2 only, and `keys()` for py3 only, which means replace `iterkeys()` to `keys()` will break py2. In python, iter a dict will implicitly iter on keys. Use this feature to work around. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* samba3: work around bytes formatting for Python 3.4Joe Guo2018-04-051-4/+4
| | | | | | | | | | | | | b'%s\x00' % key The above % formatting for bytes is only available since Python 3.5, however we need to support Python 3.4 so far. Work around this with `+`. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* selftest python: get samba.tests.s3idmapdb to run with py3Noel Power2018-04-051-15/+15
| | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python selftest: enabled samba.tests.s3registry to run with py3Noel Power2018-04-051-7/+7
| | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python selftest: enable samba.tests.s3param to run with python3Noel Power2018-04-051-3/+2
| | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: Remove ntdb referencesVolker Lendecke2015-03-171-6/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* source4/scripting/python/samba/samba3: handle ntdb files.Rusty Russell2013-04-121-47/+51
| | | | | | | | | | | | | | Upgrading old Samba 3 instances seems like a place where we don't have to read ntdb files, but Andrew Bartlett points out that you can run a Samba 4.0 and even a 4.1 'classic' domain and desire to migrate that to the AD DC. So make this upgrade code generic: if it finds an ntdb file, read that, otherwise read the tdb file. Cc: Jelmer Vernooij <jelmer@samba.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-0/+408
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104