Günther Deschner [Fri, 31 Aug 2018 16:21:42 +0000 (18:21 +0200)]
torture
Günther Deschner [Fri, 31 Aug 2018 16:22:04 +0000 (18:22 +0200)]
s3-rpcclient: use spoolss_init_spoolss_UserLevel1 in winspool cmds
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Günther Deschner [Fri, 31 Aug 2018 16:24:54 +0000 (18:24 +0200)]
s3-rpc_client: use 6000 as build number for printing client
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Günther Deschner [Fri, 31 Aug 2018 15:36:19 +0000 (17:36 +0200)]
s3-spoolss: make spoolss client os_major,os_minor and os_build configurable.
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Günther Deschner [Wed, 29 Aug 2018 13:17:58 +0000 (15:17 +0200)]
Revert "waf: disable-python - don't build torture bits"
This reverts commit
7000fa01f8844450e020c84af85c7e1eb228b982.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13593
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Günther Deschner [Wed, 29 Aug 2018 12:21:15 +0000 (14:21 +0200)]
s4:waf: Don't build samba-net and samba-policy as python libraries
libsamba-net is a shared library which is also consumed e.g. by
smbtorture!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13593
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Christof Schmitt [Wed, 29 Aug 2018 19:07:42 +0000 (12:07 -0700)]
torture: Add test for directory_create_or_exist
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Aug 30 21:19:31 CEST 2018 on sn-devel-144
Christof Schmitt [Wed, 29 Aug 2018 19:04:29 +0000 (12:04 -0700)]
lib: Fix lstat check in directory_create_or_exist
The lstat check in directory_create_or_exist did not verify whether an
existing object is actually a directory. Also move the check to only
apply when mkdir returns EEXIST; this fixes CID 241930 Time of check
time of use.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Martin Schwenke [Fri, 17 Aug 2018 11:33:39 +0000 (21:33 +1000)]
ctdb-common: Clean up comments in TCP packet parsing
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Aug 30 07:50:04 CEST 2018 on sn-devel-144
Martin Schwenke [Tue, 28 Aug 2018 06:10:21 +0000 (16:10 +1000)]
ctdb-common: Check the version field in IPv6 packets
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 11:26:04 +0000 (21:26 +1000)]
ctdb-common: Improve TCP packet size and offset calculations
The IPv4 check for short packets was strange. It appeared to ensure
that the capture included everything up to and including the window
size. The checksum field immediately follows the window size field,
so just ensure that the packet is large enough to contain everything
up to the start of the checksum.
Add a similar check for IPv6 packets.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 06:02:50 +0000 (16:02 +1000)]
ctdb-tests: Extend TCP packet test to also do packet extraction
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 05:00:31 +0000 (15:00 +1000)]
ctdb-common: Factor out TCP packet parsing code
This can be tested separately.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 04:35:07 +0000 (14:35 +1000)]
ctdb-common: Clean up types/declarations in TCP socket reading
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 04:14:12 +0000 (14:14 +1000)]
ctdb-common: Fix error handling when parsing TCP packets
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 05:36:41 +0000 (15:36 +1000)]
ctdb-common: Fix a bug in non-Linux (PCAP) TCP packet capturing
Captured packets include a link-layer header, which is considered in
the Linux code but not the PCAP code. Also, the actual captured
length is in caplen, not len.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 03:46:50 +0000 (13:46 +1000)]
ctdb-common: Don't modify a const argument
The current code might be slightly more efficient but
intentionally (although temporarily) modifying a const argument just
seems wrong.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 02:30:19 +0000 (12:30 +1000)]
ctdb-common: Avoid magic numbers when building TCP packets
Most packet sizes and offsets are multiples of 32-bit words. The IPv6
payload length is in octets. The IPv6 version is the top 4 bits of
the relevant field.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 16 Aug 2018 06:47:21 +0000 (16:47 +1000)]
ctdb-tests: Add tests for TCP packet marshalling
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 16 Aug 2018 01:10:40 +0000 (11:10 +1000)]
ctdb-common: Factor out TCP packet marshalling code
This can be tested separately.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 14 Aug 2018 03:49:25 +0000 (13:49 +1000)]
ctdb-common: Avoid single line multi-assignment
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 29 Aug 2018 05:48:21 +0000 (15:48 +1000)]
ctdb-common: Set version more obviously in IPv6 NA packet
Version is the top 4 bits of this field.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 10 Aug 2018 08:38:23 +0000 (18:38 +1000)]
ctdb-common: Clarify offset and packet length calculations
Calculate each offset from the beginning of the buffer and explicitly
use the sizes of structures.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 14 Aug 2018 02:36:25 +0000 (12:36 +1000)]
ctdb-common: Use struct ether_arp to avoid manual offset calculations
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 14 Aug 2018 01:25:02 +0000 (11:25 +1000)]
ctdb-common: Be more careful with packet sizes
Ethernet packets must be at least 64 bytes.
For ARP the packet size was limited to 64 bytes. This is probably OK
but the code might as well be a little more general.
For IPv6 NA there was no guarantee that the packet is at least 64
bytes.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 16 Aug 2018 05:15:55 +0000 (15:15 +1000)]
ctdb-tests: Add tests for ARP and IPv6 NA marshalling
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 13 Aug 2018 11:39:12 +0000 (21:39 +1000)]
ctdb-common: Separate ARP and IPv6 NA marshalling code
This can be tested separately.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 10 Aug 2018 07:23:56 +0000 (17:23 +1000)]
ctdb-common: Fix error handling when sending ARPs
There are numerous places in the code where errno can be lost causing
the wrong error to be printed by a caller. Change ctdb_sys_send_arp()
to always return a useful errno on error instead of returning -1 and
sometimes having errno set correctly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 10 Aug 2018 07:04:32 +0000 (17:04 +1000)]
ctdb-common: Factor out common ARP code
Finding the interface and the MAC address are obvious. Might as well
set up the common parts of the destination address structure.
Continue to open the socket and find the MAC address first. This
might seem odd because marshalling and other subsequent steps may
fail. However, in the future this code might be optimised to open a
single socket to send ARPs for a list of addresses on each interface,
so don't change the logic.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 10 Aug 2018 06:14:40 +0000 (16:14 +1000)]
ctdb-common: Initialise structures when declared
Instead of using ZERO_STRUCT().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Sat, 11 Aug 2018 08:32:17 +0000 (18:32 +1000)]
ctdb-tests: Add basic test to sanity check types in socket marshalling
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 17 Aug 2018 03:58:18 +0000 (13:58 +1000)]
ctdb-common: Restore dropped copyright attributions
Commit
fa94a49dbbec4a65c368a533a534f952a9f147a7 accidentally dropped
some copyright attributions. The original version of system_socket.c
was based on system_linux.c but many parts have been taking from
system_freebsd.c, which had these additional copyright attributions.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 14 Aug 2018 03:18:01 +0000 (13:18 +1000)]
ctdb-common: Fix CID
1414745 - Out-of-bounds access
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 27 Aug 2018 04:53:37 +0000 (14:53 +1000)]
ctdb-daemon: Do not retry connection to eventd
Confirmation is now received from eventd that it is accepting
connections, so this is no longer needed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 27 Aug 2018 04:47:38 +0000 (14:47 +1000)]
ctdb-daemon: Wait for eventd to be ready before connecting
The current method of retrying the connection to eventd means that
messages get logged for each failure.
Instead, pass a pipe file descriptor to eventd and wait for it to
write 0 to the pipe to indicate that it is ready to accept client
connections.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 27 Aug 2018 04:44:24 +0000 (14:44 +1000)]
ctdb-daemon: Open eventd pipe earlier
The pipe will soon be needed earlier, so initialise it earlier.
Ensure the file descriptors are closed on error.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 27 Aug 2018 05:28:47 +0000 (15:28 +1000)]
ctdb-daemon: Improve error handling consistency
Other errors free argv, so do it here too.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 24 Aug 2018 04:52:29 +0000 (14:52 +1000)]
ctdb-event: Add support to eventd for the startup notification FD
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 24 Aug 2018 04:44:12 +0000 (14:44 +1000)]
ctdb-common: Add support for sock daemon to notify of successful startup
The daemon writes 0 into the specified file descriptor when it is up
and listening. This can be used to avoid loops in clients that
attempt to connect until they succeed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Alexander Bokovoy [Thu, 5 Jul 2018 13:39:52 +0000 (16:39 +0300)]
pidl/tests: fix ndr_push_init_ctx() usage
The code in libndr got rid of the second argument quite some time ago
(2010):
f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d
However, pidl tests did include a code that passed two arguments.
Recently GCC started to fail to compile such code.
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 30 04:48:00 CEST 2018 on sn-devel-144
Andreas Schneider [Mon, 27 Aug 2018 13:59:59 +0000 (15:59 +0200)]
s4:torture: Add a test for listing shares
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 29 21:28:41 CEST 2018 on sn-devel-144
Andreas Schneider [Thu, 23 Aug 2018 12:12:43 +0000 (14:12 +0200)]
selftest: Schedule libsmbclient tests against ad_dc
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 23 Aug 2018 12:00:29 +0000 (14:00 +0200)]
s4:torture: Improve torture_libsmbclient_init_context()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Mon, 27 Aug 2018 09:13:29 +0000 (21:13 +1200)]
autobuild: Avoid subshell for tail -f invocation
This should mean one less process in the process tree, and less places to hold
FDs open.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13591
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 29 08:20:55 CEST 2018 on sn-devel-144
Andrew Bartlett [Mon, 27 Aug 2018 09:00:58 +0000 (21:00 +1200)]
autobuild: use close_fds=True to avoid *.stderr and *.stdout inheriting into every process
This closes fds other than 0, 1, 2.
This ensures only the correct *.stderr and *.stdout is attached, via
the stdout/stderr parameter to Popen(), but not every other FD
currently open in python at the time Popen is called.
For the tail invocation and other calls to Popen(), because fds 0, 1,
2 are still attached, these function as before.
Per https://docs.python.org/2.6/library/subprocess.html:
"If close_fds is true, all file descriptors except 0, 1 and
2 will be closed before the child process is executed. (Unix only)."
And regarding the passed in parameters:
"stdin, stdout and stderr specify the executed programs’ standard
input,
standard output and standard error file handles, respectively. "
...
"With None (the default), no redirection will occur;
the child’s file handles will be inherited from the parent. "
(The unwanted inherited files would be on a random high FD, where the
program wouldn't know what to do with them, but counting towards the
process FD limit).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13591
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Mon, 27 Aug 2018 01:34:35 +0000 (13:34 +1200)]
travis-ci: Add py3 jobs to match new jobs in autobuild.py
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Sat, 25 Aug 2018 07:40:12 +0000 (09:40 +0200)]
autobuild: Move backup/restore environments into to samba-ad-dc-2 autobuild job
This tries to to split up the tasks more evenly and may help with the python3
work by isolating them from the long samba job.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Sat, 25 Aug 2018 07:03:07 +0000 (09:03 +0200)]
autobuild: Move ad_dc_no_nss into to samba-ad-dc-2 autobuild job
This tries to to split up the tasks more evenly and may help with the python3 tests
against this environment if started from a more isolated job.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Thu, 16 Aug 2018 01:54:14 +0000 (13:54 +1200)]
autobuild: Reduce duplication of task list in autobuild
The defaulttasks or builddirs are often updated out of sync, which causes confusion until
it is resolved.
We simply choose "." as the builddir for the tasks that
are not in the default set.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Thu, 16 Aug 2018 01:53:20 +0000 (13:53 +1200)]
gitlab-ci: Run the new python3 autobuild tasks
These additional tasks should be less complex than the full build and help get us to
a pure python3 build eventually
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Thu, 16 Aug 2018 01:50:31 +0000 (13:50 +1200)]
autobuild: Implement a split python2 and python2 build pattern
The default tasks will run the tests without --extra-python specified and
the new -py3 tasks will run the python3 tests only.
This will reduce the complexity of the build combinations
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Volker Lendecke [Tue, 10 Apr 2018 15:18:18 +0000 (17:18 +0200)]
examples: Add winexe re-implemented on current Samba libs
winexe from https://sourceforge.net/projects/winexe/ is a project
based on Samba libraries from 2012. According to the winexe git
repository the last Samba commit winexe was updated to is
47bbf9886f0c
from November 6, 2012. As winexe uses unpublished Samba internal
libraries, it broke over time.
This is a port of the winexe functionality to more modern Samba
versions. It still uses internal APIs, but it being part of the tree
means that it is much easier to keep up to date.
The Windows service files were taken literally from the original
winexe from the sourceforge git. Andrzej Hajda chose GPLv3 only and
not GPLv3+. As GPL evolves very slowly, this should not be a practical
problem for quite some time.
To build it under Linux, you need mingw binaries on your build
system. Under Debian stretch, the package names are gcc-mingw-w64 and
friends.
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 Aug 28 02:03:07 CEST 2018 on sn-devel-144
Volker Lendecke [Wed, 4 Apr 2018 14:32:01 +0000 (16:32 +0200)]
libsmb: Expose protocol-agnostic cli_writeall_send/recv
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 4 Apr 2018 14:19:52 +0000 (16:19 +0200)]
libsmb: Rename cli_writeall_send/recv to cli_smb1_writeall_send/recv
Preparing a protocol agnostic writeall
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 4 Apr 2018 14:18:28 +0000 (16:18 +0200)]
libsmb: Add protocol-agnostic cli_read
So far only cli_pull could be called directly without looking at the
protocol. We did not have a simple read that did the right thing
depending on the protocol
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Fri, 24 Aug 2018 20:37:27 +0000 (13:37 -0700)]
s3: VFS: vfs_full_audit: Ensure smb_fname_str_do_log() only returns absolute pathnames.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13565
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Aug 27 20:23:55 CEST 2018 on sn-devel-144
Jeremy Allison [Fri, 24 Aug 2018 20:17:24 +0000 (13:17 -0700)]
s3: VFS: vfs_full_audit: Add $cwd arg to smb_fname_str_do_log().
Not yet used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13565
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Mon, 27 Aug 2018 01:34:56 +0000 (13:34 +1200)]
travis-ci: Add python3-crypto to package list
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug 27 12:00:11 CEST 2018 on sn-devel-144
Andrew Bartlett [Mon, 27 Aug 2018 01:30:37 +0000 (13:30 +1200)]
autobuild: Fix -py3 support to look in tasks (the table with the tests) not tasknames (the requested list)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Thu, 16 Aug 2018 01:48:21 +0000 (13:48 +1200)]
autobuild: Allow automatic handling of autobuild tasks ending in -py3
This will allow splitting up of the python2 and python3 tests without
duplication of this already complex file.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Aug 25 11:53:15 CEST 2018 on sn-devel-144
Andrew Bartlett [Thu, 16 Aug 2018 21:31:48 +0000 (09:31 +1200)]
selftest: Move samba.tests.lsa_string to none environment, it does not contact a server
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Thu, 16 Aug 2018 21:31:10 +0000 (09:31 +1200)]
selftest: Move samba.tests.dcerpc.rpcecho to chgdcpass:local
Before this patch, no python3-compatible tests ran against any of fl2000dc, vampire_2000_dc or chgdcpass
and so an autobuild of the samba-ad-dc-2-py3 environment would fail with no tests to run.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Fri, 17 Aug 2018 05:27:06 +0000 (17:27 +1200)]
selftest: Ensure all python3 tests are tagged (named) python3
This will help when splitting them into a distinct build.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Andrew Bartlett [Sun, 19 Aug 2018 22:14:16 +0000 (10:14 +1200)]
selftest: Ensure winbindd is talking to the DC (itself) at startup
This might reduce issues with the first winbind-using test failing
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Christof Schmitt [Fri, 24 Aug 2018 05:12:23 +0000 (22:12 -0700)]
smbd: Remove unused KOPLOCK flags
This effectively reverts commit
17eba16b. It looks like these flags have
been introduced as part of the onefs support which has been removed
again. As there is no other use for the flags, remove them.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Sat Aug 25 03:23:05 CEST 2018 on sn-devel-144
Bernd Kuhls [Sat, 18 Aug 2018 07:43:00 +0000 (09:43 +0200)]
Fix uClibc build on 64bit platforms by including stdint.h
Fixes an error detected by buildroot autobuilders:
http://autobuild.buildroot.net/results/573/
573e2268e205e10d1352fa81122d8f225fdb4575/build-end.log
/home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27:
error: conflicting types for 'uintptr_t'
typedef unsigned long int uintptr_t;
^
In file included from ../lib/ldb/tests/ldb_msg.c:17:0:
../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
typedef unsigned int uintptr_t;
The define __WORDSIZE is missing when cmocka.h decides how to
define uintptr_t, this patch includes stdint.h when needed.
Patch sent upstream:
https://lists.samba.org/archive/samba-technical/2018-January/125306.html
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
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): Fri Aug 24 17:22:10 CEST 2018 on sn-devel-144
Martin Schwenke [Fri, 24 Aug 2018 07:37:38 +0000 (17:37 +1000)]
ctdb-tests: Check that no IPs are assigned when failover is disabled
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Aug 24 14:13:12 CEST 2018 on sn-devel-144
Martin Schwenke [Mon, 20 Aug 2018 20:55:33 +0000 (06:55 +1000)]
ctdb-tests: Add an extra conf loading test case
This shows that config file loading continues in spite of unknown keys
if ignore_unknown is true.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 07:25:53 +0000 (17:25 +1000)]
ctdb-doc: Switch tunable DisableIPFailover to a config option
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 03:41:22 +0000 (13:41 +1000)]
ctdb-config: Switch tunable DisableIPFailover to a config option
Use the "failover:disabled" option instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 01:44:03 +0000 (11:44 +1000)]
ctdb-config: Integrate failover options into conf-tool
Update and add tests accordingly.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 01:30:39 +0000 (11:30 +1000)]
ctdb-failover: Add failover configuration options
Only a "disabled" option for now. Not documented because it isn't
used yet.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 01:18:34 +0000 (11:18 +1000)]
ctdb-tests: Drop DisableIPFailover simple test
This is about to become a config file option that can't be dynamically
changed at run-time, so drop this test for now. This test will be added
once the tunable becomes a config file option.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 23:36:00 +0000 (09:36 +1000)]
ctdb-daemon: Pass DisableIPFailover tunable via environment variable
Preparation for obsoleting this tunable.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 03:43:38 +0000 (13:43 +1000)]
ctdb-common: Allow boolean configuration values to have yes/no values
This make the new configuration style more consistent with the old one.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 03:51:40 +0000 (13:51 +1000)]
ctdb-doc: Switch tunable TDBMutexEnabled to a config option
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 05:01:50 +0000 (15:01 +1000)]
ctdb-config: Switch tunable TDBMutexEnabled to a config option
Use the "database:tdb mutexes" option instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 09:09:45 +0000 (19:09 +1000)]
ctdb-doc: Add support for migrating tunables to ctdb.conf options
This will become common, so will be useful to have support for.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 21 Aug 2018 03:45:32 +0000 (13:45 +1000)]
ctdb-doc: Change option "no realtime" option to "realtime scheduling"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 03:35:33 +0000 (13:35 +1000)]
ctdb-config: Change option "no realtime" option to "realtime scheduling"
Negative options can be confusing, so switch to a positive option.
This was supposed to be done months ago but was forgotten.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 03:29:52 +0000 (13:29 +1000)]
ctdb-doc: Handle boolean options in config migration more carefully
Values for ctdb.conf options are now returned by
get_ctdb_conf_option(). The main goal is to allow old boolean options
to be replaced by new logically negated options.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 20 Aug 2018 03:38:25 +0000 (13:38 +1000)]
ctdb-doc: Make config migration script notice removed CTDB_BASE option
This should never have been a user-level option, but some people used
it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 13 Aug 2018 02:18:51 +0000 (12:18 +1000)]
ctdb-common: Fix aliasing issue in IPv6 checksum
Since commit
9c51b278b1700cd5f3e2addc19b7c711cc2ea10b the compiler has
been able to inline the affected call to uint16_checksum(). Given
that the data (phdr) is being accessed by an incompatible
pointer (data) there is an aliasing problem when the call is inlined.
This results in incorrect behaviour with -O2/-O3 when compiling with
at least GCC 6, 7, and 8.
Fix this by making the types compatible.
Also fixes CID
1437604 (Reliance on integer endianness). This is a
false positive because the uint16_checksum doesn't depend on the order
of the input uint16_t items.
https://bugzilla.samba.org/show_bug.cgi?id=13588
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Douglas Bagnall [Wed, 22 Aug 2018 06:27:10 +0000 (18:27 +1200)]
PEP8: line up a couple of lists
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Aug 24 10:58:16 CEST 2018 on sn-devel-144
Douglas Bagnall [Wed, 22 Aug 2018 06:26:48 +0000 (18:26 +1200)]
PEP8: improve formatting around various operators
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Aug 2018 06:26:09 +0000 (18:26 +1200)]
PEP8: improve formatting around bit-wise OR ("|")
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Aug 2018 05:18:43 +0000 (17:18 +1200)]
dcerpc py tests: improve argument formatting
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Aug 2018 05:11:45 +0000 (17:11 +1200)]
dcerpc/dns_server tests: use record malformed as probably intended
Both ways the record is malformed, but it is more likely we meant
AAAAAAAAAA... 1
than
A 1A 1A 1A 1A ...
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Aug 2018 05:09:01 +0000 (17:09 +1200)]
PEP8: add spaces after operators
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Aug 2018 05:06:23 +0000 (17:06 +1200)]
PEP8: better formatting of (CONST1|CONST2)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Wed, 22 Aug 2018 04:30:02 +0000 (16:30 +1200)]
ldb tests: remove unused code from match_rules.py
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Tue, 21 Aug 2018 21:35:58 +0000 (09:35 +1200)]
PEP8: improve spacing around colons
These dropped out of Joe's patches during rebase and review.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Tue, 21 Aug 2018 21:34:05 +0000 (09:34 +1200)]
PEP8: more space before equals
This dropped out during rebase
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Joe Guo [Mon, 30 Jul 2018 06:25:46 +0000 (18:25 +1200)]
PEP8: add pycodestyle config in setup.cfg
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>
Joe Guo [Mon, 30 Jul 2018 06:22:54 +0000 (18:22 +1200)]
PEP8: fix W391: blank line at end of file
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>
Joe Guo [Mon, 30 Jul 2018 06:22:53 +0000 (18:22 +1200)]
PEP8: fix W293: blank line contains whitespace
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>
Joe Guo [Mon, 30 Jul 2018 06:22:52 +0000 (18:22 +1200)]
PEP8: fix W291: trailing whitespace
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>
Joe Guo [Mon, 30 Jul 2018 06:22:34 +0000 (18:22 +1200)]
PEP8: fix E713: test for membership should be 'not in'
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>
Joe Guo [Mon, 30 Jul 2018 06:22:19 +0000 (18:22 +1200)]
PEP8: fix E712: comparison to False should be 'if cond is False:' or 'if not cond:'
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>
Joe Guo [Mon, 30 Jul 2018 06:22:15 +0000 (18:22 +1200)]
PEP8: fix E711: comparison to None should be 'if cond is not None:'
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>