dmulder/samba-autobuild/.git
8 years agoVERSION: Release Samba 4.3.0rc3 samba-4.3.0rc3
Stefan Metzmacher [Tue, 18 Aug 2015 10:30:59 +0000 (12:30 +0200)]
VERSION: Release Samba 4.3.0rc3

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: Update release notes for Samba 4.3.0rc3
Stefan Metzmacher [Tue, 18 Aug 2015 10:27:47 +0000 (12:27 +0200)]
WHATSNEW: Update release notes for Samba 4.3.0rc3

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agoctdb-daemon: Correctly process the exit code from failed eventscripts
Amitay Isaacs [Tue, 21 Jul 2015 06:37:04 +0000 (16:37 +1000)]
ctdb-daemon: Correctly process the exit code from failed eventscripts

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jul 22 15:03:53 CEST 2015 on sn-devel-104

(cherry picked from commit 00ec3c477eba50206801b451ae4eb64c12aba5db)

Autobuild-User(v4-3-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-3-test): Tue Aug 18 10:55:54 CEST 2015 on sn-devel-104

8 years agoctdb-tool: Correctly print timed out event scripts output
Amitay Isaacs [Mon, 20 Jul 2015 06:37:58 +0000 (16:37 +1000)]
ctdb-tool: Correctly print timed out event scripts output

The timed out error is ignored for certain events (start_recovery,
recoverd, takeip, releaseip).  If these events time out, then the debug
hung script outputs the following:

 3 scripts were executed last releaseip cycle
 00.ctdb              Status:OK    Duration:4.381 Thu Jul 16 23:45:24 2015
 01.reclock           Status:OK    Duration:13.422 Thu Jul 16 23:45:28 2015
 10.external          Status:DISABLED
 10.interface         Status:OK    Duration:-1437083142.208 Thu Jul 16 23:45:42 2015

The endtime for timed out scripts is not set.  Since the status is not
returned as -ETIME for some events, ctdb scriptstatus prints -ve duration.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 71b89b2b7a9768de437347e6678370b2682da892)

8 years agos3:lib: fix some corner cases of open_socket_out_cleanup()
Stefan Metzmacher [Fri, 14 Aug 2015 10:54:00 +0000 (12:54 +0200)]
s3:lib: fix some corner cases of open_socket_out_cleanup()

In case of timeouts we retry the async_connect_send() and forgot
to remember it, this results in an abort() in async_connect_cleanup()
as the fd is already closed when calling fcntl(F_SETFL).

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

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

Autobuild-User(v4-3-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-3-test): Tue Aug 18 01:35:44 CEST 2015 on sn-devel-104

8 years agos3:smb2_negprot: prefer AES128_CCM if the client supports it
Stefan Metzmacher [Mon, 17 Aug 2015 06:56:43 +0000 (08:56 +0200)]
s3:smb2_negprot: prefer AES128_CCM if the client supports it

Callgrind showed that we use 28,165,720,719 cpu cycles to send
a 100MB file to a client using aes-ccm.

With aes-gcm this is raises up to 723,094,413,831 cpu cycles.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit bd0ec51cfca2b3baed60d304125079c74815073a)

8 years agolibcli/smb: prefer AES128_CCM
Stefan Metzmacher [Mon, 17 Aug 2015 06:56:43 +0000 (08:56 +0200)]
libcli/smb: prefer AES128_CCM

Callgrind showed that we use 28,165,720,719 cpu cycles to send
a 100MB file to a client using aes-ccm.

With aes-gcm this is raises up to 723,094,413,831 cpu cycles.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 05dbd3b47a728acada971b545df458ae0e082ec5)

8 years agorelease-scripts/build-manpages-nogit: run make realdistclean at the end
Stefan Metzmacher [Sat, 15 Aug 2015 08:59:45 +0000 (10:59 +0200)]
release-scripts/build-manpages-nogit: run make realdistclean at the end

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit b2986dcb1dca6b3c46beb8c003aede18874c813c)

8 years agoRevert "ldb-samba: Implement transitive extended matching"
Andrew Bartlett [Mon, 17 Aug 2015 04:03:10 +0000 (16:03 +1200)]
Revert "ldb-samba: Implement transitive extended matching"

This reverts commit 2a22ba34cd6f28950246b54c6577c922c61f4fdb.

selftest/knownfail entries are added to ensure 'make test' continues to pass

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit dc2d5ccd56ff8c59f3686a652ec3082069914bb4)

8 years agoRevert "dsdb: Only parse SAMBA_LDAP_MATCH_RULE_TRANSITIVE_EVAL as a DN"
Andrew Bartlett [Mon, 17 Aug 2015 04:09:35 +0000 (16:09 +1200)]
Revert "dsdb: Only parse SAMBA_LDAP_MATCH_RULE_TRANSITIVE_EVAL as a DN"

