samba.git
4 years agoFactor out submodule presence checking.
Jelmer Vernooij [Mon, 18 May 2015 20:19:23 +0000 (20:19 +0000)]
Factor out submodule presence checking.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 19 22:17:48 CEST 2015 on sn-devel-104

4 years agoMake waf fail if submodules are out of date.
Jelmer Vernooij [Mon, 18 May 2015 20:00:30 +0000 (20:00 +0000)]
Make waf fail if submodules are out of date.

Instead, suggest the user run 'git submodule update'.

This should prevent users from accidentally building Samba against
outdated or too new versions of the bundled third party libraries
after switching branches.

I've opted to make this an error rather than actually
running 'git submodule update' directly, as the latter could
cause unpredictable behaviour. If we find that manually updating
submodules is too cumbersome, we can always change this. The normal mode
of operation for developers should not involve any submodules at all,
but system versions of these libraries.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoFactor out function for finding Git binary.
Jelmer Vernooij [Mon, 18 May 2015 17:37:51 +0000 (17:37 +0000)]
Factor out function for finding Git binary.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoDrop bzr VCS support.
Jelmer Vernooij [Mon, 18 May 2015 17:15:15 +0000 (17:15 +0000)]
Drop bzr VCS support.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoSimplify instructions for checking out submodules.
Jelmer Vernooij [Tue, 5 May 2015 22:05:14 +0000 (22:05 +0000)]
Simplify instructions for checking out submodules.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agopytalloc: Test for all Python versions
Petr Viktorin [Wed, 6 May 2015 16:05:18 +0000 (18:05 +0200)]
pytalloc: Test for all Python versions

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agobuildtools: Add a helper for running Python tests
Petr Viktorin [Tue, 10 Mar 2015 17:19:14 +0000 (18:19 +0100)]
buildtools: Add a helper for running Python tests

Add the function samba_utils.RUN_PYTHON_TESTS for running a Python
test. When building for multiple Python versions, all are tested.

Also, add the list of configured Python interpreters to build config.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agobuildtools: Add a helper to iterate through Python environments
Petr Viktorin [Wed, 6 May 2015 15:50:57 +0000 (17:50 +0200)]
buildtools: Add a helper to iterate through Python environments

This prevents code duplication to ensure the "extrapython" build
is the same as the normal one.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agopytalloc: Build for two Python versions at once
Petr Viktorin [Wed, 6 May 2015 16:17:06 +0000 (18:17 +0200)]
pytalloc: Build for two Python versions at once

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agobuildtools: Add --extra-python configure option
Petr Viktorin [Thu, 15 Jan 2015 13:22:22 +0000 (14:22 +0100)]
buildtools: Add --extra-python configure option

This allows building Python support for two different Python versions
at the same time.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agobuildtools: Expose the Python 3 ABI tag
Petr Viktorin [Wed, 6 May 2015 10:45:42 +0000 (12:45 +0200)]
buildtools: Expose the Python 3 ABI tag

Expose the tag in the env to allow using it in pkg-config files

Add a "pyembed_libname" function to correctly form library names.
(This can't be done automatically in SAMBA_LIBRARY because the name
could be used as a dependency for another library)

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agopytalloc: Port to Python 3
Petr Viktorin [Thu, 15 Jan 2015 13:07:09 +0000 (14:07 +0100)]
pytalloc: Port to Python 3

- Use native string for repr

- Use rich comparison
  Removes the deprecated tp_compare in favor of tp_richcompare.
  Disparate types cannot be compared (except for == and !=),
  and True or False objects are returned explicitly.

- Use Py_TYPE instead of ob_type
  This changed to conform to C aliasing rules,
  see http://legacy.python.org/dev/peps/pep-3123/

- Don't provide CObject creation function
  A PyCapsule based replacement would be possible,
  but might not be necessary considering the function is
  not used much.

- Use new-style module initialization

Build changes:

