vlendec/samba-autobuild/.git
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

5 years agoutils: Use cli_hardlink instead of cli_nt_hardlink
Volker Lendecke [Mon, 18 Mar 2019 10:00:50 +0000 (11:00 +0100)]
utils: Use cli_hardlink instead of cli_nt_hardlink

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Introduce protocol-agnostic cli_hardlink
Volker Lendecke [Mon, 18 Mar 2019 09:34:53 +0000 (10:34 +0100)]
libsmb: Introduce protocol-agnostic cli_hardlink

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Use cli_smb2_set_info_fnum()
Volker Lendecke [Sun, 17 Mar 2019 13:00:09 +0000 (14:00 +0100)]
libsmb: Use cli_smb2_set_info_fnum()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Simplify cli_smb2_ftruncate
Volker Lendecke [Sun, 17 Mar 2019 11:24:05 +0000 (12:24 +0100)]
libsmb: Simplify cli_smb2_ftruncate

We don't need to talloc 8 bytes, they can live on the stack. When we
go async, this can go into the state struct.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Simplify cli_smb2_delete_on_close
Volker Lendecke [Sun, 17 Mar 2019 08:25:42 +0000 (09:25 +0100)]
libsmb: Simplify cli_smb2_delete_on_close

Use cli_smb2_set_info_fnum, remove "state" variables

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Add cli_smb2_set_info_fnum
Volker Lendecke [Sun, 17 Mar 2019 08:17:11 +0000 (09:17 +0100)]
libsmb: Add cli_smb2_set_info_fnum

This wraps getting the file handle from the fnum

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:librpc: Fix installation of Samba
Andreas Schneider [Wed, 20 Mar 2019 10:09:21 +0000 (11:09 +0100)]
s4:librpc: Fix installation of Samba

This breaks installation of Samba 4.10 on Fedora.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar 20 13:11:28 UTC 2019 on sn-devel-144

5 years agopy/graph: use 2.6 compatible check for set membership
Douglas Bagnall [Tue, 19 Mar 2019 23:02:09 +0000 (12:02 +1300)]
py/graph: use 2.6 compatible check for set membership

It is better this way anyway.

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

5 years agoregfio tests: Update comment style to match README.Coding
Andrew Bartlett [Wed, 20 Mar 2019 04:33:46 +0000 (17:33 +1300)]
regfio tests: Update comment style to match README.Coding

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoregfio: Update code near recent changes to match README.Coding
Andrew Bartlett [Wed, 20 Mar 2019 04:32:39 +0000 (17:32 +1300)]
regfio: Update code near recent changes to match README.Coding

This file long predates our current code conventions.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoregfio: Improve handling of malformed registry hive files
Michael Hanselmann [Sun, 17 Mar 2019 12:49:20 +0000 (13:49 +0100)]
regfio: Improve handling of malformed registry hive files

* next_record: A malformed file can lead to an endless loop.
* regfio_rootkey: Supplying a malformed registry hive file to the
  registry hive I/O code can lead to out-of-bounds reads.

Test cases are included. Both issues resolved have been identified using
AddressSanitizer.

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

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoregfio: Add trivial unit test
Michael Hanselmann [Mon, 18 Mar 2019 23:47:52 +0000 (00:47 +0100)]
regfio: Add trivial unit test

An upcoming commit will resolve two cases of insufficient handling of
mangled registry hive files and will include unit tests.

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

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoregfio: Use correct function names in debug information
Michael Hanselmann [Sun, 17 Mar 2019 15:20:47 +0000 (16:20 +0100)]
regfio: Use correct function names in debug information

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoFix typos in "valid"
Michael Hanselmann [Sun, 17 Mar 2019 12:04:52 +0000 (13:04 +0100)]
Fix typos in "valid"

s/vald/valid/

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agobuild: Allow build when --disable-gnutls is set
Andrew Bartlett [Wed, 20 Mar 2019 00:57:50 +0000 (13:57 +1300)]
build: Allow build when --disable-gnutls is set

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

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

5 years agos3: smbd: Clarify POSIX name handling in SMB2 get/setinfo calls.
Jeremy Allison [Mon, 18 Mar 2019 21:52:26 +0000 (14:52 -0700)]
s3: smbd: Clarify POSIX name handling in SMB2 get/setinfo calls.

We should never be looking at the info level here, the create
call will have set the correct POSIX flag on the smb_filename
struct.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 19 22:55:11 UTC 2019 on sn-devel-144

5 years agosmbd: Focus smb_file_link_information on correct posix'ness
Volker Lendecke [Mon, 18 Mar 2019 11:40:06 +0000 (12:40 +0100)]
smbd: Focus smb_file_link_information on correct posix'ness

