samba.git
5 years agodoc: add missing "samba-tool ou" entry
Björn Baumbach [Thu, 28 Mar 2019 14:26:36 +0000 (15:26 +0100)]
doc: add missing "samba-tool ou" entry

Signed-off-by: Björn Baumbach <bbaumbach@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Sat Mar 30 23:33:39 UTC 2019 on sn-devel-144

5 years agodoc: add missing "samba-tool computer" entry
Björn Baumbach [Thu, 28 Mar 2019 14:25:01 +0000 (15:25 +0100)]
doc: add missing "samba-tool computer" entry

Signed-off-by: Björn Baumbach <bbaumbach@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: fix typos in samba-tool documentation
Björn Baumbach [Thu, 28 Mar 2019 14:18:49 +0000 (15:18 +0100)]
doc: fix typos in samba-tool documentation

Signed-off-by: Björn Baumbach <bbaumbach@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: add missing samba-tool user edit documentation
Björn Baumbach [Thu, 28 Mar 2019 14:02:08 +0000 (15:02 +0100)]
doc: add missing samba-tool user edit documentation

Signed-off-by: Björn Baumbach <bbaumbach@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool: fix some typos
Björn Baumbach [Thu, 28 Mar 2019 16:24:40 +0000 (17:24 +0100)]
samba-tool: fix some typos

All command descriptions have a dot '.' at the end.
The ou and visualize command need this too.

  ...
  group       - Group management.
  ldapcmp     - Compare two ldap databases.
  ntacl       - NT ACLs manipulation.
  ou          - Organizational Units (OU) management
  ...
  user        - User management.
  visualize   - Produces graphical representations of Samba network state

Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoselftest: use test smb.conf in provision
Douglas Bagnall [Fri, 29 Mar 2019 01:12:49 +0000 (14:12 +1300)]
selftest: use test smb.conf in provision

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
5 years agoacl_read: Fix regression caused by db15fcfa899e1fe4d6994f68ceb299921b8aa6f1 for empty...
Garming Sam [Tue, 12 Mar 2019 21:52:19 +0000 (10:52 +1300)]
acl_read: Fix regression caused by db15fcfa899e1fe4d6994f68ceb299921b8aa6f1 for empty lists

The original code never dereferenced attrs and only added "*" if attrs
was NULL (not if attrs[0] was NULL).

This causes significant performance issues with the new paged_results
module introduced for 4.10 as the initial GUID search requests no
attributes. This GUID search turns into a search for "*" and ends up
allocating memory for the entire database.

This never appears to cause changes in the final result set, only
intermediate processing.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Mar 29 18:37:29 UTC 2019 on sn-devel-144

5 years agoldb: cmocka test for empty attributes bug
Aaron Haslett [Mon, 25 Mar 2019 00:13:33 +0000 (13:13 +1300)]
ldb: cmocka test for empty attributes bug

Cmocka test exposing LDB bug where a request with an empty attributes
list returns a response containing all attributes.  The bug is in the
ACL module and will be fixed in the next commit.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopaged_search: perf testing paged search
Aaron Haslett [Thu, 28 Mar 2019 02:03:17 +0000 (15:03 +1300)]
paged_search: perf testing paged search

Adding medley performance run with paged search module.

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

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:smbd: fix max_buffer handling of initial notify requests
Stefan Metzmacher [Wed, 16 Jan 2019 20:29:51 +0000 (21:29 +0100)]
s3:smbd: fix max_buffer handling of initial notify requests

The max_buffer value is only evaluated on the first notify
request on a directory handle.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 29 00:35:39 UTC 2019 on sn-devel-144

5 years agos4:torture/smb2: replace torture:cn_max_buffer_size option with the negotiated max...
Stefan Metzmacher [Tue, 8 Jan 2019 15:22:25 +0000 (16:22 +0100)]
s4:torture/smb2: replace torture:cn_max_buffer_size option with the negotiated max trans size

Both:

 smbtorture //w2012r2-188/torture -Ua%b smb2.notify.valid-req --smb-ports=139

and:

 smbtorture //w2012r2-188/torture -Ua%b smb2.notify.valid-req --smb-ports=445

work against Windows 2008R2, 2012R2 and 2016 now and it reflects what
we have implemented in Samba.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture/smb2/notify: make use of torture_setup_simple_file() in test_valid_request()
Stefan Metzmacher [Fri, 15 Feb 2019 14:30:29 +0000 (15:30 +0100)]
s4:torture/smb2/notify: make use of torture_setup_simple_file() in test_valid_request()

