sharpe/samba-autobuild/.git
5 years agodocs: Add gpfs:check_fstype to vfs_gpfs manpage
Christof Schmitt [Tue, 18 Sep 2018 00:16:56 +0000 (17:16 -0700)]
docs: Add gpfs:check_fstype to vfs_gpfs manpage

Signed-off-by; Christof Schmit <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Sep 19 03:56:47 CEST 2018 on sn-devel-144

5 years agovfs_gpfs: Check for GPFS file system on connect
Christof Schmitt [Tue, 18 Sep 2018 00:09:16 +0000 (17:09 -0700)]
vfs_gpfs: Check for GPFS file system on connect

The vfs_gpfs modules uses GPFS API calls that only succeed when using
the module with the GPFS file system. Add an explicit statfs check for
the file system type on connect, to make it obvious when the file system
is missing or not mounted. The check can be skipped by setting
gpfs:check_fstype to 'no'.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agogitlab-ci: Correct the ctdb tasks
Martin Schwenke [Tue, 18 Sep 2018 01:48:17 +0000 (11:48 +1000)]
gitlab-ci: Correct the ctdb tasks

They're swapped.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Sep 18 10:33:57 CEST 2018 on sn-devel-144

5 years agoctdb-recoverd: Set recovery lock handle at start of attempt
Martin Schwenke [Mon, 3 Sep 2018 03:30:57 +0000 (13:30 +1000)]
ctdb-recoverd: Set recovery lock handle at start of attempt

This allows the attempt to be cancelled if an election is lost and an
unlock is done before the attempt is completed.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Sep 18 02:18:30 CEST 2018 on sn-devel-144

5 years agoctdb-recoverd: Handle cancellation when releasing recovery lock
Martin Schwenke [Mon, 3 Sep 2018 03:01:19 +0000 (13:01 +1000)]
ctdb-recoverd: Handle cancellation when releasing recovery lock

If the recovery lock is in the process of being taken then free the
cluster mutex handle but leave the recovery lock handle in place.
This allows ctdb_recovery_lock() to fail.

Note that this isn't yet live because rec->recovery_lock_handle is
still only set at the completion of the attempt to take the lock.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Return early when the recovery lock is not held
Martin Schwenke [Tue, 11 Sep 2018 05:05:19 +0000 (15:05 +1000)]
ctdb-recoverd: Return early when the recovery lock is not held

This makes upcoming changes simpler.

Update to modern debug macro while touching relevant line.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Store recovery lock handle
Martin Schwenke [Mon, 3 Sep 2018 02:39:32 +0000 (12:39 +1000)]
ctdb-recoverd: Store recovery lock handle

... not just cluster mutex handle.

This makes the recovery lock handle long-lived and with allow the
releasing code to cancel an in-progress attempt to take the recovery
lock.

The cluster mutex handle is now allocated off the recovery lock
handle.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Use talloc() to allocate recovery lock handle
Martin Schwenke [Mon, 3 Sep 2018 01:43:44 +0000 (11:43 +1000)]
ctdb-recoverd: Use talloc() to allocate recovery lock handle

At the moment this is still local and is freed after the mutex is
successfully taken.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Rename hold_reclock_state to ctdb_recovery_lock_handle
Martin Schwenke [Mon, 3 Sep 2018 01:30:06 +0000 (11:30 +1000)]
ctdb-recoverd: Rename hold_reclock_state to ctdb_recovery_lock_handle

This will be a longer lived structure.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Re-check master on failure to take recovery lock
Martin Schwenke [Sat, 8 Sep 2018 22:30:50 +0000 (08:30 +1000)]
ctdb-recoverd: Re-check master on failure to take recovery lock

If the master changed while trying to take the lock then fail gracefully.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Clean up taking of recovery lock
Martin Schwenke [Sat, 8 Sep 2018 22:27:46 +0000 (08:27 +1000)]
ctdb-recoverd: Clean up taking of recovery lock

No functional changes, just coding style cleanups and debug message
tweaks.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-cluster-mutex: Block signals around fork
Martin Schwenke [Wed, 12 Sep 2018 07:51:47 +0000 (17:51 +1000)]
ctdb-cluster-mutex: Block signals around fork