- Use ABI flag in the lib name and pkg-config template

- Use the SAMBA_CHECK_PYTHON macro for finding Python

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agoFix a typo in the name of the default domain level
Matthieu Patou [Tue, 19 May 2015 10:39:59 +0000 (03:39 -0700)]
Fix a typo in the name of the default domain level

Change-Id: I2df44546a74f19ef2c6f1100d29b67fe7362070a
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May 19 19:26:22 CEST 2015 on sn-devel-104

4 years agos3:tevent_wait: simplify the code by using tevent_req_defer_callback()
Stefan Metzmacher [Thu, 18 Sep 2014 20:54:23 +0000 (22:54 +0200)]
s3:tevent_wait: simplify the code by using tevent_req_defer_callback()

This way a user of this could also use tevent_req_error() or wrappers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 19 16:37:52 CEST 2015 on sn-devel-104

4 years agos3:modules: remove unused allow_warnings=True for vfs_nfs4acl_xattr
Stefan Metzmacher [Fri, 10 Apr 2015 09:12:04 +0000 (11:12 +0200)]
s3:modules: remove unused allow_warnings=True for vfs_nfs4acl_xattr

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:vfs_nfs4acl_xattr: fix compiler warnings
Stefan Metzmacher [Fri, 10 Apr 2015 09:29:59 +0000 (11:29 +0200)]
s3:vfs_nfs4acl_xattr: fix compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:modules: remove unused allow_undefined_symbols=False from vfs_glusterfs
Stefan Metzmacher [Fri, 10 Apr 2015 09:12:04 +0000 (11:12 +0200)]
s3:modules: remove unused allow_undefined_symbols=False from vfs_glusterfs

This is the default...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:modules: remove unused allow_undefined_symbols=True from vfs_aio_*
Stefan Metzmacher [Fri, 10 Apr 2015 09:12:04 +0000 (11:12 +0200)]
s3:modules: remove unused allow_undefined_symbols=True from vfs_aio_*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:modules: remove unused allow_warnings=True for vfs_aio_fork
Stefan Metzmacher [Fri, 10 Apr 2015 09:12:04 +0000 (11:12 +0200)]
s3:modules: remove unused allow_warnings=True for vfs_aio_fork

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:vfs_aio_fork: avoid -Wcast-qual warnings
Stefan Metzmacher [Fri, 10 Apr 2015 09:10:27 +0000 (11:10 +0200)]
s3:vfs_aio_fork: avoid -Wcast-qual warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:modules: remove unused allow_warnings=True for vfs_preopen
Stefan Metzmacher [Fri, 10 Apr 2015 09:12:04 +0000 (11:12 +0200)]
s3:modules: remove unused allow_warnings=True for vfs_preopen

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:vfs_preopen: avoid compiler warnings
Stefan Metzmacher [Fri, 10 Apr 2015 09:31:31 +0000 (11:31 +0200)]
s3:vfs_preopen: avoid compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:modules: remove unused allow_warnings=True for vfs_unityed_media
Stefan Metzmacher [Fri, 10 Apr 2015 09:12:04 +0000 (11:12 +0200)]
s3:modules: remove unused allow_warnings=True for vfs_unityed_media

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3:wscript: remove unused uint[16,32] rpc.h checks
Stefan Metzmacher [Mon, 18 May 2015 13:00:14 +0000 (15:00 +0200)]
s3:wscript: remove unused uint[16,32] rpc.h checks

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoauth: Make sure error_string is not used uninitialized
Andreas Schneider [Tue, 19 May 2015 08:35:47 +0000 (10:35 +0200)]
auth: Make sure error_string is not used uninitialized

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue May 19 13:42:32 CEST 2015 on sn-devel-104

4 years agoRemove [u]int[XX] defines from source3/include/includes.h
Richard Sharpe [Mon, 18 May 2015 00:21:06 +0000 (17:21 -0700)]
Remove [u]int[XX] defines from source3/include/includes.h

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon May 18 05:24:22 CEST 2015 on sn-devel-104