There's no reason to use torture_setup_complex_file(), when we want to
test notify code. The test pass fine against Samba this way and don't
fail because of unrelated timestamp behavior.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:torture/smb2: add smb2_create_simple_file() and torture_setup_simple_file()
Stefan Metzmacher [Tue, 12 Feb 2019 15:51:20 +0000 (16:51 +0100)]
s4:torture/smb2: add smb2_create_simple_file() and torture_setup_simple_file()

Instead of the *_complex_file() versions these don't use EA's nor
complex timestamps.

A lot of tests currently using *_complex_file() only fail because
smbd doesn't implement the correct 'change_time' update behavior.
That should not be the reason why all smb2 related tests fail.

Timestamps should be tested in dedicated tests.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/smb2: calculate the correct credit charge in smb2_notify_send()
Stefan Metzmacher [Tue, 8 Jan 2019 09:10:49 +0000 (10:10 +0100)]
s4:libcli/smb2: calculate the correct credit charge in smb2_notify_send()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/smb2: calculate the correct credit charge in smb2_ioctl_send()
Stefan Metzmacher [Tue, 8 Jan 2019 15:13:41 +0000 (16:13 +0100)]
s4:libcli/smb2: calculate the correct credit charge in smb2_ioctl_send()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/smb2: align struct smb_ioctl.smb2 to [MS-SMB2] names
Stefan Metzmacher [Tue, 8 Jan 2019 14:52:35 +0000 (15:52 +0100)]
s4:libcli/smb2: align struct smb_ioctl.smb2 to [MS-SMB2] names

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/smb2: calculate the correct credit charge in smb2_getinfo_send()
Stefan Metzmacher [Tue, 8 Jan 2019 15:11:15 +0000 (16:11 +0100)]
s4:libcli/smb2: calculate the correct credit charge in smb2_getinfo_send()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/smb2: fix smb2_getinfo_send() marshalling
Stefan Metzmacher [Tue, 8 Jan 2019 15:09:46 +0000 (16:09 +0100)]
s4:libcli/smb2: fix smb2_getinfo_send() marshalling

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_server: grant all 8192 credits to clients
Stefan Metzmacher [Wed, 16 Jan 2019 11:24:04 +0000 (12:24 +0100)]
smb2_server: grant all 8192 credits to clients

This seems to match Windows Server 2016.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_default: fix vfswrap_offload_write_send() NT_STATUS_INVALID_VIEW_SIZE check
Stefan Metzmacher [Tue, 31 Jul 2018 10:29:29 +0000 (12:29 +0200)]
vfs_default: fix vfswrap_offload_write_send() NT_STATUS_INVALID_VIEW_SIZE check

This fixes a regression introduced in commit
60e45a2d25401eaf9a15a86d19114670ccfde259, where the 'num' variable
was renamed to 'to_copy', but a new 'num' variable was introduced.

Note that off_t is signed!
In future we need to watch out for filesystems supporting
FMODE_UNSIGNED_OFFSET on Linux. Which means they use it unsigned.

This is more or less a theoretical problem, The
NT_STATUS_INVALID_PARAMETER cases are catched before by
SMB_VFS_PREAD_SEND/RECV.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_default: fix DEBUG messages in vfswrap_offload_write_*_done()
Stefan Metzmacher [Wed, 27 Mar 2019 11:43:32 +0000 (12:43 +0100)]
vfs_default: fix DEBUG messages in vfswrap_offload_write_*_done()

SMB_VFS_{PREAD,PWRITE}_RECV() don't set errno, so we need to
use strerror(aio_state.error) in the debug messages.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_tcon: avoid STATUS_PENDING completely on tdis
Stefan Metzmacher [Tue, 12 Feb 2019 07:27:43 +0000 (08:27 +0100)]
smb2_tcon: avoid STATUS_PENDING completely on tdis

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_sesssetup: avoid STATUS_PENDING completely on session logoff
Stefan Metzmacher [Tue, 12 Feb 2019 07:27:43 +0000 (08:27 +0100)]
smb2_sesssetup: avoid STATUS_PENDING completely on session logoff

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_tcon: avoid STATUS_PENDING responses for tree connect
Stefan Metzmacher [Thu, 24 Jan 2019 08:10:11 +0000 (09:10 +0100)]
smb2_tcon: avoid STATUS_PENDING responses for tree connect

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_sesssetup: avoid STATUS_PENDING responses for session setup
Stefan Metzmacher [Thu, 24 Jan 2019 08:10:11 +0000 (09:10 +0100)]
smb2_sesssetup: avoid STATUS_PENDING responses for session setup

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12845
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13698
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13796

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_server: allow smbd_smb2_request_pending_queue(0) to avoid STATUS_PENDING
Stefan Metzmacher [Tue, 12 Feb 2019 07:08:38 +0000 (08:08 +0100)]
smb2_server: allow smbd_smb2_request_pending_queue(0) to avoid STATUS_PENDING