If SIGTERM is received and the tevent signal handler setup in the
recovery daemon is still enabled then the signal is handled and a
corresponding event is queued.  The child never runs an event loop so
the signal is effectively ignored.

Resetting the SIGTERM handler isn't enough.  A signal can arrive
before that.

Block SIGTERM before forking and then immediately unblock it in the
parent.

In the child, unblock SIGTERM after the signal handler is reset.  An
explicit unblock is needed because according to sigprocmask(2) "the
signal mask is preserved across execve(2)".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-cluster-mutex: Reset SIGTERM handler in cluster mutex child
Martin Schwenke [Wed, 12 Sep 2018 04:18:00 +0000 (14:18 +1000)]
ctdb-cluster-mutex: Reset SIGTERM handler in cluster mutex child

If SIGTERM is received and the tevent signal handler setup in the
recovery daemon is still enabled then the signal is handled and a
corresponding event is queued.  The child never runs an event loop so
the signal is effectively ignored.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13617

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agos4/librpc: Fix py2 dependecies leaking into py3 libraries
Noel Power [Tue, 4 Sep 2018 14:30:00 +0000 (15:30 +0100)]
s4/librpc: Fix py2 dependecies leaking into py3 libraries

Caused strange crashes when using python3

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): Sun Sep 16 09:21:59 CEST 2018 on sn-devel-144

5 years agoPY3: wrap filter calls with list where list is expected
Noel Power [Fri, 3 Aug 2018 17:45:35 +0000 (18:45 +0100)]
PY3: wrap filter calls with list where list is expected

filter in PY2 returns list in PY3 it returns an iterator

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: ensure output of subprocess.Popen is decoded
Noel Power [Fri, 3 Aug 2018 17:32:30 +0000 (18:32 +0100)]
PY3: ensure output of subprocess.Popen is decoded

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: detect talloc_utils (for version of python running the build)
Noel Power [Fri, 3 Aug 2018 15:51:59 +0000 (16:51 +0100)]
PY3: detect talloc_utils (for version of python running the build)