This reverts commit 1a012d591bca727b5cabacf6455d2009afb16bd7.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 8cacd5b8113fa30fb4ccaaf3193839660feb285f)

8 years agoctdb-pmda: Add missing prototype declaration for non-static function
Amitay Isaacs [Mon, 3 Aug 2015 05:36:06 +0000 (15:36 +1000)]
ctdb-pmda: Add missing prototype declaration for non-static function

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 6538ba5243a043bc727039a16a7a9d5d8027fa06)

Autobuild-User(v4-3-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-3-test): Mon Aug 17 21:14:21 CEST 2015 on sn-devel-104

8 years agoctdb-daemon: Check if updates are in flight when releasing all IPs
Martin Schwenke [Fri, 24 Jul 2015 05:32:42 +0000 (15:32 +1000)]
ctdb-daemon: Check if updates are in flight when releasing all IPs

Some code involved in releasing IPs is not re-entrant.  Memory
corruption can occur if, for example, overlapping attempts are made to
ban a node.  We haven't been able to recreate the corruption but this
should protect against it.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 952a50485f68b3cffdf57da84aa9bb9fde630b7e)

8 years agoctdb-banning: If node is already banned, do not run ctdb_local_node_got_banned()
Amitay Isaacs [Mon, 27 Jul 2015 06:51:08 +0000 (16:51 +1000)]
ctdb-banning: If node is already banned, do not run ctdb_local_node_got_banned()

This calls release_all_ips() only once on the first ban.  If the node gets
banned again due to event script timeout while running release_all_ips(),
then avoid calling release_all_ips() in re-entrant fashion.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 8eb04d09b119e234c88150e1dc35fc5057f9c926)

8 years agos3-net: use talloc array in share allowedusers
Ralph Boehme [Tue, 4 Aug 2015 09:18:34 +0000 (11:18 +0200)]
s3-net: use talloc array in share allowedusers

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug  4 16:48:36 CEST 2015 on sn-devel-104

(cherry picked from commit 95eb6db580678a29b1f5f30a9567ea449a43d75a)

8 years agos4:torture:vfs_fruit: add a test for stream names
Ralph Boehme [Sun, 10 May 2015 09:58:32 +0000 (11:58 +0200)]
s4:torture:vfs_fruit: add a test for stream names

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 7258061e5e9cd4b68f1c010c3667c3fd2b0663cc)

8 years agos4:torture:vfs_fruit: pass xattr name as arg to torture_setup_local_xattr()
Ralph Boehme [Thu, 6 Aug 2015 11:48:54 +0000 (13:48 +0200)]
s4:torture:vfs_fruit: pass xattr name as arg to torture_setup_local_xattr()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit fe4909f1cab72f80715a996a63290462102aabc6)

8 years agovfs_catia: run translation on stream names
Ralph Boehme [Sat, 9 May 2015 13:12:41 +0000 (15:12 +0200)]
vfs_catia: run translation on stream names

With vfs_fruit option "fruit:encoding = native" we're already converting
stream names that contain illegal NTFS characters from their on-the-wire
Unicode Private Range encoding to their native ASCII representation.

Unfortunately the reverse mapping for stream names was not perfomed.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 1db11998bf1b0eef5f543377700b03ab8739338d)

8 years agovfs_streams_xattr: stream names may contain colons
Ralph Boehme [Sat, 9 May 2015 13:02:03 +0000 (15:02 +0200)]
vfs_streams_xattr: stream names may contain colons

With vfs_fruit option "fruit:encoding = native" we're already converting
stream names that contain illegal NTFS characters from their on-the-wire
Unicode Private Range encoding to their native ASCII representation.

As as result the name of xattrs storing the streams (via
vfs_streams_xattr) may contain a colon, so we have to use strrchr_m()
instead of strchr_m() for matching the stream type suffix.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit fb9a64ea37dd4b0cd754fe6d421417a4c8ccbc57)

8 years agopython:samba/upgrade.py Fix format string syntax in error condition
Andrew Bartlett [Fri, 14 Aug 2015 04:43:41 +0000 (16:43 +1200)]
python:samba/upgrade.py Fix format string syntax in error condition

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11436
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Aug 14 10:52:39 CEST 2015 on sn-devel-104

(cherry picked from commit a431828460a8b069589662ad87e47c61c020eb9c)

8 years agos4:rpc_server/netlogon: Fix for NetApp
Arvid Requate [Thu, 6 Aug 2015 13:00:25 +0000 (15:00 +0200)]
s4:rpc_server/netlogon: Fix for NetApp