This has the same meaning as smb2_request_set_async_internal(),
but this will simplifies callers.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmb2_ioctl_network_fs: remove unused fsctl_srv_copychunk_state->aapl_copyfile
Stefan Metzmacher [Tue, 31 Jul 2018 10:29:29 +0000 (12:29 +0200)]
smb2_ioctl_network_fs: remove unused fsctl_srv_copychunk_state->aapl_copyfile

This is not used since commit 74e018f476608429caa1c3594102485ccc17afce.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: handle IO_REPARSE_TAG_DFS in SMB_FIND_FILE_FULL_DIRECTORY_INFO
Stefan Metzmacher [Mon, 9 Oct 2017 10:06:29 +0000 (12:06 +0200)]
s3:smbd: handle IO_REPARSE_TAG_DFS in SMB_FIND_FILE_FULL_DIRECTORY_INFO

This completes commit 74829fecd7a4e806ee441cd75141bede2eefef1a,
which missed SMB_FIND_FILE_FULL_DIRECTORY_INFO

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: fix SAFE_FREE() vs. TALLOC_FREE() in list_sessions()
Stefan Metzmacher [Tue, 28 Nov 2017 07:16:03 +0000 (08:16 +0100)]
s3:smbd: fix SAFE_FREE() vs. TALLOC_FREE() in list_sessions()

It's very unlikely that sessionid_traverse_read() fails,
but we should not segfault.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smb2_write: add missing initialization of state->in_offset
Stefan Metzmacher [Thu, 5 Oct 2017 13:59:23 +0000 (15:59 +0200)]
s3:smb2_write: add missing initialization of state->in_offset

This is just used in DEBUG messages, but still confusing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4:torture/smb2: test_notify_tcp_dis trigger idle event every 0.25s
Stefan Metzmacher [Sun, 17 Feb 2013 21:45:32 +0000 (22:45 +0100)]
s4:torture/smb2: test_notify_tcp_dis trigger idle event every 0.25s

This is 1000 times longer than before and is less likely to
change the timing behavior when running under valgrind.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4:torture/raw: test_notify_tcp_dis trigger idle event every 0.25s
Stefan Metzmacher [Sun, 17 Feb 2013 21:43:49 +0000 (22:43 +0100)]
s4:torture/raw: test_notify_tcp_dis trigger idle event every 0.25s

This is 1000 times longer than before and is less likely to
change the timing behavior when running under valgrind.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/smb2: don't schedule idle handlers on a dead connection
Stefan Metzmacher [Sun, 17 Feb 2013 21:41:00 +0000 (22:41 +0100)]
s4:libcli/smb2: don't schedule idle handlers on a dead connection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:libcli/raw: don't schedule idle handlers on a dead connection
Stefan Metzmacher [Sun, 17 Feb 2013 21:39:40 +0000 (22:39 +0100)]
s4:libcli/raw: don't schedule idle handlers on a dead connection

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_snapper: drop unneeded fstat handler
David Disseldorp [Mon, 25 Mar 2019 17:06:15 +0000 (18:06 +0100)]
vfs_snapper: drop unneeded fstat handler

fstat is handle based, and unlike vfs_shadow_copy2, we don't need to
make any changes to the returned sbuf, so remove the existing handler
which does nothing.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13858

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 27 18:21:38 UTC 2019 on sn-devel-144

5 years agos3:tests: Add test for smbstatus and smbstatus --resolve_uids
Andreas Schneider [Wed, 13 Mar 2019 11:00:27 +0000 (12:00 +0100)]
s3:tests: Add test for smbstatus and smbstatus --resolve_uids

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 27 14:33:35 UTC 2019 on sn-devel-144

5 years agoselftest: Add smbstatus to testhelper
Andreas Schneider [Wed, 13 Mar 2019 11:00:11 +0000 (12:00 +0100)]
selftest: Add smbstatus to testhelper

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:utils: Add 'smbstatus -L --resolve-uids' to show usernames
Andreas Schneider [Mon, 18 Feb 2019 13:11:32 +0000 (14:11 +0100)]
s3:utils: Add 'smbstatus -L --resolve-uids' to show usernames

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4/torture: Update winsreplication to only use IPv4 addresses
Tim Beale [Tue, 26 Mar 2019 05:06:16 +0000 (18:06 +1300)]
s4/torture: Update winsreplication to only use IPv4 addresses

This test was failing now that the client had an IPv6 address, however,
the test was marked as flapping so this failure wasn't obvious.

Use iface_list_n_is_v4() to filter out only the IPv4 addresses, as
that's all the test cares about.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest: Restore IPs 12-16 for selftest client
Tim Beale [Mon, 18 Mar 2019 04:55:39 +0000 (17:55 +1300)]
selftest: Restore IPs 12-16 for selftest client