4 years agoUse tevent_req_poll_ntstatus
Volker Lendecke [Tue, 28 Apr 2015 14:00:06 +0000 (14:00 +0000)]
Use tevent_req_poll_ntstatus

Kill 41 lines ..

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert the few instances of int32 there were to int32_t.
Richard Sharpe [Fri, 15 May 2015 21:56:25 +0000 (14:56 -0700)]
Convert the few instances of int32 there were to int32_t.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat May 16 03:09:12 CEST 2015 on sn-devel-104

4 years agopidl:Samba3/ServerNDR: normalize {RETURN_TYPE} by using mapTypeName()
Stefan Metzmacher [Fri, 15 May 2015 06:34:42 +0000 (08:34 +0200)]
pidl:Samba3/ServerNDR: normalize {RETURN_TYPE} by using mapTypeName()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 15 22:19:38 CEST 2015 on sn-devel-104

4 years agoConvert uint64 to uint64_t
Richard Sharpe [Fri, 15 May 2015 14:38:04 +0000 (07:38 -0700)]
Convert uint64 to uint64_t

We seemed to have very few uses of that.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoCovert all uint32/16/8 to _t in source3/rpc_server.
Richard Sharpe [Fri, 15 May 2015 01:08:27 +0000 (18:08 -0700)]
Covert all uint32/16/8 to _t in source3/rpc_server.

This can be committed regardless of the state of the PIDL changes.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: IPv6 enabled DNS connections for ADS client
David Holder [Wed, 13 May 2015 14:10:47 +0000 (15:10 +0100)]
s3: IPv6 enabled DNS connections for ADS client

This patch makes DNS client connections protocol independent.
For example DNS updates. This makes IPv6-only clients possible.

Signed-off-by: David Holder <david.holder@erion.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
4 years agoConvert all uint32/16/8 to _t in a grab-bag of remaining files.
Richard Sharpe [Thu, 14 May 2015 00:26:01 +0000 (17:26 -0700)]
Convert all uint32/16/8 to _t in a grab-bag of remaining files.

I still need to fix the rpc stuff, but we are almost there.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104

4 years agoConvert all uses of uint32/16/8 to _t in source3/groupdb.
Richard Sharpe [Thu, 14 May 2015 00:03:05 +0000 (17:03 -0700)]
Convert all uses of uint32/16/8 to _t in source3/groupdb.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonamequery: Fix a missing TALLOC_FREE
Volker Lendecke [Thu, 14 May 2015 11:28:16 +0000 (11:28 +0000)]
namequery: Fix a missing TALLOC_FREE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu May 14 16:49:39 CEST 2015 on sn-devel-104

4 years agoFix the uint32/16/8 stuff in two proto.h files I missed.
Richard Sharpe [Tue, 12 May 2015 14:25:34 +0000 (07:25 -0700)]
Fix the uint32/16/8 stuff in two proto.h files I missed.

Signed-off-by: Richard Sharpe <rsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 13 22:01:14 CEST 2015 on sn-devel-104

