1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

111855 Commits

Author SHA1 Message Date
Andrew Bartlett
6784283844 gitlab-ci: Run samba-ad-dc-2 in the shared environment
This will allow more AD DC tests to run for those without access
to a private gitlab runner.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 08:17:44 +02:00
Andrew Bartlett
d0d32fc04f gitlab-ci: Use YAML templates to reduce duplication
Inspired by WIP patches by Jamie McClymont

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 08:17:44 +02:00
Andrew Bartlett
c9764342c2 gitlab-ci: split up gitlab-ci file
The "private" build environments are not available to most users so
remove this from the default build.  Only developers with access
to private runners (rather than a shared runner) will have a runner
tagged as "private".

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 08:17:44 +02:00
Andrew Bartlett
4365741fe5 autobuild: Extend build combinations tested to include --without-ldap
This bumps --without-ads to the samba-nt4 job so that option alone is still covered.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 08:17:44 +02:00
Andrew Bartlett
6124499804 selftest: Allow make test to run with --address-sanitizer
Recent GCC versions enforce that the library must be in LD_PRELOAD if linked to a plugin
(like a python module).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 08:17:44 +02:00
Andrew Bartlett
7e091e5051 s4-lsa: Fix use-after-free in LSA server
This is a regression introduced in ab7988aa2f.

The state variable contains the data to be returned to the client
and packed into NDR after the function returned.

This memory needs to be kept (on mem_ctx as parent) until that is
pushed and freed by the caller.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 08:17:44 +02:00
Richard Sharpe
2096d13274 Fix some incorrect debug messages that look to be copy-paste issues.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu May  3 08:16:26 CEST 2018 on sn-devel-144
2018-05-03 08:16:26 +02:00
Douglas Bagnall
1b3d3304e5 python.gpo.ADS_STRUCT: check type of loadparm argument
And add a test showning the segfault.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-03 05:25:28 +02:00
Garming Sam
a82ca08f37 samba_dnsupdate: Put samba.kcc import after path insert of bin/python
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-03 05:25:27 +02:00
Jeremy Allison
795ec751ac s3: libsmbclient: Fix hard-coded connection error return of ETIMEDOUT.
We shouldn't hard-code the connection error as ETIMEDOUT when
we have a perfectly good NT_STATUS to map from.

Found by the ChromeOS guys trying to connect an SMB2-only client
to an SMB1-only supporting server.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May  3 02:42:20 CEST 2018 on sn-devel-144
2018-05-03 02:42:20 +02:00
Jeremy Allison
0c78aa1f3a s3: VFS: Default. Move vfs_read_data() out of source3/smbd/vfs.c to the printing code, which is the only caller.
Make static.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed May  2 22:20:23 CEST 2018 on sn-devel-144
2018-05-02 22:20:23 +02:00
Jeremy Allison
c68cfbcee6 s3: VFS: default: Remove recursion into the VFS inside the default pread call.
We already know we're at the POSIX level here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-05-02 19:33:13 +02:00
Jeremy Allison
ff3a23e90f s3: VFS: default: Remove fallback if we don't have HAVE_PREAD set. Samba doesn't work without pread.
Start of the changes to remove synchronous VFS read.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-05-02 19:33:13 +02:00
Jeremy Allison
bc71cd035c s3: VFS: Remove fsync_fn() from the VFS and all modules. VFS ABI change.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed May  2 01:06:28 CEST 2018 on sn-devel-144
2018-05-02 01:06:27 +02:00
Jeremy Allison
cf4442090e s3: vfs: Use the new smb_vfs_fsync_sync() call in place of SMB_VFS_FSYNC().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-05-01 22:15:21 +02:00
Jeremy Allison
a0482b9d8d s3: VFS: Add a synchronous smb_vfs_fsync_sync() call, built from async primitives.
Will be used in the next commit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-05-01 22:15:21 +02:00
Martin Schwenke
c6c67d9ed2 ctdb-scripts: Remove function rewrite_ctdb_options()
This is no longer necessary after the removal of support for
CTDB_DBDIR=tmpfs.

File-local variable ctdb_rundir is no longer used, so drop it.

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

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue May  1 16:20:37 CEST 2018 on sn-devel-144
2018-05-01 16:20:37 +02:00
Martin Schwenke
043f3f266a ctdb-scripts: Drop support for CTDB_DBDIR=tmpfs
CTDB has no business mounting filesystems.  Instead, documentation
for the new configuration system will include a recommendation that a
tmpfs be mounted on the volatile database directory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:21 +02:00
Martin Schwenke
eb7ec16a96 ctdb-daemon: Change default volatile database directory
Volatile databases now have their own subdirectory.  This makes things
easier if we later recommend mounting a tmpfs on the volatile database
directory, rather than supporting the current CTDB_DBDIR=tmpfs magic.