In the SMB1 unix extensions, posix'ness is a property of the SMB
request, because it's tied to the connection. In the upcoming SMB3
extensions, this will become a property of the file name, it's being
set at SMB2_CREATE time. To correctly transfer posix'ness of the
filename to the destination name, we can't look at the
req->posix_pathnames here, the SMB2_SETINFO call has not set
that. This is still correct for SMB1, as the per-connection posix'ness
has spilled into the filename there too.

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 Mar 19 18:46:28 UTC 2019 on sn-devel-144

5 years agosmbd: Enhance debugging for setting hard links
Volker Lendecke [Mon, 18 Mar 2019 11:24:25 +0000 (12:24 +0100)]
smbd: Enhance debugging for setting hard links

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: Fix alignment issues for casting pointers
Andreas Schneider [Fri, 12 Oct 2018 09:58:26 +0000 (11:58 +0200)]
talloc: Fix alignment issues for casting pointers

warning: cast from 'char *' to 'struct talloc_chunk *' increases required
alignment from 1 to 8

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Mar 19 12:38:50 UTC 2019 on sn-devel-144

5 years agovfs_nfs4acl_xattr: check status for NT_STATUS_ACCESS_DENIED in take ownership override
Ralph Boehme [Thu, 29 Nov 2018 10:17:08 +0000 (11:17 +0100)]
vfs_nfs4acl_xattr: check status for NT_STATUS_ACCESS_DENIED in take ownership override

This was missing in commit 8b1b1cd8cc561378058b915e03996ff567355d81.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Mar 18 20:19:30 UTC 2019 on sn-devel-144

5 years agoselftest: test vfs_nfs4acl_xattr in nfs mode
Ralph Boehme [Mon, 26 Nov 2018 19:51:14 +0000 (20:51 +0100)]
selftest: test vfs_nfs4acl_xattr in nfs mode

The same tests as for the other modes xdr and ndr are marked as
knownfail.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_nfs4acl_xattr: support for NFS 4.0 and 4.1 ACLs from NFS4 mount
Ralph Boehme [Thu, 29 Nov 2018 10:01:59 +0000 (11:01 +0100)]
vfs_nfs4acl_xattr: support for NFS 4.0 and 4.1 ACLs from NFS4 mount

This adds a new main switch "nfs" to "nfs4acl_xattr:encoding" which
enables to use NFS4 ACLs from an NFS4 mount on a Linux box. Tested with
a FreeBSD NFS4 server.

Supports both NFS 4.0 and 4.1 ACLs.

By default NFS4 servers send user and group identifiers in ACLs as
strings in the format "[USER|GROUP]@DNSDOMAIN". Some NFS4 servers
support sending identifiers as numeric strings. This module does support
this as well, the config knob "nfs4acl_xattr:nfs4_id_numeric = yes|no"
controls behaviour.

When "nfs4acl_xattr:encoding" is set to "nfs", the new option
"nfs4acl_xattr:validate_mode", which defauts to "yes" is set to "no" to
avoid checking and munging the mode on files.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4acl_xattr: reformat enum nfs4acl_encoding to one per line
Ralph Boehme [Mon, 26 Nov 2018 15:31:42 +0000 (16:31 +0100)]
nfs4acl_xattr: reformat enum nfs4acl_encoding to one per line

In preperation of adding another enum value.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4acl_xattr: add RFC compliant NFS 4.0 and 4.1 ACL defintions
Ralph Boehme [Mon, 26 Nov 2018 15:30:38 +0000 (16:30 +0100)]
nfs4acl_xattr: add RFC compliant NFS 4.0 and 4.1 ACL defintions

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4acl_xattr: move a define to a common header file
Ralph Boehme [Mon, 26 Nov 2018 15:29:43 +0000 (16:29 +0100)]
nfs4acl_xattr: move a define to a common header file

In preperation of a adding real NFS backend.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4acl_xattr: move some functions to a seperate file
Ralph Boehme [Sun, 25 Nov 2018 11:07:26 +0000 (12:07 +0100)]
nfs4acl_xattr: move some functions to a seperate file

These functions will be called from another translation unit in a
subsequent commit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4acl_xattr: append 'i' to nfs4acl functions
Ralph Boehme [Sun, 25 Nov 2018 10:47:48 +0000 (11:47 +0100)]
nfs4acl_xattr: append 'i' to nfs4acl functions

This reflects the new struct names the functions use.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4acl_xattr: identifiers are XDR encoded as integers
Ralph Boehme [Thu, 22 Nov 2018 17:27:47 +0000 (18:27 +0100)]
nfs4acl_xattr: identifiers are XDR encoded as integers

