amitay/samba.git
5 years agotests: test ldap search requesting non-existent attribute
Tim Beale [Fri, 14 Sep 2018 02:06:30 +0000 (14:06 +1200)]
tests: test ldap search requesting non-existent attribute

As an after-thought to commit 563e454e8c55e94a950, we thought it
might be a good idea to add a test case that requests an non-existent
attribute in the attribute-filter as well the search-filter.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoacl_read: Rework Samba code to reflect Windows logic
Tim Beale [Fri, 14 Sep 2018 01:27:56 +0000 (13:27 +1200)]
acl_read: Rework Samba code to reflect Windows logic

This patch should not alter functionality. It is just updating the Samba
code to better match the Windows specification docs.

When fixing Samba BUG #13434, the Microsoft behaviour wasn't clearly
documented, so we made a best guess based on observed behaviour.
The problem was an exception was made to allow "objectClass=*" searches
to return objects, even if you didn't have Read Property rights for the
object's objectClass attribute. However, the logic behind what
attributes were and weren't covered by this exception wasn't clear.

I made a guess that it was attributes belonging to the Public Info
property-set that also have the systemOnly flag set.

Microsoft have confirmed the object visibility behaviour. It turns out
that an optimization is made for the 4 attributes that are always
present for every object (i.e. objectClass, distinguishedName,
name, objectGUID). They're updating their Docs to reflect this.

Now that we know the Windows logic, we can update the Samba code.
This simplifies the code somewhat.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests: Minor code cleanups to confidential_attr test
Tim Beale [Wed, 1 Aug 2018 05:30:37 +0000 (17:30 +1200)]
tests: Minor code cleanups to confidential_attr test

+ fix a couple of flake8 warnings
+ add some extra code comments (particularly around the cases where the
  child class overrides a particular method, to avoid confusion when
  browsing the code).
+ assert_not_in_result() was duplicated (it's only needed for the deny
  ACL tests)
+ skip redundant if in dirsync's assert_search_result() (it always has
  to use the base-DN - we never pass it this as an args).

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopython tests: fix format() strings for Python 2.6
Douglas Bagnall [Fri, 21 Sep 2018 01:22:56 +0000 (13:22 +1200)]
python tests: fix format() strings for Python 2.6

Python 2.6 wants "{0}".format(x), not "{}".format(x).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb: Fix dependency of ldb module
Amitay Isaacs [Fri, 21 Sep 2018 04:33:42 +0000 (14:33 +1000)]
ldb: Fix dependency of ldb module

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13626
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoheimdal-build: Avoid using python str.format()
Amitay Isaacs [Wed, 19 Sep 2018 08:31:34 +0000 (18:31 +1000)]
heimdal-build: Avoid using python str.format()

In python 2.6, the format fields need to be numbered explicitly.  This
causes the build to fail on RHEL6/Centos6 with following error:

 File "/home/amitay/samba.git/source4/heimdal_build/wscript_build", line 87, in HEIMDAL_ASN1
    os.path.join(bld.path.abspath(), option_file)))
ValueError: zero length field name in format

To use str.format() in HEIMDAL_ASN1(),

   "--option-file='{}'"  needs to be   "--options-file='{0}'"

Or this fix which avoids str.format() completely.

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

5 years agoFix pdb_samba_dsdb build on Ubuntu 16.04 with -O3 -Werror=strict-overflow
Andrew Bartlett [Mon, 17 Sep 2018 22:34:33 +0000 (15:34 -0700)]
Fix pdb_samba_dsdb build on Ubuntu 16.04 with -O3 -Werror=strict-overflow

../source3/passdb/pdb_samba_dsdb.c: In function ‘pdb_samba_dsdb_set_trusteddom_pw’:
../source3/passdb/pdb_samba_dsdb.c:2778:6: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
   if (i == 0) {
      ^
cc1: all warnings being treated as errors

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep 20 01:29:48 CEST 2018 on sn-devel-144

5 years agos3: nmbd: Stop nmbd network announce storm.
Andrew Bartlett [Mon, 17 Sep 2018 19:45:14 +0000 (12:45 -0700)]
s3: nmbd: Stop nmbd network announce storm.

Correct fix for. On announce, work->lastannounce_time is set
to current time t, so we must check that 't >= work->lastannounce_time',
not 't > work->lastannounce_time' otherwise we end up not
doing the comparison, and always doing the announce.

Reported by Reuben Farrelly

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Revviewe-by: Andreas Schneider <asn@samba.org>
5 years agoPY3: make sure print stmt is enclosed by '(' & ')'
Noel Power [Fri, 27 Jul 2018 13:37:29 +0000 (14:37 +0100)]
PY3: make sure print stmt is enclosed by '(' & ')'

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3/locking: Fix comments to reflect code flow
Anoop C S [Tue, 18 Sep 2018 06:57:02 +0000 (12:27 +0530)]
s3/locking: Fix comments to reflect code flow

* posix_pending_close_db is an in-memory database and not a tdb.
  Therefore adjusting comments to convey the correct meaning of the
  database.
* we do not have posix_locking_close_file() any more which got renamed
  to locking_close_file(). Thus fixing comment to mention the new name.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 19 22:23:28 CEST 2018 on sn-devel-144

5 years agos3: Don't copy back the stat struct from stat_cache_lookup if we did not get a hit...
Richard Sharpe [Mon, 17 Sep 2018 22:38:06 +0000 (15:38 -0700)]
s3: Don't copy back the stat struct from stat_cache_lookup if we did not get a hit on the full path.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agouid_wrapper: Fix Tab/indent error with python3
Noel Power [Mon, 17 Sep 2018 12:17:25 +0000 (14:17 +0200)]
uid_wrapper: Fix Tab/indent error with python3

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Sep 19 17:49:33 CEST 2018 on sn-devel-144

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>