4 years agoConvert all uses of uint32/16/8 to _t in source3/auth.
Richard Sharpe [Mon, 11 May 2015 01:17:56 +0000 (18:17 -0700)]
Convert all uses of uint32/16/8 to _t in source3/auth.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert uint32/16/8 to _t in source3/libnet.
Richard Sharpe [Sun, 10 May 2015 02:58:40 +0000 (19:58 -0700)]
Convert uint32/16/8 to _t in source3/libnet.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uint32/16/8 to _t in source3/client.
Richard Sharpe [Sun, 10 May 2015 02:49:09 +0000 (19:49 -0700)]
Convert all uint32/16/8 to _t in source3/client.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert a couple of uint32s to _t that I missed in source3/utils.
Richard Sharpe [Sun, 10 May 2015 00:06:28 +0000 (17:06 -0700)]
Convert a couple of uint32s to _t that I missed in source3/utils.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uint32/16/8 to _t in source3/libsmb.
Richard Sharpe [Sat, 9 May 2015 23:59:45 +0000 (16:59 -0700)]
Convert all uint32/16/8 to _t in source3/libsmb.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uint32/16/8 to _t in source3/lib.
Richard Sharpe [Sat, 9 May 2015 23:33:10 +0000 (16:33 -0700)]
Convert all uint32/16/8 to _t in source3/lib.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uint32/16/8 to _t in source3/locking.
Richard Sharpe [Sat, 9 May 2015 23:14:39 +0000 (16:14 -0700)]
Convert all uint32/16/8 to _t in source3/locking.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonamequery: namequery: suppress bogus warning "resolve_name: unknown name switch type"
Volker Lendecke [Wed, 13 May 2015 06:53:43 +0000 (08:53 +0200)]
namequery: namequery: suppress bogus warning "resolve_name: unknown name switch type"

Based on a patch by Uri Simchoni <urisimchoni@gmail.com>

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-doc: Document externally managed public IP addresses
Martin Schwenke [Tue, 12 May 2015 04:42:00 +0000 (14:42 +1000)]
ctdb-doc: Document externally managed public IP addresses

For use with DisableIPFailover=1.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed May 13 09:27:36 CEST 2015 on sn-devel-104

4 years agoctdb-tests: Add tickle test for external public address handling
Martin Schwenke [Tue, 12 May 2015 04:11:59 +0000 (14:11 +1000)]
ctdb-tests: Add tickle test for external public address handling

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: New eventscript 10.external
Martin Schwenke [Mon, 11 May 2015 05:29:34 +0000 (15:29 +1000)]
ctdb-scripts: New eventscript 10.external

This is an alternative to 10.interface and is installed as disabled by
default.  It should only be used with DisableIPFailover=yes and when
IP failover is being handled externally.  In this mode CTDB can be
informed of public IP address movements using "ctdb moveip".

During the "startup" event, this eventscript currently finds any
public IP addresses configured in $CTDB_PUBLIC_ADDRESSES and tells
CTDB which node they are on using "ctdb moveip".  This allows CTDB to
send ARPs and tickle-ACKs.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Move release of all IPs to startup
Martin Schwenke [Fri, 8 May 2015 10:00:35 +0000 (20:00 +1000)]
ctdb-daemon: Move release of all IPs to startup

This means that DisableIPFailover will be set if it should be.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Never release all IPs when DisableIPFailover is set
Martin Schwenke [Fri, 8 May 2015 05:20:04 +0000 (15:20 +1000)]
ctdb-daemon: Never release all IPs when DisableIPFailover is set

If DisableIPFailover is set then something else may be managing public
IP addresses so CTDB should leave them alone.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Drop all public IP addresses from 10.interface
Martin Schwenke [Fri, 8 May 2015 05:18:48 +0000 (15:18 +1000)]
ctdb-scripts: Drop all public IP addresses from 10.interface

00.ctdb should not know about public IP addresses.

Move related tests to operate on 10.interface.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Don't update IP tree if DisableIPFailover is set
Martin Schwenke [Fri, 8 May 2015 03:14:34 +0000 (13:14 +1000)]
ctdb-daemon: Don't update IP tree if DisableIPFailover is set

There won't be an IP tree.  It is only ever initialised during a
takeover run.

The alternate to this would be to avoid sending
CTDB_SRVID_RECD_UPDATE_IP in "ctdb moveip".  This logic is probably
best kept out of the CLI tool.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Mark interfaces as "up" by default
Martin Schwenke [Fri, 8 May 2015 07:11:24 +0000 (17:11 +1000)]
ctdb-daemon: Mark interfaces as "up" by default