This patch fixes an issue where NetApp filers joined to a
Samba/ADDC cannot resolve SIDs. Without this patch the issue
can only be avoided by setting "allow nt4 crypto = yes" in smb.conf.

The issue is triggered by NetApp filers in three steps:

1. The client calls netr_ServerReqChallenge to set up challenge tokens

2. Next it calls netr_ServerAuthenticate2 with NETLOGON_NEG_STRONG_KEYS
   set to 0. Native AD and Samba respond to this with
   NT_STATUS_DOWNGRADE_DETECTED. At this point Samba throws away
   the challenge token negotiated in the first step.

3. Next the client calls netr_ServerAuthenticate2 again, this time with
   NETLOGON_NEG_STRONG_KEYS set to 1.
   Samba returns NT_STATUS_ACCESS_DENIED as it has lost track
   of the challenge and denies logon with the message

   No challenge requested by client [CLNT1/CLNT1$], cannot authenticate

Git commit 321ebc99b5a00f82265aee741a48aa84b214d6e8 introduced
a workaround for a different but related issue. This patch makes a minor
adjustment to that commit to delay flushing the cached challenge until
it's clear that we are not in a NT_STATUS_DOWNGRADE_DETECTED
situation.

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

Signed-off-by: Arvid Requate <requate@univention.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug  6 20:29:04 CEST 2015 on sn-devel-104

(cherry picked from commit d3ac3da98611e665dc0f4e825faa5f12f6c848ef)

8 years agoWHATSNEW: Add description of improved cross-compilation support
Uri Simchoni [Mon, 10 Aug 2015 09:37:09 +0000 (12:37 +0300)]
WHATSNEW: Add description of improved cross-compilation support

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: Document CTDB logging and NFS changes
Martin Schwenke [Mon, 10 Aug 2015 04:27:01 +0000 (14:27 +1000)]
WHATSNEW: Document CTDB logging and NFS changes

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: add a section about samba-tool fsmo
Rowland Penny [Wed, 5 Aug 2015 09:36:33 +0000 (10:36 +0100)]
WHATSNEW: add a section about samba-tool fsmo

Signed-off-by: Rowland Penny <repenny241155@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoscript/librelease.sh: this is replaced by script/release.sh now
Stefan Metzmacher [Wed, 5 Aug 2015 13:41:29 +0000 (15:41 +0200)]
script/librelease.sh: this is replaced by script/release.sh now

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  6 03:49:40 CEST 2015 on sn-devel-104

(cherry picked from commit 54cbecbe306eff1c36db5c98fdd106aeccdf096e)

8 years agoscript/release.sh: This is a new script to do releases
Stefan Metzmacher [Tue, 4 Aug 2015 09:33:26 +0000 (11:33 +0200)]
script/release.sh: This is a new script to do releases

This will replace script/librelease.sh and is more flexible
and powerful.

  Usage: release.sh <PRODUCT> <COMMAND>

  PRODUCT: ldb, talloc, tevent, tdb, samba-rc
  COMMAND: fullrelease, create, push, upload, announce

GNUPGHOME=/path/to/private/gpg script/librelease.sh tdb
becomes
GNUPGHOME=/path/to/private/gpg script/release.sh tdb fullrelease

GNUPGHOME=/path/to/private/gpg script/librelease.sh samba
becomes
GNUPGHOME=/path/to/private/gpg script/release.sh samba-rc create
or later
GNUPGHOME=/path/to/private/gpg script/release.sh samba-stable create

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 71128e0a3ceaec43824bc72e0c64d5ce415869a2)

8 years agoWHATSNEW: fix version numbers
Stefan Metzmacher [Wed, 5 Aug 2015 13:11:10 +0000 (15:11 +0200)]
WHATSNEW: fix version numbers

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: Prepare release notes for Samba 4.3.0rc3
Stefan Metzmacher [Tue, 4 Aug 2015 08:27:18 +0000 (10:27 +0200)]
WHATSNEW: Prepare release notes for Samba 4.3.0rc3

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoVERSION: Bump version up to 4.3.0rc3...
Stefan Metzmacher [Tue, 4 Aug 2015 08:21:20 +0000 (10:21 +0200)]
VERSION: Bump version up to 4.3.0rc3...

...and re-enable git snapshots.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoVERSION: Release Samba 4.3.0rc2 samba-4.3.0rc2
Stefan Metzmacher [Tue, 4 Aug 2015 08:20:43 +0000 (10:20 +0200)]
VERSION: Release Samba 4.3.0rc2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: Prepare release notes for Samba 4.3.0rc2
Stefan Metzmacher [Mon, 3 Aug 2015 12:14:40 +0000 (14:14 +0200)]
WHATSNEW: Prepare release notes for Samba 4.3.0rc2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(v4-3-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-3-test): Tue Aug  4 10:38:56 CEST 2015 on sn-devel-104