The structs nfsacl41 and nfsace4 are not RFC 3530 compliant, let's
rename them adding a trailing "i" that indicates that the structs store
identifiers as integers.

  struct nfsace4  -> struct nfsace4i
  struct nfsacl41 -> struct nfsacl41i

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Fix a "assuming signed overflow does not occur" error
Volker Lendecke [Mon, 18 Mar 2019 08:41:57 +0000 (09:41 +0100)]
libsmb: Fix a "assuming signed overflow does not occur" error

Eventually we need to convert internal_resolve_name to "size_t" for
"return_count". But that's a patch for another day :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibsmb: Align integer types
Volker Lendecke [Mon, 18 Mar 2019 08:32:27 +0000 (09:32 +0100)]
libsmb: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoheimdal: Fix "assuming signed overflow doesnt occur" error
Volker Lendecke [Mon, 18 Mar 2019 08:30:17 +0000 (09:30 +0100)]
heimdal: Fix "assuming signed overflow doesnt occur" error

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibsmb: Use cli_smb2_query_info_fnum
Volker Lendecke [Sun, 10 Mar 2019 18:08:20 +0000 (19:08 +0100)]
libsmb: Use cli_smb2_query_info_fnum

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Add cli_smb2_query_info_fnum
Volker Lendecke [Sun, 10 Mar 2019 17:49:55 +0000 (18:49 +0100)]
libsmb: Add cli_smb2_query_info_fnum

This wraps getting the file handle from the fnum

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Change cli_posix_stat_send to take a pointer to sbuf
Volker Lendecke [Wed, 13 Mar 2019 15:10:33 +0000 (16:10 +0100)]
libsmb: Change cli_posix_stat_send to take a pointer to sbuf

This moves the parsing work from the _recv function into the _done
function. This makes writing the SMB2 call easier later on: We can
have a smb2-specific done function doing the smb2-specific work and we
don't have to fork on protocol in the _recv function.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Make cli_posix_[sym|hard]link proper tevent_req functions
Volker Lendecke [Thu, 14 Mar 2019 13:23:35 +0000 (14:23 +0100)]
libsmb: Make cli_posix_[sym|hard]link proper tevent_req functions

Simplify adding SMB2 to those functions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Use tevent_req_simple_finish_ntstatus
Volker Lendecke [Thu, 14 Mar 2019 19:46:45 +0000 (20:46 +0100)]
libsmb: Use tevent_req_simple_finish_ntstatus

Less lines of code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Remove two unnecessary return; statements
Volker Lendecke [Fri, 8 Mar 2019 13:58:02 +0000 (14:58 +0100)]
smbd: Remove two unnecessary return; statements

return; is unnecessary at the end of a void function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture3: Fix an error message
Volker Lendecke [Thu, 14 Mar 2019 10:40:23 +0000 (11:40 +0100)]
torture3: Fix an error message

We tried to open "dname", not "fname"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Use a direct struct initializer
Volker Lendecke [Sun, 10 Mar 2019 14:40:45 +0000 (15:40 +0100)]
libsmb: Use a direct struct initializer

There's a few ways to initialize a DATA_BLOB to NULL. There's the
variable data_blob_null, there's ZERO_STRUCTP, and the explicit
initializer. And there's the data_blob() macro which calls into
data_blob_talloc_named. You have to look at that routine to see that
this is nothing more than a ZERO_STRUCT() and not calling into
talloc. Choose the more direct way.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Align integer types
Volker Lendecke [Sun, 10 Mar 2019 14:36:53 +0000 (15:36 +0100)]
libcli: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoidl: Remove a trailing empty line
Volker Lendecke [Thu, 14 Mar 2019 15:18:03 +0000 (16:18 +0100)]
idl: Remove a trailing empty line

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Add a comment explaining lack of overflow checks
Volker Lendecke [Thu, 14 Mar 2019 15:13:10 +0000 (16:13 +0100)]
libcli: Add a comment explaining lack of overflow checks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoidl: Fix a typo
Volker Lendecke [Thu, 14 Mar 2019 16:16:12 +0000 (17:16 +0100)]
idl: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Give mdssd its header file
Volker Lendecke [Fri, 15 Mar 2019 08:52:16 +0000 (09:52 +0100)]
rpc_server: Give mdssd its header file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Give fssd its header file
Volker Lendecke [Fri, 15 Mar 2019 08:43:07 +0000 (09:43 +0100)]
rpc_server: Give fssd its header file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Give lsasd its header file
Volker Lendecke [Fri, 15 Mar 2019 08:40:21 +0000 (09:40 +0100)]
rpc_server: Give lsasd its header file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Give epmd its header file
Volker Lendecke [Fri, 15 Mar 2019 08:36:35 +0000 (09:36 +0100)]
rpc_server: Give epmd its header file

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:client: Fix smbspool device uri handling
Andreas Schneider [Tue, 12 Mar 2019 10:40:30 +0000 (11:40 +0100)]
s3:client: Fix smbspool device uri handling