No need to create database directories for local daemon tests.  ctdbd
will do that.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:21 +02:00
Martin Schwenke
8ea7fa57f4 ctdb-tests: CTDB_DBDIR_PERSISTENT should not depend on CTDB_DBDIR
Add new variable CTDB_DBDIR_BASE, just for event script unit tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
051203e1f8 ctdb-scripts: Fix location of persistent databases
If CTDB_DBDIR_PERSISTENT is not set then set the default relative to
CTDB_VARDIR.  The persistent database directory is not (necessarily)
relative to the volatile one.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
eba893f06c ctdb-tests: Fix location of persistent databases
Always use CTDB_DBDIR_PERSISTENT, which is setup by the test
infrastructure.  The persistent database directory is
not (necessarily) relative to the volatile one.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
3459a152f7 ctdb-scripts: Drop UDP/file logging warning from ctdbd_wrapper
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
9a5ba6b9c9 ctdb-daemon: Log the logging location when not logging via syslog()
A variant of this is currently done by the wrapper but will be removed
from there because the wrapper will no longer see the CTDB_LOGGING
option.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
8821857cdf ctdb-scripts: Drop warning when there is no recovery lock
After configuration changes ctdbd_wrapper will no longer see the
CTDB_RECOVERY_LOCK option.  The daemon already logs a warning if the
recovery lock is not set, so simply drop this extra warning.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
79c49f60a9 ctdb-daemon: Reorder main() to improve the structure
Move code into clearly defined sections.  Add a fail label for fatal
errors to ensure memory is freed.  Modernise debug messages.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
9623c920ab ctdb-daemon: Consolidate basic CTDB context initialisation
None of this initialisation needs configuration options, so centralise
it with the context initialisation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
1b57487675 ctdb-daemon: Drop duplicate initialisation of request ID context
This doesn't require configuration options so keep the instance in
ctdb_init().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
4eea531416 ctdb-daemon: Move ctdb_init() to the only place it is used
This used to be used by client code but not anymore, so move it to
where it is used.  Drop the comment because it is wrong.  Modernise
logging.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
f4fe768ca3 ctdb-docs: Move remaining test options to README
Test options do not belong in the user documentation.  Move them to
the README file in the tests/ subdirectory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
8a835ae175 ctdb-daemon: Drop ctdbd --torture and --valgrinding options
These haven't been used by anyone in a long time.  --valgrinding is
less use with CTDB_VALGRINDING now gone.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
32430f8415 ctdb-scripts: Drop CTDB_VALGRIND testing option
This is too inflexible for general use.  There is no use finding a new
home for this in the new configuration scheme.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
8c43ce7494 ctdb-daemon: Drop ctdbd --sloppy-start and --nopublicipcheck options
CTDB_LOCAL_DAEMON_MODE=yes is used instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
5081cec49e ctdb-tests: Make local daemon tests depend on CTDB_TEST_MODE
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
3c7b766e5a ctdb-daemon: Add testing environment variable CTDB_TEST_MODE
This is a generic indicator that tests are being run.

For local daemons, this will replace --sloppy-start and
--nopublicipcheck - it also does --nosetsched, which isn't being
removed at this point.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
0349d65854 ctdb-daemon: Drop ctdbd --notification-script command-line option
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
e5af067866 ctdb-scripts: Drop CTDB_NOTIFY_SCRIPT configuration option
Notification scripts are installed into $CTDB_BASE/notify.d/ and are
always run by notify.sh.  Leave notify.sh where it is for now but no
longer consider it a configuration file.  This is an interim measure
and will be changed again soon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
7e9dd3fd3c ctdb-tests: Ensure notify.sh is available to local daemons
Changes to notification configuration are coming, so ensure notify.sh
is always "installed" for local daemons.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
ed80fc1344 ctdb-daemon: Provide a default location for the notification script
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
518be6d5a2 ctdb-daemon: Use a local variable instead of repeating getenv()
Makes the error handling easier and the code more compact.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
7052f87903 ctdb-daemon: Drop unused function ctdb_set_notification_script()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
17ad7d9114 ctdb-daemon: Set ctdb->notification_script directly
This doesn't need a wrapper function.  It gets in the way if building
a value involves allocating memory (e.g. talloc_asprintf()) and then
ctdb_set_notification_script() duplicates that memory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
f5ee088420 ctdb-docs: Move some configuration options out of the debug section
These aren't test options so improve their visibility.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
cdd51df35f ctdb-docs: Move some ctdbd options out of the debug section
ctdbd -i might be useful with systemd or similar, so should be
documented.

--nosetsched and --script-log-level options are valid user-level
options.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Amitay Isaacs
b3dc0dca47 ctdb-build: Rename ctdb-client2 subsystem to ctdb-client
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Amitay Isaacs
e70fe41949 ctdb-daemon: Move ctdb_client.c to server/ subdir
It is used only by the code in the server directory.  It's mainly used
in recovery daemon and vacuuming child process.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Amitay Isaacs
45202d86c5 ctdb-build: Drop unnessary dependency on ctdb-client
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Amitay Isaacs
01c8dc7e15 ctdb-client: Remove ununsed functions from old client code
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13411

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Jeremy Allison
aefe444d17 ceph: VFS: Add asynchronous fsync to ceph module, fake using synchronous call.
This will allow me to ultimately simplify the VFS by removing the synchronous
fsync VFS call.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Apr 30 21:48:55 CEST 2018 on sn-devel-144
2018-04-30 21:48:55 +02:00
Noel Power
268ad19eee python/samba: Py2/Py3 compat change '/' to '//' to ensure int result
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon Apr 30 18:25:25 CEST 2018 on sn-devel-144
2018-04-30 18:25:25 +02:00