Douglas Bagnall [Fri, 12 Apr 2019 23:29:15 +0000 (11:29 +1200)]
pytest/segfault: segfault with nameless element
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Lutz Justen [Fri, 19 Apr 2019 18:17:58 +0000 (11:17 -0700)]
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
Andrew Bartlett [Fri, 19 Apr 2019 22:08:10 +0000 (10:08 +1200)]
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>
Christof Schmitt [Wed, 8 Aug 2018 21:54:24 +0000 (14:54 -0700)]
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
Christof Schmitt [Mon, 14 May 2018 21:35:28 +0000 (14:35 -0700)]
gpfswrap: Remove unused gpfs_prealloc wrapper
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Mon, 14 May 2018 21:34:32 +0000 (14:34 -0700)]
vfs_gpfs: Remove gpfs:prealloc from manpage
The option is no longer in the code, remove it from the manpage as well.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Mon, 14 May 2018 21:33:15 +0000 (14:33 -0700)]
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>
Sachin Prabhu [Mon, 11 Mar 2019 20:07:09 +0000 (20:07 +0000)]
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
Sachin Prabhu [Mon, 11 Mar 2019 14:47:58 +0000 (14:47 +0000)]
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>
Sachin Prabhu [Mon, 11 Mar 2019 14:38:13 +0000 (14:38 +0000)]
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>
Sachin Prabhu [Mon, 11 Mar 2019 14:34:29 +0000 (14:34 +0000)]
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>
Sachin Prabhu [Mon, 11 Mar 2019 20:05:02 +0000 (20:05 +0000)]
s4-torture: Add lease break retry tests - test1
Test to check if lease breaks are sent by the server as expected.
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Mon, 11 Mar 2019 20:02:33 +0000 (20:02 +0000)]
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>
Sachin Prabhu [Mon, 11 Mar 2019 19:42:18 +0000 (19:42 +0000)]
s4-torture: Add oplock break retry tests - test1
Test to confirm that server sends oplock breaks as expected.
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Thu, 28 Feb 2019 12:51:02 +0000 (12:51 +0000)]
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>
Sachin Prabhu [Thu, 28 Feb 2019 12:09:08 +0000 (12:09 +0000)]
s4-torture: Add helper functions to create channels.
Helper functions used by both oplock and lease break tests.
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Mon, 11 Mar 2019 17:14:44 +0000 (17:14 +0000)]
s4-torture: Add #defines required by the new tests
New macros used by our tests.
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Thu, 29 Sep 2016 04:49:50 +0000 (06:49 +0200)]
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>
Günther Deschner [Tue, 19 Jan 2016 14:39:34 +0000 (15:39 +0100)]
s4-torture: add test for interface information retrieval for multichannel.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Mon, 28 May 2018 11:54:54 +0000 (17:24 +0530)]
s4-torture: Increase timeout for lease/oplock break handlers
0.1 seconds is not enough when running tests against a server over the
network and are causing timing related bugs. We increase this to 1
second.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Sat, 16 Mar 2019 12:25:07 +0000 (12:25 +0000)]
s4-torture: Add handlers to ignore incoming oplock/lease break requests
For use in multichannel oplock break tests. These handers ignore
incoming oplock and lease break requests so that we can test the
oplock/lease break retries on the server.
This is meant for use with samba servers which rely on receiving a reply
from the client before timeout.
Windows servers rely on underlying tcp commands to decide if the oplock
break command was delivered successfully to the client and therefore
cannot be tested with this method.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Sat, 16 Mar 2019 12:11:04 +0000 (12:11 +0000)]
s4-torture: Add function declarations to lease_break_handler.h
Do not completely depend on proto.h.
Also move torture_reset_break_info() to lease_break_handler.h so that
the layout is similar to that of oplock_break_handler.*
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Sachin Prabhu [Thu, 14 Mar 2019 18:15:27 +0000 (18:15 +0000)]
s4-torture: move torture_wait_for_oplock_break() to central oplock handler.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Wed, 28 Sep 2016 19:23:20 +0000 (21:23 +0200)]
s4-torture: move oplock break handler out of the replay testsuite.
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Tue, 19 Jan 2016 13:55:03 +0000 (14:55 +0100)]
s4-torture: add new smb2 multichannel suite skeleton.
Also Skip MC tests for s4 ntvfs fileserver, it's not supported at all.
Use knownfail for s3 fileserver for the time being (until socketwrapper
supports fd-passing).
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Wed, 20 Sep 2017 17:19:37 +0000 (19:19 +0200)]
s4-torture: include torture/util.h in lease break handler
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Wuerthner [Mon, 25 Mar 2019 14:17:07 +0000 (15:17 +0100)]
s3:debug: enable logging for early startup failures
Commit
c89a33a07a 'debug: Use backends instead of explicitly logging to
syslog or file' introduced a regression where early startup failures (e.g.
unable to connect to CTDB) are no longer logged because the debug subsystem
is not yet fully initialized. Enable logging again with reasonable defaults
when reopen_logs() is called and the parameter file is not yet parsed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Apr 18 22:21:15 UTC 2019 on sn-devel-144
Ralph Wuerthner [Thu, 11 Apr 2019 11:11:34 +0000 (13:11 +0200)]
s3:debug: adjust indention
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Ralph Wuerthner [Thu, 11 Apr 2019 11:01:16 +0000 (13:01 +0200)]
s3:debug: use struct initializer
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13904
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Christof Schmitt [Mon, 11 Mar 2019 23:25:42 +0000 (16:25 -0700)]
nsswitch: Fix usage information of test_wbinfo_name_lookup.sh
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Apr 18 18:20:26 UTC 2019 on sn-devel-144
Christof Schmitt [Mon, 11 Mar 2019 23:14:02 +0000 (16:14 -0700)]
winbind: Use domain name from lsa query for sid_to_name cache entry
When winbindd is asked to map a name like realm.com\name to a SID ,that
is sucessfully resolved through the lsa lookup name call. The same call
also returns the short domain name (netbios name of the domain). Use
that short domain name for the sid_to_name cache entry, so that
subsequent sid_to_name queries return the expected netbiosname\name
result and not realm.com\name.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Christof Schmitt [Mon, 11 Mar 2019 23:11:01 +0000 (16:11 -0700)]
winbind: Return queried domain name from name_to_sid
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Christof Schmitt [Thu, 14 Mar 2019 17:30:45 +0000 (10:30 -0700)]
winbind: Query domain from winbind sam_name_to_sid
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Christof Schmitt [Mon, 11 Mar 2019 22:54:21 +0000 (15:54 -0700)]
winbind: Query domain from winbind rpc name_to_sid
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Christof Schmitt [Mon, 11 Mar 2019 22:53:51 +0000 (15:53 -0700)]
winbind: Query domain from msrpc name_to_sid
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Christof Schmitt [Mon, 11 Mar 2019 23:26:48 +0000 (16:26 -0700)]
nsswitch: Add testcase for checking output of wbinfo --sid-to-name
The username should always be returned in the DOMAISHORTNAME/USERNAME
format.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Fri, 12 Apr 2019 19:34:24 +0000 (21:34 +0200)]
.gitlab-ci.yml: run the samba-o3 job on each working container image
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr 18 13:10:49 UTC 2019 on sn-devel-144
Stefan Metzmacher [Fri, 12 Apr 2019 19:21:03 +0000 (21:21 +0200)]
.gitlab-ci.yml: split AUTOBUILD_JOB_NAME from CI_JOB_NAME
This will make it easier extend the templates later.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Wed, 20 Mar 2019 04:03:21 +0000 (17:03 +1300)]
.gitlab-ci.yml: make use of bootstrap/.gitlab-ci.yml and use the new defined image
See bootstrap/README.md for the instructions to create and upload the
images via a custom gitlab ci pipeline.
The key is that it's always possible to regenerate the image if
it's not present in the container registry, where we are free to
delete old images. But it should be possible to rebuild images
if someone has the need to run a pipeline based on an old
branch.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 11 Apr 2019 14:56:17 +0000 (16:56 +0200)]
bootstrap/READMD.md: update the instructions to reflect the current code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 12 Apr 2019 11:33:12 +0000 (13:33 +0200)]
bootstrap: add the result of bootstrap/template.py --render
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Thu, 14 Mar 2019 04:15:47 +0000 (17:15 +1300)]
bootstrap/.gitlab-ci.yml: add ci file to trigger image auto build
Depending on 'SAMBA_CI_REBUILD_IMAGES=yes' (and
'SAMBA_CI_REBUILD_BROKEN_IMAGES=yes') as environment
variables on a custom gitlab ci pipeline we'll generate und upload
container images.
bootstrap/README.md will get more details in the next commits.
Please note ci in this file did NOT add the `latest` tag,
since we want main ci to always use a fixed image based on the sha1sum of
everything under bootstrap/ from now on.
This also implies the new built image will not replace/break anything.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 11 Apr 2019 14:56:32 +0000 (16:56 +0200)]
bootstrap: remove unused docker.py
We'll generate docker images during a gitlab-ci run.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Tue, 19 Mar 2019 23:26:48 +0000 (12:26 +1300)]
bootstrap/template.py: add sha1sum support
1. calc sha1sum for files under bootstrap/ (except README.md
and *.pyc files) after render and write to bootstrap/sha1sum.txt file.
2. add a new option to print sha1sum, so we can use it to compare in ci
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 11 Apr 2019 08:34:28 +0000 (10:34 +0200)]
bootstrap/template.py: generate Vagrantfile just once
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Thu, 7 Mar 2019 06:00:37 +0000 (19:00 +1300)]
bootstrap/template.py: render locale.sh for each dist and make shell scripts executable
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 11 Apr 2019 08:34:28 +0000 (10:34 +0200)]
bootstrap/config.py: generate rendered files into bootstrap/generated-dists/
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Thu, 11 Apr 2019 08:34:28 +0000 (10:34 +0200)]
bootstrap/config.py: add a hind how to rebuild generated files
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Fri, 22 Mar 2019 13:15:31 +0000 (14:15 +0100)]
bootstrap/config.py: Add openSUSE Leap 15.0
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Wed, 27 Mar 2019 17:00:09 +0000 (18:00 +0100)]
bootstrap/config.py: Create the 'samba' group in containers
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Thu, 28 Mar 2019 11:04:15 +0000 (12:04 +0100)]
bootstrap/config.py: Fix lmdb-utils package name for RPM family
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Fri, 22 Mar 2019 11:37:13 +0000 (12:37 +0100)]
bootstrap/config.py: Use generic lsb-release package name
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Fri, 22 Mar 2019 11:34:14 +0000 (12:34 +0100)]
bootstrap/config.py: Add gzip, which and hostname to base packages
The openSUSE Leap 15.0 container does not include gzip and which
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Ralph Boehme [Tue, 9 Apr 2019 14:55:37 +0000 (16:55 +0200)]
bootstrap/config.py: add libicu-dev/libicu-devel
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Ralph Boehme [Fri, 29 Mar 2019 11:13:09 +0000 (12:13 +0100)]
bootstrap/config.py: add glib2-dev
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 29 Mar 2019 08:43:08 +0000 (09:43 +0100)]
bootstrap/config.py: add patch, rsync and tar
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Wed, 20 Mar 2019 22:04:24 +0000 (11:04 +1300)]
bootstrap/config.py: link ld to ld.gold when available
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Tue, 19 Mar 2019 03:31:47 +0000 (16:31 +1300)]
bootstrap/config.py: add ARG in Dockerfile to allow add sha1sum into docker image
Add ARG SHA1SUM, then we can pass it to docker build with --build-arg
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Tue, 12 Mar 2019 06:06:03 +0000 (19:06 +1300)]
bootstrap/config.py: rm ENV for ccache since we didn't use it any more
When ccache is not installed, this will cause failure.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Tue, 19 Mar 2019 21:08:08 +0000 (10:08 +1300)]
bootstrap/config.py: add missing dev packages
Add a few extra dev packages missing in current ci image but should be included.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Tue, 19 Mar 2019 21:06:44 +0000 (10:06 +1300)]
bootstrap/config.py: adjust package list to align current ci image
Adjust packages to make `dpkg -l` output align current ci image.
The ones not required are ignored, add a few missing python3 ones.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Fri, 8 Mar 2019 01:49:06 +0000 (14:49 +1300)]
bootstrap/config.py: change UTF-8 to utf8 for locale name in Dockerfile ENV
While generating locales, glibc/localedef/locale-gen will normalize
`UTF-8` to `utf8`, use same name style to avoid string mismatch issues.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Joe Guo [Thu, 7 Mar 2019 04:02:50 +0000 (17:02 +1300)]
bootstrap/config.py: mv locale setup from bootstrap.sh
In future, samba developers could run `bootstrap.sh` to update
dependencies on their workstation, this is very useful when new people
get on board or new dependencies introduced.
But currenly it will override locale, which is not expected for this case.
Remove locale setup cmds from bootstrap.sh, add a separate script for this.
Although this script is written in a generic way and has no variable so far,
still follow the same routine as `bootstrap.sh` to keep consistent.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 12 Apr 2019 19:24:27 +0000 (21:24 +0200)]
.gitlab-ci.yml: require samba-ci-private tag for our private runners
This makes it more clear that we need our own private runners.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Apr 16 17:45:35 UTC 2019 on sn-devel-144
Stefan Metzmacher [Fri, 12 Apr 2019 19:23:53 +0000 (21:23 +0200)]
.gitlab-ci.yml: remove outdated comments
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 16 Apr 2019 12:54:55 +0000 (14:54 +0200)]
.gitlab-ci.yml: run samba-schemaupgrade on the private runner
The related jobs often fail with timeouts
because the shared runners (4GB RAM + 2GB SWAP)
will use ~450MB of the swapfile.
The private runners use 8GB RAM without any swap.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Günther Deschner [Tue, 16 Apr 2019 10:01:58 +0000 (12:01 +0200)]
lib/replace: define NAME_MAX for platforms that don't have it
This allows the vfs_glusterfs_fuse build to complete on AIX.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13872
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Apr 16 15:14:50 UTC 2019 on sn-devel-144
Volker Lendecke [Wed, 19 Sep 2018 15:42:51 +0000 (17:42 +0200)]
smbd: Remove share_mode_lease and the leases array from share_mode_entry
This also removes the temporary functions introduced during the patchset.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Sun Apr 14 05:18:14 UTC 2019 on sn-devel-144
Volker Lendecke [Wed, 19 Sep 2018 11:22:12 +0000 (13:22 +0200)]
smbd: Use share_mode_forall_leases in share_mode_cleanup_disconnected()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Mon, 17 Sep 2018 15:01:38 +0000 (17:01 +0200)]
smbd: Use share_mode_forall_leases in do_break_to_none()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Mon, 17 Sep 2018 11:24:56 +0000 (13:24 +0200)]
smbd: Use share_mode_forall_leases in rename_share_filename()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Mon, 17 Sep 2018 11:14:22 +0000 (13:14 +0200)]
smbd: Add share_mode_forall_leases()
Function to walk all leases for a file exactly once. This used to be simpler
with the leases[] array, thus this function that encapsulates the complexity.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 14:31:55 +0000 (16:31 +0200)]
smbd: Use leases_db in lease_match()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 10:36:25 +0000 (12:36 +0200)]
smbd: Make find_share_mode_lease() static
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 18 Sep 2018 13:18:15 +0000 (15:18 +0200)]
smbd: Use leases_db in process_oplock_break_message()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 11:37:23 +0000 (13:37 +0200)]
smbd: Use leases_db in vfs_default_durable_reconnect()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 10:05:57 +0000 (12:05 +0200)]
smbd: Use leases_db in downgrade_lease()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 18 Sep 2018 11:51:01 +0000 (13:51 +0200)]
smbd: Use leases_db in try_lease_upgrade()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 18 Sep 2018 11:00:49 +0000 (13:00 +0200)]
smbd: Split up grant_fsp_lease()
Simple refactoring into simpler routines. View best with "git show -b"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 08:25:31 +0000 (10:25 +0200)]
smbd: Add update_share_mode_lease_from_db()
This is an interim function supposed to be around for just a few patches as
long as we have both the leases.tdb entries and the leases[] in
share_mode_entries around. It makes it easier to transition to just use
leases.tdb while keeping the code running.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 18 Sep 2018 09:37:28 +0000 (11:37 +0200)]
smbd: Don't pass up lease_idx from grant_fsp_lease
The only reason for grant_fsp_lease to return the lease_idx was to pass it down
to set_share_mode. That does not need it anymore.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 18 Sep 2018 09:31:27 +0000 (11:31 +0200)]
smbd: Don't pass lease_idx down to set_share_mode()
Temporary patch to keep the code running. The new code in set_share_mode() will
leave again once the patchset to remove share_mode_lease and thus the lease_idx
in share_mode_entry goes away.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 10:52:46 +0000 (12:52 +0200)]
utils: Use leases_db in smbstatus
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 10 Apr 2019 14:38:28 +0000 (16:38 +0200)]
smbd: Use leases_db in fsp_lease_update()
Remove a reference to "struct share_mode_lease"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Thu, 13 Sep 2018 10:48:30 +0000 (12:48 +0200)]
smbd: Use leases_db in get_lease_type()
Remove a reference to share_mode_data->leases[]
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Thu, 13 Sep 2018 10:48:30 +0000 (12:48 +0200)]
smbd: Use leases_db in delay_for_oplock()
Remove a reference to share_mode_data->leases[]
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 10 Apr 2019 19:54:27 +0000 (21:54 +0200)]
smbd: Use share_mode_entry's lease data in lease_match()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 10 Apr 2019 19:34:24 +0000 (21:34 +0200)]
smbd: Use share_mode_entry's lease data in vfs_default_durable_reconnect()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 14:39:31 +0000 (16:39 +0200)]
smbd: Use share_mode_entry's lease data in remove_share_mode_lease()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 12:14:32 +0000 (14:14 +0200)]
smbd: Use share_mode_entry's lease data in remove_share_mode_lease()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 19 Sep 2018 12:29:23 +0000 (14:29 +0200)]
smbd: Use share_mode_entry's lease data in is_same_lease()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Thu, 13 Sep 2018 17:11:22 +0000 (19:11 +0200)]
smbd: Use share_mode_entry's lease data in delay_rename_for_lease_break()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 10 Apr 2019 12:05:15 +0000 (14:05 +0200)]
smbd: Use share_mode_entry's lease data in delay_for_oplock()
This was the last "share_mode_lease" reference in this function, remove
variable "l".
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Thu, 13 Sep 2018 10:47:55 +0000 (12:47 +0200)]
smbd: Add lease key to share_mode_entry
Instead of indexing into the leases[] array, put the lease_db reference into
the share_mode_entry. For simplicity, put in the client guid as well. We
*might* be able to retrieve that from somewhere else, but as other smbd
processes have to look at the lease values, put in the full leases_db index
data.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Mon, 8 Apr 2019 14:21:41 +0000 (16:21 +0200)]
smbd: Use leases_db_set()
Whenever we update the share_mode_lease struct, also update the leases.tdb
entry.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 11 Sep 2018 14:23:38 +0000 (16:23 +0200)]
leases_db: Add getter/setter for share_mode_lease metadata
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 11 Sep 2018 14:13:24 +0000 (16:13 +0200)]
leases_db: Add share_mode_lease info to leases.tdb
This is the data stored in share_mode_lease inside the leases[] array in
locking.tdb. This and all the following patches move all leases array to
looking at the leases.tdb.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Tue, 18 Sep 2018 07:55:51 +0000 (09:55 +0200)]
smbd: Pass lease parameters explicitly to find_fsp_lease
This avoids a use of "struct share_mode_lease"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 10 Apr 2019 13:14:38 +0000 (15:14 +0200)]
smbd: Introduce a helper variable in delay_for_oplock()
This removes a few explicit share_mode_lease dereferences
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Volker Lendecke [Wed, 10 Apr 2019 12:19:30 +0000 (14:19 +0200)]
smbd: Introduce a helper variable in delay_for_oplock()
Why? I am preparing a patchset that will remove
"share_mode_lease". This patch is a micro-step towards that, removing
a set of references to this struct.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>