8 years agotdb: Fix broken build with --disable-python
Martin Schwenke [Wed, 22 Jul 2015 23:47:24 +0000 (09:47 +1000)]
tdb: Fix broken build with --disable-python

With --disable-python, we should not install any python files.

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

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): Thu Jul 23 18:50:25 CEST 2015 on sn-devel-104

(cherry picked from commit 509c37da1300b843e089dfcd6657e68fa8c8c746)

8 years agos3-passdb: Respect LOOKUP_NAME_GROUP flag in sid lookup.
Justin Maggard [Tue, 21 Jul 2015 22:17:30 +0000 (15:17 -0700)]
s3-passdb: Respect LOOKUP_NAME_GROUP flag in sid lookup.

Somewhere along the line, a config line like "valid users = @foo"
broke when "foo" also exists as a user.

user_ok_token() already does the right thing by adding the LOOKUP_NAME_GROUP
flag; but lookup_name() was not respecting that flag, and went ahead and looked
for users anyway.

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

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 28 21:35:58 CEST 2015 on sn-devel-104

(cherry picked from commit dc99d451bf23668d73878847219682fced547622)

8 years agolib: replace: Add strsep function (missing on Solaris).
Jeremy Allison [Wed, 15 Jul 2015 17:43:56 +0000 (10:43 -0700)]
lib: replace: Add strsep function (missing on Solaris).

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@wakeful.net>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 29 02:24:55 CEST 2015 on sn-devel-104

(cherry picked from commit f07b746ad3f3ee2fcbb65a0d452ed80f07c9e8f9)

8 years agos3:wscript: fix indentation
Björn Baumbach [Mon, 27 Jul 2015 11:20:43 +0000 (13:20 +0200)]
s3:wscript: fix indentation

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit cef8897f45f1b231d26342688542560bbe695276)

8 years agobuild: fix build with gpfs support - add missing dependency to samba-debug
Björn Baumbach [Mon, 27 Jul 2015 13:15:07 +0000 (15:15 +0200)]
build: fix build with gpfs support - add missing dependency to samba-debug

Fix for bug #11421 part 2.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11421

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jul 29 13:38:59 CEST 2015 on sn-devel-104

(cherry picked from commit d57e4ac3de5f53346a8d7c3f96825c1345b58f6a)

8 years agoconfigure: add --with-gpfs option for selecting directory with gpfs headers
Björn Baumbach [Mon, 27 Jul 2015 10:14:37 +0000 (12:14 +0200)]
configure: add --with-gpfs option for selecting directory with gpfs headers

Fix for bug #11421 part 1.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11421

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit b9bef361d95daf0f38363acbdec9c23f094ffaca)

8 years agoWHATSNEW: a note about TLS protocol support
Douglas Bagnall [Thu, 23 Jul 2015 05:27:52 +0000 (17:27 +1200)]
WHATSNEW: a note about TLS protocol support

It's a small thing but apparently much requested.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: add a section about samba_kcc
Douglas Bagnall [Thu, 23 Jul 2015 05:14:00 +0000 (17:14 +1200)]
WHATSNEW: add a section about samba_kcc

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoVERSION: Bump version up to 4.3.0rc2...
Stefan Metzmacher [Tue, 21 Jul 2015 11:56:42 +0000 (13:56 +0200)]
VERSION: Bump version up to 4.3.0rc2...

...and re-enable git snapshots.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoVERSION: Release Samba 4.3.0rc1 samba-4.3.0rc1
Stefan Metzmacher [Tue, 21 Jul 2015 11:56:23 +0000 (13:56 +0200)]
VERSION: Release Samba 4.3.0rc1

Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agoWHATSNEW: Start release notes for Samba 4.3.0rc1.
Stefan Metzmacher [Tue, 21 Jul 2015 09:38:18 +0000 (11:38 +0200)]
WHATSNEW: Start release notes for Samba 4.3.0rc1.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>
8 years agoldb: version 1.1.21 ldb-1.1.21
Stefan Metzmacher [Tue, 21 Jul 2015 11:55:24 +0000 (13:55 +0200)]
ldb: version 1.1.21

* build fixes
* improved python bindings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agotdb: version 1.3.7 tdb-1.3.7
Stefan Metzmacher [Tue, 21 Jul 2015 11:51:21 +0000 (13:51 +0200)]
tdb: version 1.3.7