The assumption that tests only used the .11 IP was wrong. The
winsreplication test tries to use multiple different IPs - CI doesn't
fail when we remove the additional IPs, but it starts to skip test
cases.

+ Update get_interfaces_config() and get_ipv4_addr() so we can add
multiple different IPs for the same host.
+ Update selftest.pl so the client gets 6 IP addresses.
+ Update comments to better reflect this dependency.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolibsmb: Change cli_posix_readlink to return talloc'ed target
Volker Lendecke [Tue, 26 Mar 2019 08:48:16 +0000 (09:48 +0100)]
libsmb: Change cli_posix_readlink to return talloc'ed target

This is a deviation from the Posix readlink function that from my
point of view makes this function easier to use. In Posix, probably
the assumption is that readlink is cheap, so someone under memory
constraints could just start with a small buffer and incrementally
increase the buffer size. For us, it's a network round-trip, and we
have the luxury of [mt]alloc, which the syscall kernel interface does
not have.

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): Wed Mar 27 12:31:37 UTC 2019 on sn-devel-144

5 years agolibsmb: Don't pass "cli" to cli_posix_readlink_recv
Volker Lendecke [Mon, 25 Mar 2019 11:32:07 +0000 (12:32 +0100)]
libsmb: Don't pass "cli" to cli_posix_readlink_recv

From my point of view the option to change "cli" between
cli_posix_readlink_send and _recv is not necessary.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Rename "readlink_state" to "cli_posix_readlink_state"
Volker Lendecke [Mon, 25 Mar 2019 11:26:37 +0000 (12:26 +0100)]
libsmb: Rename "readlink_state" to "cli_posix_readlink_state"

This is more in line with most other users of tevent_req: The state is
called fully after the routines it acts as a state repository for.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Fix valgrind errors in cli_smb2_get_reparse_point
Volker Lendecke [Tue, 26 Mar 2019 09:56:27 +0000 (10:56 +0100)]
libsmb: Fix valgrind errors in cli_smb2_get_reparse_point

Both tevent_req_nterror and tevent_req_is_nterror invalidate
"state". Pull the variables out of "state" before calling those two
functions.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Make fd_load work for non-regular files
Volker Lendecke [Thu, 21 Feb 2019 17:37:08 +0000 (18:37 +0100)]
lib: Make fd_load work for non-regular files

Follow-up to

https://lists.samba.org/archive/samba/2018-September/217992.html

and following. This also fixes a small and very theoretical race: Between the
fstat and the read call the file size might change. This would make us fail on
potentially legitimate files.

This is more complex and probably slower, but looking at the use cases I don't
think the speed matters.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 26 04:43:40 UTC 2019 on sn-devel-144

5 years agolibsmb: Fix cli_smb2_get_reparse_point_fnum_send
Volker Lendecke [Mon, 25 Mar 2019 08:11:51 +0000 (09:11 +0100)]
libsmb: Fix cli_smb2_get_reparse_point_fnum_send

Use the correct state variable type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopytalloc: Check for errors during module initialization.
Kristján Valur [Wed, 6 Mar 2019 14:08:40 +0000 (14:08 +0000)]
pytalloc: Check for errors during module initialization.

Signed-off-by: Kristján Valur <kristjan@rvx.is>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopytalloc: Handle memory errors when creating pytalloc objects.
Kristján Valur [Wed, 6 Mar 2019 13:54:58 +0000 (13:54 +0000)]
pytalloc: Handle memory errors when creating pytalloc objects.

Don't create superfluous exceptions.

Signed-off-by: Kristján Valur <kristjan@rvx.is>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopytalloc: Further refactoring to eliminate duplicate code.
Kristján Valur [Wed, 6 Mar 2019 13:46:32 +0000 (13:46 +0000)]
pytalloc: Further refactoring to eliminate duplicate code.

Signed-off-by: Kristján Valur <kristjan@rvx.is>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopytalloc: Refactor the pytalloc_reference and pytalloc_steal to use a common method.
Kristján Valur [Wed, 6 Mar 2019 13:29:18 +0000 (13:29 +0000)]
pytalloc: Refactor the pytalloc_reference and pytalloc_steal to use a common method.

Signed-off-by: Kristján Valur <kristjan@rvx.is>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoRemove ad2oLschema man page
Michael Hanselmann [Sat, 23 Mar 2019 00:50:06 +0000 (01:50 +0100)]
Remove ad2oLschema man page

ad2oLschema itself was removed in commit 17aac8cad2b in March 2009. Also
remove the last reference to the program.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoSplit oLschema2ldif into library and binary
Michael Hanselmann [Sat, 23 Mar 2019 01:57:06 +0000 (02:57 +0100)]
Split oLschema2ldif into library and binary

