VERSION: Bump version number up to 4.0.7...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
s3-rpc_server: Ensure we are root when starting and usiing gensec

This fixes bug 9465.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 10f6926aaa6a8c49b29e183d12f6f767072ecff7)
s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST

/var/lock/samba is typically on tpmfs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 821171e422133d64e7c07b4d610984c33cd23244)

Fix bug #9805 - s3:lib/server_mutex: open mutex.tdb with CLEAR_IF_FIRST.
winbind/idmap_ad: be verbose about the user that we fail to map

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f08205be7003f6c0a15fd5fd99d01951164ad15c)
docs: mention AD prerequirements for using idmap_ad

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit c3057f69a274f0d8e0e66183bd5e8be7703b6750)

The last 2 patches address bug #9880 - Use of wrong RFC2307 primary group
field.
More generic check for OpenBSD platform

OpenBSD versioning is different from many other
projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the
right approach will be to check that platform name starts with "openbsd"
instead. This is also the thing OpenBSD developers do when patching other
software, so this patch is consistent with already existing practicies.

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

Reviewed-by: Lars Müller <lars@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104
(cherry picked from commit 2fda6c47f4aa46dbb42028732207a94821881c67)
dns: Add support for MX queries

Due to an oversight, the internal DNS server supports MX record updates,
but not MX record queries. Add support for MX queries and tests.

This should fix bug #9485

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon May 27 15:46:22 CEST 2013 on sn-devel-104
docs: Remove out of date and unmaintained Speed page from the HOWTO

Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit fa8e760882ea389f8c94d6dfdc7386b0295974d1)
docs: Remove TOSHARG-HighAvailability which is made obsolete by CTDB

This is mostly a lament on why this is hard, and while CTDB is still
hard, this document tries to imply it is almost impossible, and makes
no mention of the solution.

Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f632150e1b5a8d8a32753f43f7433b392f3a2136)
docs: Fix small errors in TOSHARG-Compiling

Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e896f3c5bf5dee3c771985cd9dd2eb376481c22b)
docs: Remove all references to testprns

Based on debian patch documentation2.patch by Christian Perrier <bubulle@debian.org>.

This tool no longer exists in Samba.

Andrew Bartlett

Reviewed-by: Kai Blin <kai@samba.org>
(cherry picked from commit 4ae3cdcd7151237a858f668357d08ab6916bdb3b)

The last 4 patches address bug #9906 - Doc fixes for 4.0.
lib/replace: Set BROKEN_STRNLEN and BROKEN_STRNDUP on all AIX

The background is in https://bugzilla.samba.org/show_bug.cgi?id=1097
and wider reports are at
http://stackoverflow.com/questions/2091460/strndup-call-is-currupting-stack-frames

Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 23 03:52:10 CEST 2013 on sn-devel-104
(cherry picked from commit 9ddfd7d8784e6f546628f48990b69ee2850be52d)
build: Rework BSD_STYLE_STATVFS check to match autoconf build

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit 2a4eaa3241fc4ccb79359ea4e4d511754a84d46b)
build: Do not set PATH in install_with_python now we set $PYTHON

This will ensure that the scripts get rewritten to use this specific python, as it
will not be found in the path by the waf scripts.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 20445415307ae3d6524995d0128862dcbc119684)
build: Blacklist the release-4-0-0 provision as well

This reduces the size of the published tarball while ensuring we test with it
during autobuild.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 768c3bb16ae8aac2d96d4fa0d8a7593fc9be6ca8)
build: Install smbtar in waf build

Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 27 12:55:05 CEST 2013 on sn-devel-104
(cherry picked from commit 1754b52204563a722920805b76e6c571d0268434)

The last 5 patches address bug #9907 - build fixes for 4.0 found during autoconf
or debian packaging work.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed May 29 13:38:55 CEST 2013 on sn-devel-104
build: Add missing new line to replaced python shebang line. (Fix bug #9909)

When configuring with a non-standard python specified in
the PYTHON environment variable, the shebang lines in various
python tools like samba-tool and samba_dnsupdate get replaced.

This replace line for the shebang was missing a newline
which joined the shebang line with the following line,
rendereing those scripts with a nonempty second line unusuable,
for example samba_dnsupdate.

This patch fixes this bug which is bug #9909 on bugzilla.

Pair-Programmed-With: Karolin Seeger <kseeger@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed May 29 13:21:51 CEST 2013 on sn-devel-104
(cherry picked from commit 3f24d694e7e2190d30a17bc13a79a36b49711531)
waf: add --with[out]-pie configure arguments

The arguments do not currently have any effect.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
waf: build position independent executables

This patch re-instates support for building Position Independent
Executables using the '-fPIE' and '-pie' compiler and linker flags
respectively.

PIE builds are enabled by default, and can be explicitly disabled using
the '--without-pie' configure argument.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 28 02:56:36 CEST 2013 on sn-devel-104
waf: build PIEs if supported by the compiler

Currently waf performs a mandatory check for compiler PIE support,
unless --without-pie is specified.
This change makes Waf only perform the mandatory check if --with-pie is
specified. If neither --with-pie nor --without-pie are specified, then
PIEs are only built if compiler support is available.

Signed-off-by: David Disseldorp <ddiss@samba.org>

The last 3 patches address bug #9910 - PIE builds not supported.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu May 30 11:37:47 CEST 2013 on sn-devel-104