* first fix deadlock in the interaction between fcntl and mutex locking
  (bug #11381)
* improved python3 bindings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agotalloc: version 2.1.3 talloc-2.1.3
Stefan Metzmacher [Tue, 21 Jul 2015 11:49:07 +0000 (13:49 +0200)]
talloc: version 2.1.3

* improved python3 bindings
* documentation fixes regarding talloc_reference() and talloc_unlink()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agotestsuite/headers: remove unused checks for ntdb.h
Stefan Metzmacher [Tue, 21 Jul 2015 07:24:42 +0000 (09:24 +0200)]
testsuite/headers: remove unused checks for ntdb.h

ntdb is already removed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
8 years agotdb python binding: raise KeyError(key) when the key doesn't exist
Aurelien Aptel [Thu, 16 Jul 2015 14:55:28 +0000 (16:55 +0200)]
tdb python binding: raise KeyError(key) when the key doesn't exist

This change makes tdb dicts more consistent with Python dicts.

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

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agopytdb: Add tests for text interface
Petr Viktorin [Wed, 17 Jun 2015 11:02:27 +0000 (13:02 +0200)]
pytdb: Add tests for text interface

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agopyldb: Add a text-based interface for Python 3
Petr Viktorin [Thu, 18 Jun 2015 11:43:27 +0000 (13:43 +0200)]
pyldb: Add a text-based interface for Python 3

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agopytdb: Use new dict API on Python 3
Petr Viktorin [Fri, 22 May 2015 15:57:07 +0000 (17:57 +0200)]
pytdb: Use new dict API on Python 3

- Remove has_key() method, add a fast "in" operator
- Rename iterkeys() to keys()

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agopytdb: Build for two versions of Python at once
Petr Viktorin [Fri, 22 May 2015 15:12:37 +0000 (17:12 +0200)]
pytdb: Build for two versions of Python at once

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agopytdb: Port to Python 3
Petr Viktorin [Fri, 22 May 2015 15:10:34 +0000 (17:10 +0200)]
pytdb: Port to Python 3

- Use bytes for all data, text strings for repr()
- Use PyLong instead of PyInt on py3
- Use new module initialization
- Update tests
- Run tests in "make test"

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agopytdb: Allow nextkey() to be called
Petr Viktorin [Thu, 18 Jun 2015 10:35:49 +0000 (12:35 +0200)]
pytdb: Allow nextkey() to be called

nextkey() was defined to take no arguments but expected one.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agobuildtools: Fix crash on invalid --extra-python option
Petr Viktorin [Tue, 2 Jun 2015 11:27:21 +0000 (13:27 +0200)]
buildtools: Fix crash on invalid --extra-python option

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agobuildtools: Don't configure Python more than once
Petr Viktorin [Mon, 8 Jun 2015 17:02:03 +0000 (19:02 +0200)]
buildtools: Don't configure Python more than once

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-auth: Make sure error_string is correctly initialized
Andreas Schneider [Mon, 20 Jul 2015 13:07:29 +0000 (15:07 +0200)]
s4-auth: Make sure error_string is correctly initialized

This should avoid a possible double free.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc_kpasswd: split out some code to a KPASSWD_GLUE subsystem.
Günther Deschner [Tue, 5 Aug 2014 15:49:55 +0000 (17:49 +0200)]
s4-kdc_kpasswd: split out some code to a KPASSWD_GLUE subsystem.

This can then be easier shared with MIT's kadmin services for kpasswd services.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc: move kdc_check_pac() to a new subsystem KDC-GLUE.
Günther Deschner [Mon, 12 May 2014 08:21:18 +0000 (10:21 +0200)]
s4-kdc: move kdc_check_pac() to a new subsystem KDC-GLUE.

This subsystem should be used to provide shared code between the s4 heimdal kdc
and the s4 heimdal wdc plugin.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc: only use a void* in samba_kdc_entry instead of hdb_entry_ex.
Günther Deschner [Fri, 9 May 2014 22:05:23 +0000 (00:05 +0200)]
s4-kdc: only use a void* in samba_kdc_entry instead of hdb_entry_ex.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc/pac_glue: remove old samba_kdc_build_edata_reply().
Günther Deschner [Thu, 8 May 2014 15:06:42 +0000 (17:06 +0200)]
s4-kdc/pac_glue: remove old samba_kdc_build_edata_reply().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc/mit_samba: add a copy of samba_kdc_build_edata_reply for MIT.
Günther Deschner [Thu, 15 May 2014 14:43:59 +0000 (16:43 +0200)]
s4-kdc/mit_samba: add a copy of samba_kdc_build_edata_reply for MIT.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc/wdc-samba4: add a copy of samba_kdc_build_edata_reply for Heimdal.
Günther Deschner [Thu, 15 May 2014 07:13:06 +0000 (09:13 +0200)]
s4-kdc/wdc-samba4: add a copy of samba_kdc_build_edata_reply for Heimdal.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agowaf: Make mit_samba a subsystem and do not build with Heimdal
Andreas Schneider [Fri, 25 Apr 2014 09:55:17 +0000 (11:55 +0200)]
waf: Make mit_samba a subsystem and do not build with Heimdal

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc: Fix a casting warning
Andreas Schneider [Thu, 16 Apr 2015 10:57:35 +0000 (12:57 +0200)]
s4-kdc: Fix a casting warning

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agos4-kdc: Fix a typo
Andreas Schneider [Thu, 16 Apr 2015 10:57:14 +0000 (12:57 +0200)]
s4-kdc: Fix a typo

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
8 years agopdb_tdb: Use fstr_sprintf
Volker Lendecke [Tue, 21 Jul 2015 08:36:09 +0000 (10:36 +0200)]
pdb_tdb: Use fstr_sprintf

Saves 160 bytes of .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
8 years agoctdb-daemon: Ignore SIGUSR1
Martin Schwenke [Tue, 21 Jul 2015 02:23:27 +0000 (12:23 +1000)]
ctdb-daemon: Ignore SIGUSR1

No use dying or failing eventscripts if someone sends a random
SIGUSR1.

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): Tue Jul 21 11:00:17 CEST 2015 on sn-devel-104