The oLschema2ldif program was contained in a single file, making reuse
of its parsing logic elsewhere impossible. With this change the majority
of the code is moved to a new file, "lib.c", while the CLI interface is
now in a "main.c" file.

End-of-line whitespace is also removed.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoFix tests whithout lmdb
Mathieu Parent [Wed, 3 Oct 2018 20:18:55 +0000 (20:18 +0000)]
Fix tests whithout lmdb

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

Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4:dlz make b9_has_soa check dc=@ node
Michael Saxl [Thu, 21 Mar 2019 17:22:38 +0000 (18:22 +0100)]
s4:dlz make b9_has_soa check dc=@ node

the zone node does not hold the dnsRecord values, so for the zone level
the node dc=@,dc=zonename has to be queried

regression introduced with 28e2a518ff32, BUG: https://bugzilla.samba.org/show_bug.cgi?id=13466

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

Signed-off-by: Michael Saxl <mike@mwsys.mine.bz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodlz: Add test to ensure there are writable zones
Garming Sam [Thu, 21 Mar 2019 03:12:26 +0000 (16:12 +1300)]
dlz: Add test to ensure there are writable zones

This is currently broken since 28e2a518ff32

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agorpc_server3: Add a \n to a DEBUG message
Volker Lendecke [Tue, 19 Mar 2019 15:08:43 +0000 (16:08 +0100)]
rpc_server3: Add a \n to a DEBUG message

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): Fri Mar 22 19:02:32 UTC 2019 on sn-devel-144

5 years agolibrpc: Add a required #include
Volker Lendecke [Fri, 15 Mar 2019 13:31:57 +0000 (14:31 +0100)]
librpc: Add a required #include

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotsocket: Simplify tsocket.h
Volker Lendecke [Wed, 20 Mar 2019 16:26:52 +0000 (17:26 +0100)]
tsocket: Simplify tsocket.h

tevent.h already includes talloc.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotstream_npa: Avoid an unnecessary ZERO_STRUCTP
Volker Lendecke [Wed, 20 Mar 2019 07:43:59 +0000 (08:43 +0100)]
tstream_npa: Avoid an unnecessary ZERO_STRUCTP

tevent_req_create already zeros out "state"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Avoid casts in DBG statements
Volker Lendecke [Wed, 20 Mar 2019 15:49:26 +0000 (16:49 +0100)]
rpc_server: Avoid casts in DBG statements

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Simplify named_pipe_accept_function
Volker Lendecke [Wed, 20 Mar 2019 14:57:59 +0000 (15:57 +0100)]
rpc_server: Simplify named_pipe_accept_function

Make use of named_pipe_client_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Favor talloc_move over talloc_steal
Volker Lendecke [Wed, 20 Mar 2019 13:15:10 +0000 (14:15 +0100)]
rpc_server: Favor talloc_move over talloc_steal

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Make make_server_pipes_struct API safer
Volker Lendecke [Wed, 20 Mar 2019 12:50:03 +0000 (13:50 +0100)]
rpc_server: Make make_server_pipes_struct API safer

Make it clear that we talloc_steal by NULLing out the caller's
session_info

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Fix an error path memleak in make_server_pipes_struct
Volker Lendecke [Wed, 20 Mar 2019 12:46:58 +0000 (13:46 +0100)]
rpc_server: Fix an error path memleak in make_server_pipes_struct

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Simplify make_server_pipes_struct
Volker Lendecke [Wed, 20 Mar 2019 12:45:32 +0000 (13:45 +0100)]
rpc_server: Simplify make_server_pipes_struct

Do an early return on error

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodocs: Update smbclient manpage for --max-protocol
Andreas Schneider [Fri, 22 Mar 2019 13:39:11 +0000 (14:39 +0100)]
docs: Update smbclient manpage for --max-protocol

We default to SMB3 now.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Mar 22 15:03:43 UTC 2019 on sn-devel-144

5 years agoselftest: Do not include system krb5.conf in s4 test environments
Samuel Cabrero [Fri, 22 Mar 2019 11:04:49 +0000 (12:04 +0100)]
selftest: Do not include system krb5.conf in s4 test environments

If built with system MIT krb5 and dns_lookup_kdc is set to false in
system krb5.conf tests fail because KDC is not found.

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoselftests:password_hash: Raise SHA256 rounds to 5000
Samuel Cabrero [Thu, 14 Mar 2019 18:14:25 +0000 (19:14 +0100)]
selftests:password_hash: Raise SHA256 rounds to 5000

Some crypt_r implementations like libxcrypt require a higher value.

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4:dsdb: Check errno to determine if crypt or crypt_r succeeded
Samuel Cabrero [Thu, 14 Mar 2019 17:54:20 +0000 (18:54 +0100)]
s4:dsdb: Check errno to determine if crypt or crypt_r succeeded

