pyldb: avoid segfault when adding an element with no name We don't want to see this: python3 -c "import sys sys.path.insert(0, 'bin/python') import ldb m = ldb.Message() e = ldb.MessageElement('q') try: m.add(e) except ldb.LdbError: pass print(m) " Segmentation fault (core dumped) instead we want this: Traceback (most recent call last): File "<string>", line 7, in <module> ValueError: The element has no name Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Tue Apr 23 19:03:35 UTC 2019 on sn-devel-144
waf: install: Remove installation of PIDL and manpages. It's not used outside of Samba other than wireshark who have their own vendor fork. Signed-off-by: Lutz Justen <ljusten@google.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Apr 23 02:08:56 UTC 2019 on sn-devel-144
selftest: Move simple-dc-steps.sh to correct folder This script helps re-create the environment for the dbcheck-oldrelease.sh links test. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
vfs_gpfs: Block punchhole calls for non-sparse files The core smbd code implements ZERO_DATA for non-sparse files by punching a hole and filling it again with a fallocate(FL_KEEP_SIZE) call. As GPFS does not provide the fallocate(FL_KEEP_SIZE) call and non-sparse files should not contain holes, block the punchhole; effectively only allowing ZERO_DATA/punchhole calls for sparse files. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Apr 23 00:33:03 UTC 2019 on sn-devel-144
vfs_gpfs: Remove usage of gpfs_prealloc All supported versions of GPFS now support fallocate. Use the default codepath instead of the API call. Keep the function stub as it will be used for a check later. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
s4-torture: add test to check for max. number of channels per session. Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Apr 19 18:26:18 UTC 2019 on sn-devel-144
s4-torture: Add lease break retry tests - test4 Test to see how the server behaves when the client flushes data back to the server but doesn't send the lease break response over the channel. Does it then retry the lease break? This test is specifically expected to run against Samba and will not work against a MS Windows servers because it uses the ignore method to ignore oplock breaks sent by the server. Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
s4-torture: Add lease break retry tests - test3 Check to see how the server behaves if lease break response is sent over a different channel to one over which the break is received. The test by default blocks channels by ignoring incoming lease break requests on that channel. This does not work when testing against a windows server. Use --option=torture:use_iptables=true to use iptables to block ports instead when testing against windows servers. Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
s4-torture: Add lease break retry tests - test2 Test to check if lease breaks are sent by the server as expected. The test by default blocks channels by ignoring incoming lease break requests on that channel. This does not work when testing against a windows server. Use --option=torture:use_iptables=true to use iptables to block ports instead when testing against windows servers. Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
s4-torture: Add oplock break retry tests - test2 Test to see if oplock break retries are sent by the server. Also checks to see if new channels can be created and used after an oplock break retry. The test by default blocks channels by ignoring incoming lease break requests on that channel. This does not work when testing against a windows server. Use --option=torture:use_iptables=true to use iptables to block ports instead when testing against windows servers. Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
s4-torture: Add handlers to block channels for testing We use two methods to block channels 1) Simply ignore incoming oplock break requests and do not respond to them. This method doesn't work against Microsoft Windows based servers which rely on the tcp stack for confirmation that the oplock break command was sent to the client machine. This is meant to be used with samba servers and is the default method. 2) Use iptables to block the channel. The method requires the use of a privileged account and can only be used on Linux systems with iptables installed. To use this blocking method, pass the option --option=torture:use_iptables=true Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
s4-torture: add torture_block/torture_unblock smb2 transport functions Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>