If we are executed as a CUPS backend, argv[0] is set to the device uri.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bryan Mason <bmason@redhat.com>
Signed-off-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Mar 18 16:47:55 UTC 2019 on sn-devel-144

5 years agos3:client: Make sure we work on a copy of the title
Andreas Schneider [Tue, 12 Mar 2019 09:09:14 +0000 (10:09 +0100)]
s3:client: Make sure we work on a copy of the title

We can't be sure we can write to the input buffer.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bryan Mason <bmason@redhat.com>
Signed-off-by: Guenther Deschner <gd@samba.org>
5 years agos3:client: Evaluate the AUTH_INFO_REQUIRED variable set by cups
Andreas Schneider [Fri, 4 Jan 2019 08:21:24 +0000 (09:21 +0100)]
s3:client: Evaluate the AUTH_INFO_REQUIRED variable set by cups

This should not switch to username,password if cups has been configured
to use negotiate (Kerberos authentication).

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bryan Mason <bmason@redhat.com>
Signed-off-by: Guenther Deschner <gd@samba.org>
5 years agos3:client: Pass DEVICE_URI and AUTH_INFO_REQUIRED env to smbspool
Andreas Schneider [Tue, 12 Mar 2019 08:40:58 +0000 (09:40 +0100)]
s3:client: Pass DEVICE_URI and AUTH_INFO_REQUIRED env to smbspool

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bryan Mason <bmason@redhat.com>
Signed-off-by: Guenther Deschner <gd@samba.org>
5 years agos3:script: Fix jobid check in test_smbspool.sh
Andreas Schneider [Tue, 12 Mar 2019 09:15:05 +0000 (10:15 +0100)]
s3:script: Fix jobid check in test_smbspool.sh

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bryan Mason <bmason@redhat.com>
Signed-off-by: Guenther Deschner <gd@samba.org>
5 years agosmbd: fix check_parent_access() talloc stackframe leaks
David Disseldorp [Tue, 12 Mar 2019 17:49:09 +0000 (18:49 +0100)]
smbd: fix check_parent_access() talloc stackframe leaks

check_parent_access() currently leaks a number of allocations onto the
talloc_tos() context in both success and error paths.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Mar 15 11:32:04 UTC 2019 on sn-devel-144

5 years agoctdb-version: Simplify version string usage
Amitay Isaacs [Fri, 15 Mar 2019 01:14:27 +0000 (12:14 +1100)]
ctdb-version: Simplify version string usage

There is no need to write SAMBA_VERSION_STRING as CTDB_VERSION_STRING.
Wherever required use SAMBA_VERSION_STRING directly.

Avoids the confusion with two version.h files.

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

Signed-off-by: Amitay Isaacs <amitay@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Mar 15 06:31:50 UTC 2019 on sn-devel-144

5 years agoctdb-build: Drop creation of .distversion in tarball
Martin Schwenke [Thu, 7 Mar 2019 06:53:25 +0000 (17:53 +1100)]
ctdb-build: Drop creation of .distversion in tarball

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING
Stefan Metzmacher [Fri, 16 Jun 2017 10:15:25 +0000 (12:15 +0200)]
ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING

This way we don't get constant rebuild as SAMBA_VERSION_STRING
is "4.7.0pre1.DEVELOPERBUILD" for the binaries under bin/
instead of "4.7.0pre1.GIT.59e51f6".

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Add a test for version consistency checking
Martin Schwenke [Fri, 8 Feb 2019 02:32:16 +0000 (13:32 +1100)]
ctdb-tests: Add a test for version consistency checking

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
5 years agoctdb-daemon: Add an environment variable to set version
Martin Schwenke [Wed, 6 Feb 2019 02:57:00 +0000 (13:57 +1100)]
ctdb-daemon: Add an environment variable to set version

This can be used to test the version checking logic.  Cache the
version to avoid re-checking the environment variable each time.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
5 years agoctdb-tests: Fix remaining common.sh ShellCheck hits
Martin Schwenke [Thu, 7 Mar 2019 04:46:48 +0000 (15:46 +1100)]
ctdb-tests: Fix remaining common.sh ShellCheck hits

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
5 years agoctdb-tests: Shell cleanups in wait_until() function
Martin Schwenke [Thu, 7 Mar 2019 04:40:59 +0000 (15:40 +1100)]
ctdb-tests: Shell cleanups in wait_until() function

This file is included by local_daemons.sh, which is not a bash script
and wait_until() uses the "local" keyword.  Prefixing variable names
with '_' to indicate that they are local changes a lot of lines in
this function.  So, fix indentation, potential quoting problems and
other ShellCheck hits while touching this function.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>