The potential for public IP addresses to shuffle around during node
initialisation disappeared a while ago because IP addresses can only
be assigned to a node that is in CTDB_RUNSTATE_RUNNING.  This means
that interfaces might as well just be initialised as "up".  If any
interfaces are actually "down" then this will be rectified by the
"startup" event in 10.interfaces.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Skip "IP on interface" checks if DisableIPFailover is set
Martin Schwenke [Thu, 7 May 2015 10:41:55 +0000 (20:41 +1000)]
ctdb-daemon: Skip "IP on interface" checks if DisableIPFailover is set

To support external failover of IP addresses if DisableIPFailover is
set.  CTDB's idea of IP address assignment can be manipulated using
"ctdb moveip".  Checking if the IP address is already held breaks
this in several places.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Improve readability of code by nesting if-statements
Martin Schwenke [Fri, 8 May 2015 02:34:43 +0000 (12:34 +1000)]
ctdb-daemon: Improve readability of code by nesting if-statements

ctdb_sys_have_ip() should only be run if if do_publicipcheck is set.
This is clearer if written as 2 nested if-statements rather than as a
lazy conjuction.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agolibads: record service ticket endtime for sealed ldap connections
Uri Simchoni [Sat, 9 May 2015 19:59:17 +0000 (22:59 +0300)]
libads: record service ticket endtime for sealed ldap connections

When a ticket is obtained for binding a signed/sealed ldap connection,
its liftime should be recorded in the ads struct, in order to enable
reuse of the connection.

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

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 13 04:32:16 CEST 2015 on sn-devel-104

4 years agodbwrap: Remove an unused variable
Volker Lendecke [Fri, 8 May 2015 13:15:37 +0000 (13:15 +0000)]
dbwrap: Remove an unused variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Remove unused hex_encode()
Volker Lendecke [Fri, 8 May 2015 10:24:48 +0000 (10:24 +0000)]
lib: Remove unused hex_encode()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agontlm_auth: Remove two uses of hex_encode()
Volker Lendecke [Fri, 8 May 2015 10:12:21 +0000 (10:12 +0000)]
ntlm_auth: Remove two uses of hex_encode()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Make sid_binstring_hex use TALLOC
Volker Lendecke [Fri, 8 May 2015 10:06:23 +0000 (10:06 +0000)]
lib: Make sid_binstring_hex use TALLOC

talloc_tos() is better than plain malloc...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Simplify sid_binstring_hex()
Volker Lendecke [Fri, 8 May 2015 07:06:53 +0000 (07:06 +0000)]
lib: Simplify sid_binstring_hex()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoAdd IPv6 support for determining FQDN during ADS join.
David Holder [Tue, 12 May 2015 16:40:29 +0000 (17:40 +0100)]
Add IPv6 support for determining FQDN during ADS join.

Signed-off-by: David Holder <david.holder@erion.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue May 12 23:35:32 CEST 2015 on sn-devel-104

4 years agoAdd IPv6 support to ADS client side LDAP connects. Corrected format for IPv6 LDAP...
David Holder [Tue, 12 May 2015 15:09:54 +0000 (16:09 +0100)]
Add IPv6 support to ADS client side LDAP connects. Corrected format for IPv6 LDAP URI. Signed-off-by: David Holder <david.holder@erion.co.uk>

Signed-off-by: David Holder <david.holder@erion.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
4 years agoConvert all uint32/16/8 to _t in a couple of include files.
Richard Sharpe [Sat, 9 May 2015 22:35:21 +0000 (15:35 -0700)]
Convert all uint32/16/8 to _t in a couple of include files.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue May 12 04:22:55 CEST 2015 on sn-devel-104