The behavior of these functions upon errors depends on the implementation.
The GNU libc implementation seems to return a null hash, but others like
libxcrypt returns a invalid hash string '*0'.

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoselftest: Woraround uid wrapper issues when using bash shell
Samuel Cabrero [Thu, 14 Mar 2019 09:20:52 +0000 (10:20 +0100)]
selftest: Woraround uid wrapper issues when using bash shell

UID_WRAPPER_ROOT=1 is not working properly when tests run in bash shell
instead of dash. After some debugging the reason may be dash spawns a
subshell to run commands, but bash calls execve instead. Traces attached
as reference:

/bin/sh -> dash:

[2(2)/2 at 17s, 1 errors] samba.blackbox.pdbtest(nt4_dc)(nt4_dc:local)
UWRAP_DEBUG(3145) - uwrap_init: Initialize uid_wrapper
UWRAP_DEBUG(3145) - uwrap_init_env: uwrap_init_env
UWRAP_DEBUG(3145) - uwrap_init: Enabled uid_wrapper as root (real uid=1000)
UWRAP_DEBUG(3145) - uwrap_init: Successfully initialized uid_wrapper
UWRAP_DEBUG(3144) - uwrap_init: Initialize uid_wrapper
UWRAP_DEBUG(3144) - uwrap_init_env: uwrap_init_env
UWRAP_DEBUG(3144) - uwrap_init: Enabled uid_wrapper as root (real uid=1000)
UWRAP_DEBUG(3144) - uwrap_init: Successfully initialized uid_wrapper

/bin/sh -> bash:

[2(2)/2 at 17s, 1 errors] samba.blackbox.pdbtest(nt4_dc)(nt4_dc:local)
UWRAP_DEBUG(3352) - uwrap_export_ids: uwrap_export_ids
UWRAP_DEBUG(3354) - uwrap_export_ids: uwrap_export_ids
UWRAP_DEBUG(3354) - uwrap_init: Initialize uid_wrapper
UWRAP_DEBUG(3354) - uwrap_init_env: uwrap_init_env
UWRAP_DEBUG(3354) - uwrap_init_env: Initialize ruid with 1000
UWRAP_DEBUG(3354) - uwrap_init_env: Initalize euid with 1000
UWRAP_DEBUG(3354) - uwrap_init_env: Initalize suid with 1000
UWRAP_DEBUG(3354) - uwrap_init_env: Initialize ruid with 1000
UWRAP_DEBUG(3354) - uwrap_init_env: Initalize egid with 1000
UWRAP_DEBUG(3354) - uwrap_init_env: Initalize sgid with 1000
UWRAP_DEBUG(3354) - uwrap_init_env: Initalize groups with 4,24,27,30,46,108,1000
UWRAP_DEBUG(3354) - uwrap_init: Enabled uid_wrapper as user (real uid=1000)
UWRAP_DEBUG(3354) - uwrap_init: Successfully initialized uid_wrapper
UWRAP_DEBUG(3353) - uwrap_export_ids: uwrap_export_ids
UWRAP_DEBUG(3353) - uwrap_init: Initialize uid_wrapper
UWRAP_DEBUG(3353) - uwrap_init_env: uwrap_init_env
UWRAP_DEBUG(3353) - uwrap_init_env: Initialize ruid with 1000
UWRAP_DEBUG(3353) - uwrap_init_env: Initalize euid with 1000
UWRAP_DEBUG(3353) - uwrap_init_env: Initalize suid with 1000
UWRAP_DEBUG(3353) - uwrap_init_env: Initialize ruid with 1000
UWRAP_DEBUG(3353) - uwrap_init_env: Initalize egid with 1000
UWRAP_DEBUG(3353) - uwrap_init_env: Initalize sgid with 1000
UWRAP_DEBUG(3353) - uwrap_init_env: Initalize groups with 4,24,27,30,46,108,1000
UWRAP_DEBUG(3353) - uwrap_init: Enabled uid_wrapper as user (real uid=1000)
UWRAP_DEBUG(3353) - uwrap_init: Successfully initialized uid_wrapper

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos4:torture: Initialize tm struct
Samuel Cabrero [Wed, 13 Mar 2019 09:46:36 +0000 (10:46 +0100)]
s4:torture: Initialize tm struct

The samba3.blackbox.shadow_copy_torture tests call to strptime passing
an uninitalized tm structure as an argument, but the strptime function
does not write the tm.tm_isdst field.

These tm structures are passed later as the mktime argument, which
produces different values depending on whether the arbitrary value
of the tm.tm_isdst field is lower or equal to zero or greather than
zero.

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoselftest: Increase nss_wrapper max host entries handling
Andreas Schneider [Thu, 21 Mar 2019 11:06:58 +0000 (12:06 +0100)]
selftest: Increase nss_wrapper max host entries handling