8 years agoctdb-scripts: Move 60.nfs Ganesha callout to doc/examples/
Martin Schwenke [Sun, 19 Jul 2015 11:23:44 +0000 (21:23 +1000)]
ctdb-scripts: Move 60.nfs Ganesha callout to doc/examples/

We don't expect to maintain an up-to-date copy.  NFS Ganesha team
might provide patches.

Also move the Ganesha .check file

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-scripts: Support RPC checks for tcp6 and udp6
Martin Schwenke [Wed, 15 Jul 2015 10:15:46 +0000 (20:15 +1000)]
ctdb-scripts: Support RPC checks for tcp6 and udp6

This adds new configuration variable CTDB_RPCINFO_LOCALHOST6.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoUse uintptr_t for pointer int cast in SMBC_getdents_ctx()
Douglas Bagnall [Tue, 30 Jun 2015 22:41:34 +0000 (10:41 +1200)]
Use uintptr_t for pointer int cast in SMBC_getdents_ctx()

On i386, unsigned long long is 64 bit while the pointer is 32, and
this fails under autobuild with -WError.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-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 Jul 21 05:14:20 CEST 2015 on sn-devel-104

8 years agodbwrap_rbt: Make "key" and "value" aligned to 16 byte
Volker Lendecke [Sat, 18 Jul 2015 19:50:55 +0000 (21:50 +0200)]
dbwrap_rbt: Make "key" and "value" aligned to 16 byte

Reported by Uri Simchoni <urisimchoni@gmail.com>. Thanks!

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul 20 23:18:23 CEST 2015 on sn-devel-104

8 years agodoc: Fix documentation for "ctdb timeout" parameter
Martin Schwenke [Fri, 17 Jul 2015 09:51:59 +0000 (19:51 +1000)]
doc: Fix documentation for "ctdb timeout" parameter

The documentation claims this is specified in seconds.  However, it is
passed straight through to poll(2), which takes a timeout in
milliseconds.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jul 20 15:47:43 CEST 2015 on sn-devel-104

8 years agoselftest: Add knownfail entry required to disable tombstone_reanimation
Andrew Bartlett [Mon, 20 Jul 2015 01:23:30 +0000 (13:23 +1200)]
selftest: Add knownfail entry required to disable tombstone_reanimation

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jul 20 09:21:33 CEST 2015 on sn-devel-104

8 years agodsdb: Disable tombstone_reanimation module until we isolate what causes flaky tests
Kamen Mazdrashki [Sat, 30 May 2015 23:10:34 +0000 (02:10 +0300)]
dsdb: Disable tombstone_reanimation module until we isolate what causes flaky tests

Change-Id: I323a2cd5eb2449a44a9cb53abab5a127d21c5967
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agodocs: Bump version up to 4.3.
Karolin Seeger [Sun, 19 Jul 2015 19:22:45 +0000 (21:22 +0200)]
docs: Bump version up to 4.3.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jul 20 06:11:53 CEST 2015 on sn-devel-104

8 years agolib/tls: Change default supported TLS versions.
Andrew Bartlett [Sun, 19 Jul 2015 23:46:36 +0000 (11:46 +1200)]
lib/tls: Change default supported TLS versions.

The new default is to disable SSLv3, as this is no longer considered
secure after CVE-2014-3566.  Newer GnuTLS versions already disable SSLv3.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
8 years agolib/tls: Add new 'tls priority' option
Andrew Bartlett [Sun, 19 Jul 2015 23:22:46 +0000 (11:22 +1200)]
lib/tls: Add new 'tls priority' option