4 years agoConvert all uses of uint32/16/8 to _t in source3/passdb.
Richard Sharpe [Sat, 9 May 2015 20:34:31 +0000 (13:34 -0700)]
Convert all uses of uint32/16/8 to _t in source3/passdb.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all (remaining) uses of uint32/16/8 to _t in source3/printing.
Richard Sharpe [Sat, 9 May 2015 19:33:40 +0000 (12:33 -0700)]
Convert all (remaining) uses of uint32/16/8 to _t in source3/printing.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uses of uint32/16/8 to _t in source3/registry.
Richard Sharpe [Sat, 9 May 2015 19:19:46 +0000 (12:19 -0700)]
Convert all uses of uint32/16/8 to _t in source3/registry.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uses of uint32/16/8 to _t in source3/rpc_server.
Richard Sharpe [Sat, 9 May 2015 17:02:05 +0000 (10:02 -0700)]
Convert all uses of uint32/16/8 to _t in source3/rpc_server.

Signed-off-by: Richard Sharpe <rsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uses of uint32/16/8 to _t in source3/rpc_client.
Richard Sharpe [Sat, 9 May 2015 16:49:04 +0000 (09:49 -0700)]
Convert all uses of uint32/16/8 to _t in source3/rpc_client.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uint32/16/8 to _t in source3/rpcclient.
Richard Sharpe [Sat, 9 May 2015 14:33:08 +0000 (07:33 -0700)]
Convert all uint32/16/8 to _t in source3/rpcclient.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoConvert all uses of uint32/16/8 to _t in source3/torture.
Richard Sharpe [Sat, 9 May 2015 03:10:12 +0000 (20:10 -0700)]
Convert all uses of uint32/16/8 to _t in source3/torture.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoChange all uses of uint32 to uint32_t in vfs.h. This is part of a general cleanup...
Richard Sharpe [Mon, 13 Apr 2015 23:56:09 +0000 (16:56 -0700)]
Change all uses of uint32 to uint32_t in vfs.h. This is part of a general cleanup if people approve. This time around get both vfs.h and vfs.c and all instances of uint8, uint16 and uint32.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-daemon: Remove obsolete IPv4 only controls
Amitay Isaacs [Mon, 23 Mar 2015 06:06:31 +0000 (17:06 +1100)]
ctdb-daemon: Remove obsolete IPv4 only controls

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-daemon: Remove older data structure that supports only IPv4 addresses
Amitay Isaacs [Mon, 23 Mar 2015 06:32:34 +0000 (17:32 +1100)]
ctdb-daemon: Remove older data structure that supports only IPv4 addresses

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-daemon: Fix typo in debug message
Martin Schwenke [Sun, 12 Apr 2015 21:52:04 +0000 (07:52 +1000)]
ctdb-daemon: Fix typo in debug message

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sun May 10 06:10:21 CEST 2015 on sn-devel-104

4 years agoctdb-daemon: Initialise eventscript status earlier
Martin Schwenke [Wed, 18 Mar 2015 09:46:46 +0000 (20:46 +1100)]
ctdb-daemon: Initialise eventscript status earlier

Don't initialise it after ctdb_event_script_callback_v() may have
short-circuited.  This can stop ctdb_event_script_args() from ever
terminating.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Make ctdb_event_script_args() terminate if no scripts
Martin Schwenke [Wed, 18 Mar 2015 09:27:45 +0000 (20:27 +1100)]
ctdb-daemon: Make ctdb_event_script_args() terminate if no scripts

status.done is never set to true unless event_script_callback() is
invoked.  The short-circuit in ctdb_event_script_callback_v() means
that this doesn't happen.  CTDB can't work very well without 00.ctdb
(for tunable initialisation and the like) but it shouldn't get stuck.

So call the callback when there are no scripts in
event_script_callback().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Drop interface monitoring
Martin Schwenke [Tue, 17 Mar 2015 10:42:23 +0000 (21:42 +1100)]
ctdb-daemon: Drop interface monitoring