It seems all combinations have potential to fail here :/ however for
the moment making the assumption
  *  if python2 driving the build you are building against libpython2 (with the option of having python3 as 'extra-python'
  *  if python3 driving the build you are building against libpython3 (with the option of having python3 as 'extra-python' NOTE: this isn't inforced it probably should be !!!! In a system with python2 and python3 installed it seems waf needs PYTHON env variable to decide which libpython to build against. It's also an option that configure should use that too (to figure out which talloc_util to use or build)

However.... right now I just want the thing to build

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: use pyembed_libname for library names (otherwise missing deps)
Noel Power [Fri, 3 Aug 2018 14:52:12 +0000 (15:52 +0100)]
PY3: use pyembed_libname for library names (otherwise missing deps)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: xrange->range
Noel Power [Fri, 3 Aug 2018 13:58:26 +0000 (14:58 +0100)]
PY3: xrange->range

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: string.upper not in PY3
Noel Power [Fri, 3 Aug 2018 11:53:08 +0000 (12:53 +0100)]
PY3: string.upper not in PY3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: decode output of cmd_output for easier string manip
Noel Power [Thu, 2 Aug 2018 14:10:15 +0000 (15:10 +0100)]
PY3: decode output of cmd_output for easier string manip

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: string.translate string.upper don't exist in PY3
Noel Power [Fri, 3 Aug 2018 11:45:51 +0000 (12:45 +0100)]
PY3: string.translate string.upper don't exist in PY3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: bytes.maketrans, string.maketrans is a PY2 only function
Noel Power [Thu, 2 Aug 2018 13:51:13 +0000 (14:51 +0100)]
PY3: bytes.maketrans, string.maketrans is a PY2 only function

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: enclose filter with list as len on result of filter fails
Noel Power [Thu, 2 Aug 2018 13:42:55 +0000 (14:42 +0100)]
PY3: enclose filter with list as len on result of filter fails

filter returns an iterator in PY3 (and a list in PY2)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: fix string.rsplit usage (doens't exist in PY3)
Noel Power [Wed, 1 Aug 2018 11:34:08 +0000 (12:34 +0100)]
PY3: fix string.rsplit usage (doens't exist in PY3)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopy2/py3 enclose map with list
Noel Power [Wed, 1 Aug 2018 11:26:03 +0000 (12:26 +0100)]
py2/py3 enclose map with list

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: dict_keys doesn't have a sort method
Noel Power [Fri, 3 Aug 2018 13:42:33 +0000 (14:42 +0100)]
PY3: dict_keys doesn't have a sort method

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: dict doesn't have has_key
Noel Power [Fri, 3 Aug 2018 13:25:34 +0000 (14:25 +0100)]
PY3: dict doesn't have has_key

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: iterkeys -> keys
Noel Power [Fri, 3 Aug 2018 11:48:07 +0000 (12:48 +0100)]
PY3: iterkeys -> keys

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: iterkeys -> keys
Noel Power [Fri, 3 Aug 2018 11:43:26 +0000 (12:43 +0100)]
PY3: iterkeys -> keys

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: dict has no iterkeys method
Noel Power [Fri, 3 Aug 2018 13:49:59 +0000 (14:49 +0100)]
PY3: dict has no iterkeys method

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: fix iteritems usage, not supported in python3
Noel Power [Tue, 31 Jul 2018 17:04:30 +0000 (18:04 +0100)]
PY3: fix iteritems usage, not supported in python3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoPY3: fix some octal literals
Noel Power [Fri, 27 Jul 2018 13:35:16 +0000 (14:35 +0100)]
PY3: fix some octal literals

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.ntlmdisabled for py3
Noel Power [Tue, 19 Jun 2018 12:15:47 +0000 (13:15 +0100)]
s4/selftest: enable samba.tests.ntlmdisabled for py3

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): Sat Sep 15 18:10:42 CEST 2018 on sn-devel-144

5 years agoselftest/knownfail: Add PY3 entries for samba.tests.ntlmdisabled
Noel Power [Wed, 12 Sep 2018 11:46:21 +0000 (12:46 +0100)]
selftest/knownfail: Add PY3 entries for samba.tests.ntlmdisabled

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.netlogonsvc for py3
Noel Power [Tue, 19 Jun 2018 11:28:07 +0000 (12:28 +0100)]
s4/selftest: enable samba.tests.netlogonsvc for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.kcc.kcc_utils for py3
Noel Power [Tue, 19 Jun 2018 11:13:41 +0000 (12:13 +0100)]
s4/selftest: enable samba.tests.kcc.kcc_utils for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.kcc for py3
Noel Power [Tue, 19 Jun 2018 10:24:16 +0000 (11:24 +0100)]
s4/selftest: enable samba.tests.kcc for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftetst: enable samba4.drs.cracknames for py3
Noel Power [Mon, 18 Jun 2018 18:04:34 +0000 (19:04 +0100)]
s4/selftetst: enable samba4.drs.cracknames for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.join for py3
Noel Power [Mon, 18 Jun 2018 17:45:15 +0000 (18:45 +0100)]
s4/selftest: enable samba.tests.join for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython/samba/tests: py_gensec_update takes bytes as param
Noel Power [Mon, 18 Jun 2018 10:55:31 +0000 (11:55 +0100)]
python/samba/tests: py_gensec_update takes bytes as param

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.repl_rodc for py3
Noel Power [Fri, 15 Jun 2018 16:56:13 +0000 (17:56 +0100)]
s4/selftest: enable samba4.drs.repl_rodc for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs/python: py2/py3 compat changes for samba4.drs.repl_rodc
Noel Power [Fri, 15 Jun 2018 16:55:46 +0000 (17:55 +0100)]
s4/torture/drs/python: py2/py3 compat changes for samba4.drs.repl_rodc

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.getncchanges for py3
Noel Power [Fri, 15 Jun 2018 15:46:55 +0000 (16:46 +0100)]
s4/selftest: enable samba4.drs.getncchanges for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest/knownfail.d: PY3 entry fro getncchanges
Noel Power [Tue, 11 Sep 2018 19:58:12 +0000 (20:58 +0100)]
selftest/knownfail.d: PY3 entry fro getncchanges

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs/python: py2/py3 porting needed for samba4.drs.getncchanges
Noel Power [Fri, 15 Jun 2018 15:46:12 +0000 (16:46 +0100)]
s4/torture/drs/python: py2/py3 porting needed for samba4.drs.getncchanges

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.repl_schema for py3
Noel Power [Fri, 15 Jun 2018 15:27:18 +0000 (16:27 +0100)]
s4/selftest: enable samba4.drs.repl_schema for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.link_conflicts for py3
Noel Power [Fri, 15 Jun 2018 14:55:59 +0000 (15:55 +0100)]
s4/selftest: enable samba4.drs.link_conflicts for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs: py2/py3 compat porting for samba4.drs.link_conflicts
Noel Power [Fri, 15 Jun 2018 14:55:15 +0000 (15:55 +0100)]
s4/torture/drs: py2/py3 compat porting for samba4.drs.link_conflicts

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.getnc_unpriv for py3
Noel Power [Fri, 15 Jun 2018 14:20:54 +0000 (15:20 +0100)]
s4/selftest: enable samba4.drs.getnc_unpriv for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.getnc_exop for py3
Noel Power [Fri, 15 Jun 2018 14:14:58 +0000 (15:14 +0100)]
s4/selftest: enable samba4.drs.getnc_exop for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs/python: ndr_unpack needs bytes samba4.drs.getnc_exop
Noel Power [Fri, 15 Jun 2018 09:39:09 +0000 (10:39 +0100)]
s4/torture/drs/python: ndr_unpack needs bytes samba4.drs.getnc_exop

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.repl_move for py3
Noel Power [Fri, 15 Jun 2018 09:37:12 +0000 (10:37 +0100)]
s4/selftest: enable samba4.drs.repl_move for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs: py2/py3 compat for test samba4.drs.repl_move
Noel Power [Fri, 15 Jun 2018 09:12:26 +0000 (10:12 +0100)]
s4/torture/drs: py2/py3 compat for test samba4.drs.repl_move

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.fsmo for py3
Noel Power [Fri, 15 Jun 2018 08:02:26 +0000 (09:02 +0100)]
s4/selftest: enable samba4.drs.fsmo for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs: py2/py3 compat changes for test samba4.drs.fsmo
Noel Power [Fri, 15 Jun 2018 07:58:59 +0000 (08:58 +0100)]
s4/torture/drs: py2/py3 compat changes for test samba4.drs.fsmo

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable test samba4.drs.delete_object for py2/py3
Noel Power [Thu, 14 Jun 2018 16:12:54 +0000 (17:12 +0100)]
s4/selftest: enable test samba4.drs.delete_object for py2/py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs: port samba4.drs.delete_object test for py2/py3
Noel Power [Thu, 14 Jun 2018 16:12:30 +0000 (17:12 +0100)]
s4/torture/drs: port samba4.drs.delete_object test for py2/py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.samba_tool.schema for py2/py3
Noel Power [Thu, 14 Jun 2018 15:49:52 +0000 (16:49 +0100)]
s4/selftest: enable samba.tests.samba_tool.schema for py2/py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.samba_tool.forest for py3
Noel Power [Wed, 13 Jun 2018 16:21:13 +0000 (17:21 +0100)]
s4/selftest: enable samba.tests.samba_tool.forest for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: samba4.drs.replica_sync.python enable for python3.
Noel Power [Fri, 8 Jun 2018 09:36:02 +0000 (10:36 +0100)]
s4/selftest: samba4.drs.replica_sync.python enable for python3.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.samba_tool_drs_showrepl py2/py3
Noel Power [Fri, 8 Jun 2018 08:50:45 +0000 (09:50 +0100)]
s4/selftest: enable samba4.drs.samba_tool_drs_showrepl py2/py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest/knownfail.d: PY3 rule for replica_sync
Noel Power [Mon, 10 Sep 2018 17:12:04 +0000 (18:12 +0100)]
selftest/knownfail.d: PY3 rule for replica_sync

5 years agos4/torture/drs: PY3 fix error with test_samba_tool_showrepl_json
Noel Power [Tue, 11 Sep 2018 12:21:18 +0000 (13:21 +0100)]
s4/torture/drs: PY3 fix error with test_samba_tool_showrepl_json

some versions of json.loads appear to need to be passed string.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs/python: make test code run in py2/py3
Noel Power [Fri, 8 Jun 2018 09:35:13 +0000 (10:35 +0100)]
s4/torture/drs/python: make test code run in py2/py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs: PY3 port for test samba_tool_drs_showrepl
Noel Power [Mon, 10 Sep 2018 12:40:15 +0000 (13:40 +0100)]
s4/torture/drs: PY3 port for test samba_tool_drs_showrepl

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.drs.samba_tool_drs for py3
Noel Power [Fri, 18 May 2018 15:15:01 +0000 (16:15 +0100)]
s4/selftest: enable samba4.drs.samba_tool_drs for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture/drs: port samba4.drs.samba_tool_drs for py2/py3 compat
Noel Power [Fri, 18 May 2018 15:14:39 +0000 (16:14 +0100)]
s4/torture/drs: port samba4.drs.samba_tool_drs for py2/py3 compat

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba4.ldap.password_settings for py3
Noel Power [Fri, 18 May 2018 11:43:22 +0000 (12:43 +0100)]
s4/selftest: enable samba4.ldap.password_settings for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest/knownfail.d: add PY3 entry for samba4.ldap.password_settings
Noel Power [Fri, 7 Sep 2018 15:30:28 +0000 (16:30 +0100)]
selftest/knownfail.d: add PY3 entry for samba4.ldap.password_settings

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.net_join for py3
Noel Power [Fri, 18 May 2018 11:35:21 +0000 (12:35 +0100)]
s4/selftest: enable samba.tests.net_join for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.net_join_no_spnego for py3
Noel Power [Thu, 17 May 2018 15:06:19 +0000 (16:06 +0100)]
s4/selftest: enable samba.tests.net_join_no_spnego for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest/tests.py enable samba.tests.getdcname for py3
Noel Power [Thu, 17 May 2018 14:57:38 +0000 (15:57 +0100)]
s4/selftest/tests.py enable samba.tests.getdcname for py3

5 years agopython/samba: extra ndr_unpack needs bytes function
Noel Power [Fri, 7 Sep 2018 13:38:54 +0000 (14:38 +0100)]
python/samba: extra ndr_unpack needs bytes function

5 years agos4/selftest: enable samba.tests.samba_tool.passwordsetting for Py3
Noel Power [Thu, 17 May 2018 13:51:40 +0000 (14:51 +0100)]
s4/selftest: enable samba.tests.samba_tool.passwordsetting for Py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython/samba/netcmd: PY3 fix test samba.tests.samba_tool.passwordsettings
Noel Power [Thu, 31 May 2018 13:30:43 +0000 (14:30 +0100)]
python/samba/netcmd: PY3 fix test samba.tests.samba_tool.passwordsettings

5 years agos4/selftest: enable samba4.drs.ridalloc_exop for python3
Noel Power [Tue, 15 May 2018 14:33:22 +0000 (15:33 +0100)]
s4/selftest: enable samba4.drs.ridalloc_exop for python3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython/samba: PY3 port for ridalloc_exop test to work
Noel Power [Fri, 7 Sep 2018 11:42:19 +0000 (12:42 +0100)]
python/samba: PY3 port for ridalloc_exop test to work

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython/samba: ndr_unpack has to take bytes not string
Noel Power [Fri, 7 Sep 2018 11:07:46 +0000 (12:07 +0100)]
python/samba: ndr_unpack has to take bytes not string

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/param: py2/p3 compat override_prefixmap should be string/bytes
Noel Power [Mon, 14 May 2018 19:03:59 +0000 (20:03 +0100)]
s4/param: py2/p3 compat override_prefixmap should be string/bytes

5 years agofallout from py_dsdb_DsReplicaAttribute to -> bytes
Noel Power [Thu, 17 May 2018 12:34:00 +0000 (13:34 +0100)]
fallout from py_dsdb_DsReplicaAttribute to -> bytes

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/dsdb: py_dsdb_DsReplicaAttribute should deal with bytes in py3
Noel Power [Mon, 14 May 2018 19:05:30 +0000 (20:05 +0100)]
s4/dsdb: py_dsdb_DsReplicaAttribute should deal with bytes in py3

Seems the underlying c code expects binary blob, so.. we should
handle str for py2 and byte for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/selftest: enable samba.tests.samba_tool.rodc for PY3
Noel Power [Fri, 11 May 2018 15:41:44 +0000 (16:41 +0100)]
s4/selftest: enable samba.tests.samba_tool.rodc for PY3

5 years agos4/selftest: enable samba.tests.upgradeprovisionneeddc for py3
Noel Power [Fri, 11 May 2018 15:39:06 +0000 (16:39 +0100)]
s4/selftest: enable samba.tests.upgradeprovisionneeddc for py3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython/samba/provision: PY3 port to run samba.tests.upgradeprovisionneeddc
Noel Power [Fri, 7 Sep 2018 09:10:56 +0000 (10:10 +0100)]
python/samba/provision: PY3 port to run samba.tests.upgradeprovisionneeddc

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotorture: Remove unnecesssary #include <fcntl.h>
Christof Schmitt [Sat, 15 Sep 2018 00:00:26 +0000 (17:00 -0700)]
torture: Remove unnecesssary #include <fcntl.h>

This is now provided through system/filesys.h.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agomdssvc: Move a variable declaration closer to its use
Volker Lendecke [Fri, 3 Aug 2018 10:45:59 +0000 (12:45 +0200)]
mdssvc: Move a variable declaration closer to its use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 14 10:48:47 CEST 2018 on sn-devel-144

5 years agomdssvc: Move a variable declaration closer to its use
Volker Lendecke [Fri, 3 Aug 2018 10:44:31 +0000 (12:44 +0200)]
mdssvc: Move a variable declaration closer to its use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agomdssvc: Move a variable declaration closer to its use
Volker Lendecke [Fri, 3 Aug 2018 10:43:37 +0000 (12:43 +0200)]
mdssvc: Move a variable declaration closer to its use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agomdssvc: Simplify sl_unpack_loop
Volker Lendecke [Fri, 3 Aug 2018 10:38:47 +0000 (12:38 +0200)]
mdssvc: Simplify sl_unpack_loop

Move a variable declaration closer to its use, avoid a redundant
?true:false;

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agostreams_xattr: Make error handling more obvious
Volker Lendecke [Wed, 8 Aug 2018 12:20:58 +0000 (14:20 +0200)]
streams_xattr: Make error handling more obvious

Do the NULL check right after the alloc call

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agostreams_xattr: Make error handling more obvious
Volker Lendecke [Wed, 8 Aug 2018 12:20:58 +0000 (14:20 +0200)]
streams_xattr: Make error handling more obvious

Do the NULL check right after the alloc call

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Simplify parse_share_modes
Volker Lendecke [Mon, 10 Sep 2018 13:14:00 +0000 (15:14 +0200)]
smbd: Simplify parse_share_modes

Since 823bc4c07ad pidl initializes the [skip] entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Simplify share_mode_lock.c
Volker Lendecke [Mon, 10 Sep 2018 12:50:40 +0000 (14:50 +0200)]
smbd: Simplify share_mode_lock.c

"the_lock_id" is not required here. The share mode data carry the file
id, so use that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Fix a false comment
Volker Lendecke [Mon, 10 Sep 2018 10:20:10 +0000 (12:20 +0200)]
smbd: Fix a false comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotevent: Fix a docu typo
Volker Lendecke [Sat, 22 Oct 2016 11:59:12 +0000 (13:59 +0200)]
tevent: Fix a docu typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Remove "file_sync_all" function
Volker Lendecke [Thu, 13 Sep 2018 04:21:37 +0000 (06:21 +0200)]
smbd: Remove "file_sync_all" function

Replace with a call to files_forall. Why? I just came across this
function that only has one pretty obscure user. This does not justify
a full library function, IMHO at least.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Avoid casts in DEBUG statements
Volker Lendecke [Mon, 10 Sep 2018 10:55:48 +0000 (12:55 +0200)]
smbd: Avoid casts in DEBUG statements

Some indentation changed, best viewed with "git show -w"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Avoid casts in DEBUG statements
Volker Lendecke [Thu, 13 Sep 2018 17:36:47 +0000 (19:36 +0200)]
smbd: Avoid casts in DEBUG statements

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Add a paranoia check for leases
Volker Lendecke [Thu, 13 Sep 2018 16:56:54 +0000 (18:56 +0200)]
smbd: Add a paranoia check for leases

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>