This adds a new option to the smb.conf to allow administrators to disable
TLS protocols in GnuTLS without changing the code.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11076
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
8 years agoRemove support for OpenPGP certificates in our TLS client and server
Andrew Bartlett [Sun, 19 Jul 2015 22:37:21 +0000 (10:37 +1200)]
Remove support for OpenPGP certificates in our TLS client and server

We do not provide parameters to configure these, and OpenPGP for TLS (RFC 6091) is not used in AD

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
8 years agoselftest: Add test for the dfree command
Andreas Schneider [Tue, 14 Jul 2015 14:30:35 +0000 (16:30 +0200)]
selftest: Add test for the dfree command

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jul 17 22:09:34 CEST 2015 on sn-devel-104

8 years agos3-smbd: Remove the global dfree_broken variable
Andreas Schneider [Fri, 17 Jul 2015 07:37:52 +0000 (09:37 +0200)]
s3-smbd: Remove the global dfree_broken variable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
8 years agos3-smbd: Leave sys_disk_free() if dfree command is used
Andreas Schneider [Fri, 17 Jul 2015 07:35:11 +0000 (09:35 +0200)]
s3-smbd: Leave sys_disk_free() if dfree command is used

If we have a broken system which reports incorrect sizes we provide the
'dfree command'. This command makes sure Samba gets the correct values.
However after that we call the quota command which then reports the
broken values. The dfree command should take care to provide the correct
values and in case of quota's it should also calculate the quote
correctly.

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

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
8 years agos3:winbindd: initialize dst->primary_gid with (gid_t)-1
Stefan Metzmacher [Thu, 16 Jul 2015 05:12:07 +0000 (07:12 +0200)]
s3:winbindd: initialize dst->primary_gid with (gid_t)-1

We should not leave this uninitialized.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 17 19:06:08 CEST 2015 on sn-devel-104

8 years agos3:winbindd: initialize acct_desc fields in rpc_enum_{dom,local}_groups()
Stefan Metzmacher [Thu, 16 Jul 2015 05:00:08 +0000 (07:00 +0200)]
s3:winbindd: initialize acct_desc fields in rpc_enum_{dom,local}_groups()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agos3:winbindd: initialize an [in,out] variable in rpc_try_lookup_sids3()
Stefan Metzmacher [Thu, 16 Jul 2015 04:57:50 +0000 (06:57 +0200)]
s3:winbindd: initialize an [in,out] variable in rpc_try_lookup_sids3()

The input value of count is ignored by the server,
but we should not send an uninitialized value.

Found by valgrind.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agos3-auth: Fix a possible null pointer dereference
Andreas Schneider [Fri, 17 Jul 2015 08:54:17 +0000 (10:54 +0200)]
s3-auth: Fix a possible null pointer dereference

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

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): Fri Jul 17 14:04:01 CEST 2015 on sn-devel-104

8 years agos4-kerberos: Make sure we handle kvno's in keytabs correctly
Andreas Schneider [Fri, 17 Jul 2015 07:03:25 +0000 (09:03 +0200)]
s4-kerberos: Make sure we handle kvno's in keytabs correctly

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agotorture: include config.h before any glibc headers
Uri Simchoni [Sun, 12 Jul 2015 06:38:01 +0000 (09:38 +0300)]
torture: include config.h before any glibc headers

config.h may have some flags which affect glibc behavior, e.g.
_FILE_OFFSET_BITS=64. To make sure these flags have the desired
effect, config.h must be included before any glibc header files.