This is done by 10.interace where the monitor event fails when there
is a missing interface.  The in-daemon interface checking adds no
value.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-common: Reimplement external tracing using ctdb_set_helper()
Martin Schwenke [Sat, 7 Mar 2015 05:15:01 +0000 (16:15 +1100)]
ctdb-common: Reimplement external tracing using ctdb_set_helper()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Drop update of public address configuration from config.tdb
Martin Schwenke [Tue, 30 Dec 2014 05:17:19 +0000 (16:17 +1100)]
ctdb-scripts: Drop update of public address configuration from config.tdb

This isn't used or documented anywhere.

2 differing points of view:

* This is a very good idea but it should probably be generalised to
  cover more configuration items.  This would end up like the Samba
  registry configuration and would use a tool to support setting
  configuration values.

* If people really want to update configuration while a node is down
  then they should fix the configuration before bringing up that node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Short circuit takeover run if no nodes are RUNNING
Martin Schwenke [Fri, 19 Dec 2014 04:08:40 +0000 (15:08 +1100)]
ctdb-recoverd: Short circuit takeover run if no nodes are RUNNING

If all nodes are still in, say, FIRST_RECOVERY runstate, then the logs
contain unfortunate noise like:

  recoverd:Failed to find node to cover ip 10.0.2.131

This avoids that by adding an early exit that avoids running
takeover_run_core() when there are no nodes in the
CTDB_RUNSTATE_RUNNING.

To support this add the runstate to the ipflags structure.  There are
clearly other ways of hacking this but this seems the simplest.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Remove redundant condition when checking recovery lock
Martin Schwenke [Tue, 31 Mar 2015 02:59:49 +0000 (13:59 +1100)]
ctdb-recoverd: Remove redundant condition when checking recovery lock

It isn't possible to hold the recovery lock without having a lock file
set.

This is part of a goal to generalise the recovery lock mechanism to
just use a helper program, which may use a lock file or may use
something else.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Simplify using TALLOC_FREE()
Martin Schwenke [Tue, 31 Mar 2015 02:59:02 +0000 (13:59 +1100)]
ctdb-recoverd: Simplify using TALLOC_FREE()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Drop redundant condition in election handler
Martin Schwenke [Mon, 30 Mar 2015 11:01:52 +0000 (22:01 +1100)]
ctdb-recoverd: Drop redundant condition in election handler

Election packets from the current node are ignored at the beginning of
the function, so this does not need to be checked.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Remove unused memory context variable
Martin Schwenke [Mon, 30 Mar 2015 10:52:45 +0000 (21:52 +1100)]
ctdb-recoverd: Remove unused memory context variable

It is set, memory is allocated but it is never used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Broadcast IP rellocation request from monitor code
Martin Schwenke [Mon, 30 Mar 2015 09:51:51 +0000 (20:51 +1100)]
ctdb-daemon: Broadcast IP rellocation request from monitor code

No need to just send it to the recovery master.

This reduces the need for main daemon code to know which node is the
recovery master.  The end goal is for the main daemon to not need to
know which node is the recovery master - this information would be
stored in the recovery daemon (and subsequently a separate cluster
management daemon).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Replace unnecessary use of ctdb->recovery_master
Martin Schwenke [Tue, 31 Mar 2015 03:03:43 +0000 (14:03 +1100)]
ctdb-recoverd: Replace unnecessary use of ctdb->recovery_master

Databases are only pulled by the recovery master, so it can compare
with current node PNN.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Rename some local variables to avoid conflict with convention
Martin Schwenke [Sun, 29 Mar 2015 08:20:55 +0000 (19:20 +1100)]
ctdb-recoverd: Rename some local variables to avoid conflict with convention

rec is always a (struct ctdb_recoverd *)

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb_recoverd: Move num_lmasters calculation to near where it is used
Martin Schwenke [Sun, 29 Mar 2015 09:00:17 +0000 (20:00 +1100)]
ctdb_recoverd: Move num_lmasters calculation to near where it is used