The logs are spammed with:
nwrap_ed_inventarize_add_new: Hash table is full (Cannot allocate memory)!

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agothird_party: Update socket_wrapper to version 1.2.3
Andreas Schneider [Thu, 21 Mar 2019 09:02:54 +0000 (10:02 +0100)]
third_party: Update socket_wrapper to version 1.2.3

* Added environment variable to disable deep binding
* Fixed installation of socket_wrapper
* Fixed several small bugs
* Fixed missing NULL check for socket_wrapper_dir()
* Fixes building in Samba source tree

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:waf: Fix the detection of makdev() macro on Linux
Andreas Schneider [Thu, 21 Mar 2019 10:55:46 +0000 (11:55 +0100)]
s3:waf: Fix the detection of makdev() macro on Linux

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

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): Thu Mar 21 21:40:20 UTC 2019 on sn-devel-144

5 years agos3:torture: Improve the debug message output
Andreas Schneider [Thu, 21 Mar 2019 10:55:26 +0000 (11:55 +0100)]
s3:torture: Improve the debug message output

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:torture: Move the init of the locking out of the loop
Andreas Schneider [Thu, 21 Mar 2019 10:55:01 +0000 (11:55 +0100)]
s3:torture: Move the init of the locking out of the loop

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: Make clear that we got a suicide packet
Andreas Schneider [Thu, 21 Mar 2019 10:17:58 +0000 (11:17 +0100)]
s3:smbd: Make clear that we got a suicide packet

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Use a define for the SMB_SUICIDE_PACKET
Andreas Schneider [Thu, 21 Mar 2019 10:21:21 +0000 (11:21 +0100)]
libcli: Use a define for the SMB_SUICIDE_PACKET

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodbcheck: fix the err_empty_attribute() check
Stefan Metzmacher [Tue, 19 Mar 2019 12:16:59 +0000 (13:16 +0100)]
dbcheck: fix the err_empty_attribute() check

ldb.bytes('') == '' is never True in python3,
we nee ldb.bytes('') == b'' in order to
check that on attribute has an empty value,
that seems to work for python2 and python3.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Mar 21 18:15:20 UTC 2019 on sn-devel-144

5 years agodbcheck: use the str() value of the "name" attribute
Stefan Metzmacher [Tue, 19 Mar 2019 12:05:16 +0000 (13:05 +0100)]
dbcheck: use the str() value of the "name" attribute

We do the same with the rdn attribute value
and we need the same logic on both in order to
check they are the same.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
5 years agos3:script: Fix running cp in modprinter.pl
Andreas Schneider [Thu, 21 Mar 2019 15:06:05 +0000 (16:06 +0100)]
s3:script: Fix running cp in modprinter.pl

We need to unset BASH_ENV or we get:
    Insecure $ENV{BASH_ENV} while running setgid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Mar 21 16:41:33 UTC 2019 on sn-devel-144

5 years agos3:script: Fix running rsync in fake_snap.pl
Andreas Schneider [Thu, 21 Mar 2019 13:37:28 +0000 (14:37 +0100)]
s3:script: Fix running rsync in fake_snap.pl

We need to unset BASH_ENV or we get:
    Insecure $ENV{BASH_ENV} while running setgid

This probably only happens on recent perl versions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
5 years agos3:lib: Increase debug level for messaging_send_buf message
Andreas Schneider [Thu, 21 Mar 2019 09:22:26 +0000 (10:22 +0100)]
s3:lib: Increase debug level for messaging_send_buf message

This is spamming the console when running 'make test' and we set the log
level to 1 by default in selftest.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoldb: Release ldb 1.6.3 ldb-1.6.3
Andrew Bartlett [Sun, 10 Mar 2019 21:47:30 +0000 (10:47 +1300)]
ldb: Release ldb 1.6.3

* Remove Python 2.x support except to build just the bare C library
* Remove --extra-python (a build time mode to produce Python2 and Python3
  bindings at the same time)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar 21 05:08:49 UTC 2019 on sn-devel-144

5 years agotevent: Release tevent 0.10.0 tevent-0.10.0
Andrew Bartlett [Sun, 10 Mar 2019 21:46:35 +0000 (10:46 +1300)]
tevent: Release tevent 0.10.0

* Remove Python 2.x support except to build just the bare C library
* Remove --extra-python (a build time mode to produce Python2 and Python3
  bindings at the same time)