Also remove inclusion of some system files, relying on
replace/system/*.h instead.

This commit does not fix a specific known bug. It changes the code to
comply with coding conventions.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 17 04:41:14 CEST 2015 on sn-devel-104

8 years agofssd: include config.h before any glibc headers
Uri Simchoni [Sun, 12 Jul 2015 06:36:46 +0000 (09:36 +0300)]
fssd: include config.h before any glibc headers

config.h may have some flags which affect glibc behavior, e.g.
_FILE_OFFSET_BITS=64. To make sure these flags have the desired
effect, config.h must be included before any glibc header files.

This commit does not fix a specific known bug. It changes the code to
comply with coding conventions.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
8 years agosource3/lib: include config.h before any glibc headers
Uri Simchoni [Sun, 12 Jul 2015 06:31:52 +0000 (09:31 +0300)]
source3/lib: include config.h before any glibc headers

config.h may have some flags which affect glibc behavior, e.g.
_FILE_OFFSET_BITS=64. To make sure these flags have the desired
effect, config.h must be included before any glibc header files.

This commit does not fix a specific known bug. It changes the code to
comply with coding conventions.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
8 years agolib/util: include config.h before any glibc headers
Uri Simchoni [Sun, 12 Jul 2015 06:30:36 +0000 (09:30 +0300)]
lib/util: include config.h before any glibc headers

config.h may have some flags which affect glibc behavior, e.g.
_FILE_OFFSET_BITS=64. To make sure these flags have the desired
effect, config.h must be included before any glibc header files.

This commit does not fix a specific known bug. It changes the code to
comply with coding conventions.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
8 years agotdbrestore: include config.h before any glibc headers
Uri Simchoni [Sun, 12 Jul 2015 06:29:13 +0000 (09:29 +0300)]
tdbrestore: include config.h before any glibc headers

config.h may have some flags which affect glibc behavior, e.g.
_FILE_OFFSET_BITS=64. To make sure these flags have the desired
effect, config.h must be included before any glibc header files.

This commit does not fix a specific known bug. It changes the code to
comply with coding conventions.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan Metzmacher" <metze@samba.org>
8 years agolibads: disable dns_lookup_realm in auto-generated krb5.conf files
Uri Simchoni [Thu, 2 Jul 2015 17:15:43 +0000 (20:15 +0300)]
libads: disable dns_lookup_realm in auto-generated krb5.conf files

This patch sets dns_lookup_realm=false in samba-generated krb5.conf.

Disabling dns_lookup_realm in krb5.conf is the recommended practice for
Kerberos usage in Active Directory environment. dns_lookup_realm is enabled
by default, at least in Heimdal.

When used by samba, Kerberos libraries operate based on either the system
krb5.conf, or a private krb5.conf generated specifically for the domain by
samba code. In the former case, it's the responsibility of the administrator
to set dns_lookup_realm=false. In the latter case, it's the responsibility
of samba - which is what this patch does.

In many usage scenarios the value of this variable is of no consequence
since samba knows the realm in which it is operating, and knows how to
generate service principal names. However, there are some scenarios
in which samba calls kerberos_get_principal_from_service_hostname(),
and here samba consults the Kerberos libraries and this parameter comes
into play. One primary example is cli_full_connection() function.

Not setting dns_lookup_realm leads to a series of DNS TXT record lookups.
This can be observed by running "net ads join -k -U <user>".

In AD environments, the TXT queries  typically fail quickly, but test setups
or misconfigured DNS may lead to large timeouts (for example, if the domain
is dept.example.com but there's no parent example.com domain and no DNS
zones for example.com). At the very least we want to avoid those lookups
because they are hardly documented and lead to confusion.

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoselftest: Do not lookup the realm with Kerberos
Andreas Schneider [Thu, 9 Jul 2015 08:11:22 +0000 (10:11 +0200)]
selftest: Do not lookup the realm with Kerberos

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-torture: Make the backupkey test as a noop with MIT Kerberos.
Andreas Schneider [Mon, 9 Mar 2015 19:37:45 +0000 (20:37 +0100)]
s4-torture: Make the backupkey test as a noop with MIT Kerberos.

The test is planned but will be skipped in the MIT case this way. We
need to rewrite the test using a proper cryto/tls library.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-waf: Reformat torture_rpc
Andreas Schneider [Wed, 8 Jul 2015 15:03:18 +0000 (17:03 +0200)]
s4-waf: Reformat torture_rpc

This makes it easier to read and see what changed in patches.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-auth: Always pass down the salt principal
Andreas Schneider [Thu, 23 Apr 2015 17:18:32 +0000 (19:18 +0200)]
s4-auth: Always pass down the salt principal

We should always pass down the saltPrincipal to smb_krb5_update_keytab()
function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-auth: Use kerberos util functions in srv_keytab
Andreas Schneider [Fri, 17 Apr 2015 13:54:03 +0000 (15:54 +0200)]
s4-auth: Use kerberos util functions in srv_keytab

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-auth: Add smb_krb5_remove_obsolete_keytab_entries()
Andreas Schneider [Fri, 17 Apr 2015 13:53:41 +0000 (15:53 +0200)]
s4-auth: Add smb_krb5_remove_obsolete_keytab_entries()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-auth: Add smb_krb5_create_principals_array()
Andreas Schneider [Fri, 17 Apr 2015 13:53:06 +0000 (15:53 +0200)]
s4-auth: Add smb_krb5_create_principals_array()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agos4-samdb: Correctly cast data pointer
Andreas Schneider [Thu, 16 Apr 2015 11:00:54 +0000 (13:00 +0200)]
s4-samdb: Correctly cast data pointer

This fixes a signedness warning.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agovfs: Consolidate failure paths in vfswrap_init_asys_ctx
Volker Lendecke [Thu, 16 Jul 2015 13:01:09 +0000 (15:01 +0200)]
vfs: Consolidate failure paths in vfswrap_init_asys_ctx

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): Fri Jul 17 01:35:33 CEST 2015 on sn-devel-104