Unless this node is the recovery master then this is not needed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Make num_lmasters a local variable
Martin Schwenke [Sun, 29 Mar 2015 06:49:02 +0000 (17:49 +1100)]
ctdb-recoverd: Make num_lmasters a local variable

It isn't used anywhere else and is always re-initialised to 0.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Remove unused struct members num_active and num_connected
Martin Schwenke [Sun, 29 Mar 2015 06:28:57 +0000 (17:28 +1100)]
ctdb-recoverd: Remove unused struct members num_active and num_connected

They are initialised and updated but the values are never used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Test stub for ctdb_get_capabilities()
Martin Schwenke [Tue, 24 Feb 2015 05:11:17 +0000 (16:11 +1100)]
ctdb-tests: Test stub for ctdb_get_capabilities()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Remove unused capabilities field from struct ctdb_node
Martin Schwenke [Thu, 31 Jul 2014 05:28:52 +0000 (15:28 +1000)]
ctdb-daemon: Remove unused capabilities field from struct ctdb_node

Update the ctdb tool test stub code to cope.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-recoverd: Use capabilities API
Martin Schwenke [Thu, 31 Jul 2014 05:26:03 +0000 (15:26 +1000)]
ctdb-recoverd: Use capabilities API

Simplify update_capabilities() using the capabilities API and store
the capabilities in new field rec->caps rather than scattered around
ctdb->nodes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-client: Add API for retrieving and checking capabilities
Martin Schwenke [Thu, 31 Jul 2014 05:06:19 +0000 (15:06 +1000)]
ctdb-client: Add API for retrieving and checking capabilities

ctdb_get_capabilities() gets capabilities from all connected nodes
into an array.  ctdb_get_node_capabilities() gets capabilities for a
particular node from array.  ctdb_node_has_capabilities() returns true
if given node has all of the given capabilities.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agovfs_fruit: comment fix: the options are documented
Ralph Boehme [Wed, 25 Mar 2015 11:56:07 +0000 (12:56 +0100)]
vfs_fruit: comment fix: the options are documented

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): Fri May  8 21:27:45 CEST 2015 on sn-devel-104

4 years agovfs_fruit: add option "nfs_aces" that controls the NFS ACEs stuff
Ralph Boehme [Wed, 25 Mar 2015 14:09:02 +0000 (15:09 +0100)]
vfs_fruit: add option "nfs_aces" that controls the NFS ACEs stuff

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Offer SMB 3.1.1 by default.
Stefan Metzmacher [Fri, 10 Oct 2014 13:24:55 +0000 (15:24 +0200)]
smbd: Offer SMB 3.1.1 by default.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May  8 15:49:32 CEST 2015 on sn-devel-104

4 years agos3:smb2_negprot: add support for negotiating SMB 3.1.0 and SMB 3.1.1
Stefan Metzmacher [Mon, 13 Oct 2014 09:01:59 +0000 (11:01 +0200)]
s3:smb2_negprot: add support for negotiating SMB 3.1.0 and SMB 3.1.1

Note: SMB 3.1.0 was used in a early preview versions of Windows 10.
Was later superseded by 3.1.1.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
4 years agos3:smb2_sesssetup.c: For SMB >= 3.1, derive crypto keys from preauth
Stefan Metzmacher [Fri, 10 Oct 2014 12:04:25 +0000 (14:04 +0200)]
s3:smb2_sesssetup.c: For SMB >= 3.1, derive crypto keys from preauth

This protects the full connection setup including
a posteriori verification of the negotiate messages,
by signing the final session setup response with a signing key
derived from the preauth hash and the authentication session key.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
4 years agos3:smb2_negprot.c: add support SMB 3.1 negotiate contexts
Michael Adam [Wed, 8 Oct 2014 17:25:15 +0000 (19:25 +0200)]
s3:smb2_negprot.c: add support SMB 3.1 negotiate contexts

Used for:
- preauthentication validation
- negotiation of ciphers for sigingn and encryprtion

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>