* New minor version to allow Samba 4.10 to release a tevent if
  required from that branch

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agotdb: Release tdb 1.4.0 tdb-1.4.0
Andrew Bartlett [Sun, 10 Mar 2019 21:45:58 +0000 (10:45 +1300)]
tdb: Release tdb 1.4.0

 * Remove Python 2.x support except to build just the bare C library
 * Remove --extra-python (a build time mode to produce Python2 and Python3
   bindings at the same time)
 * New minor version to allow Samba 4.10 to release a tdb if
   required from that branch

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agotalloc: Release talloc 2.2.0 talloc-2.2.0
Andrew Bartlett [Mon, 4 Mar 2019 09:12:18 +0000 (22:12 +1300)]
talloc: Release talloc 2.2.0

 * Remove pytalloc_CObject_FromTallocPtr()
 * Remove --extra-python (a build time mode to produce Python2 and Python3
   bindings at the same time)
 * New minor version to allow Samba 4.10 to release a talloc if
   required from that branch

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Standardise on calling conf.SAMBA_CHECK_PYTHON() in libraries
Andrew Bartlett [Fri, 15 Feb 2019 03:13:48 +0000 (16:13 +1300)]
build: Standardise on calling conf.SAMBA_CHECK_PYTHON() in libraries

We do this by removing the confusing mandatory option to
conf.SAMBA_CHECK_PYTHON{,_HEADERS}(), instead just use the value of
--disable-python internally

This follows the default minimum of Python 3.4 and keeps things consistent
with the main Samba build where --disable-python is required to skip building
python bindings.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Remove manual specification of minimum python version
Andrew Bartlett [Fri, 15 Feb 2019 03:04:53 +0000 (16:04 +1300)]
build: Remove manual specification of minimum python version

We now used the default of 3.4 from conf.SAMBA_CHECK_PYTHON()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Set default minimum python version to 3.4.0
Andrew Bartlett [Fri, 15 Feb 2019 03:03:35 +0000 (16:03 +1300)]
build: Set default minimum python version to 3.4.0

This is the current minimum, but this may change before the 4.11 release.

Python 2.x support is no longer available except to build using --disable-python.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Do not make python mandatory to build
Andrew Bartlett [Fri, 15 Feb 2019 04:45:27 +0000 (17:45 +1300)]
build: Do not make python mandatory to build

Clearly we have python or else we would not be running, so this is about if
we have a new enough version.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoABI: Remove unused .py3*.sigs files
Andrew Bartlett [Mon, 4 Mar 2019 09:15:47 +0000 (22:15 +1300)]
ABI: Remove unused .py3*.sigs files

These are no longer used by the build system so avoid
confusion by removing them from the tree.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Remove distinct .py3 ABI files
Andrew Bartlett [Mon, 4 Mar 2019 08:48:41 +0000 (21:48 +1300)]
build: Remove distinct .py3 ABI files

The only difference between the two built libraries is pytalloc_CObject_FromTallocPtr()
which is deprecated.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoselftest: Remove mention of --extra-python from comment
Andrew Bartlett [Wed, 20 Mar 2019 03:14:25 +0000 (16:14 +1300)]
selftest: Remove mention of --extra-python from comment

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoselftest: Remove obsolete py3_compatible=True markers
Andrew Bartlett [Fri, 15 Feb 2019 04:30:43 +0000 (17:30 +1300)]
selftest: Remove obsolete py3_compatible=True markers

All our tests now run in python3.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoselftest: Remove support for running multiple tests against python versions in a...
Andrew Bartlett [Fri, 15 Feb 2019 03:31:32 +0000 (16:31 +1300)]
selftest: Remove support for running multiple tests against python versions in a single run

The extra_python support was added to aid the python3 transition

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Remove bld.gen_python_environments()
Andrew Bartlett [Fri, 15 Feb 2019 03:37:48 +0000 (16:37 +1300)]
build: Remove bld.gen_python_environments()

This was part of --extra-python support.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agobuild: Remove --extra-python
Andrew Bartlett [Fri, 15 Feb 2019 03:28:38 +0000 (16:28 +1300)]
build: Remove --extra-python

This option is quite invasive in waf and was mainly for the python3 transition.

Testing with multiple python versions can be done by testing a full compile against
multiple versions, likewise multiple different binding versions can be created
the same way.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agopytalloc: Remove deprecated pytalloc_CObject_FromTallocPtr()
Andrew Bartlett [Mon, 4 Mar 2019 09:11:05 +0000 (22:11 +1300)]
pytalloc: Remove deprecated pytalloc_CObject_FromTallocPtr()

This function makes it harder to remove the --extra-python handlers and is only
provided for Python 2.x, support for which Samba is removing.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agolibsmb: Make SMB1-only cli_nt_hardlink calls static
Volker Lendecke [Mon, 18 Mar 2019 10:03:32 +0000 (11:03 +0100)]
libsmb: Make SMB1-only cli_nt_hardlink calls static

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): Wed Mar 20 23:32:31 UTC 2019 on sn-devel-144