metze/samba/wip.git
7 years agospoolss: add IDL for spoolss_LogJobInfoForBranchOffice.
Günther Deschner [Tue, 23 Aug 2016 10:28:53 +0000 (12:28 +0200)]
spoolss: add IDL for spoolss_LogJobInfoForBranchOffice.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopidl: in s3 server templates, support default HRESULT error returns.
Günther Deschner [Mon, 7 Apr 2014 13:47:43 +0000 (15:47 +0200)]
pidl: in s3 server templates, support default HRESULT error returns.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-kdc: Move kpasswd_make_pwchange_reply() to a helper file
Andreas Schneider [Wed, 7 Sep 2016 12:57:59 +0000 (14:57 +0200)]
s4-kdc: Move kpasswd_make_pwchange_reply() to a helper file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Sep 11 06:45:00 CEST 2016 on sn-devel-144

7 years agos4-kdc: Move kpasswd_make_error_reply() to a helper file
Andreas Schneider [Wed, 7 Sep 2016 12:47:31 +0000 (14:47 +0200)]
s4-kdc: Move kpasswd_make_error_reply() to a helper file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agokrb5_wrap: Fix smb_krb5_mk_error() with MIT Kerberos
Andreas Schneider [Fri, 2 Sep 2016 09:54:48 +0000 (11:54 +0200)]
krb5_wrap: Fix smb_krb5_mk_error() with MIT Kerberos

The server principal is required, so if not set create an obscure one.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotestprogs: Test only what the Heimdal kpasswd test should test
Andreas Schneider [Tue, 6 Sep 2016 07:31:41 +0000 (09:31 +0200)]
testprogs: Test only what the Heimdal kpasswd test should test

The test_password_settings.sh test does test using different password
settings and is not specific to the kpasswd implementation. This
test tests the kpasswd service.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotestprogs: Make test_passwords.sh a Heimdal kpasswd test
Andreas Schneider [Mon, 5 Sep 2016 13:18:07 +0000 (15:18 +0200)]
testprogs: Make test_passwords.sh a Heimdal kpasswd test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotestprogs: Add a new test_password_settings.sh script
Andreas Schneider [Tue, 6 Sep 2016 06:55:43 +0000 (08:55 +0200)]
testprogs: Add a new test_password_settings.sh script

This test is not Kerberos implementation specific.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotestprogs: Add a common test_smbclient_expect_failure() function
Andreas Schneider [Tue, 6 Sep 2016 06:56:47 +0000 (08:56 +0200)]
testprogs: Add a common test_smbclient_expect_failure() function

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoheimdal: Fix reauthentication after password change
Andreas Schneider [Wed, 7 Sep 2016 15:17:08 +0000 (17:17 +0200)]
heimdal: Fix reauthentication after password change

If the KDC requires a password change kinit will ask after the initial
authentication for a new password. After the password has been changed
it does reauthentication and for that it needs to use the new password
we just set.

It is needed for the a new kpasswd service test.

This is already fixed upstream with:
    911c99375741281adae305f6ec3a3317023eba3e

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbindd: Remove unused enum ent_type
Christof Schmitt [Thu, 8 Sep 2016 18:00:46 +0000 (11:00 -0700)]
winbindd: Remove unused enum ent_type

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Sep 10 18:41:26 CEST 2016 on sn-devel-144

7 years agosmbd: Adjust debug level of "No protocol supported" message
Christof Schmitt [Thu, 8 Sep 2016 21:16:18 +0000 (14:16 -0700)]
smbd: Adjust debug level of "No protocol supported" message

SMB clients only supporting SMB1 connecting to a Samba server that only
accepts SMB protocol versions 2 and 3 can spam the logs with the "No
protocol supported" message. This is useful information for debugging
failed connection attempts, but it should not be in the default log.
Adjust it to NOTICE/3.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agoauth: One const is enough...
Volker Lendecke [Fri, 9 Sep 2016 14:31:55 +0000 (16:31 +0200)]
auth: One const is enough...

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): Fri Sep  9 20:33:10 CEST 2016 on sn-devel-144

7 years agolib: Avoid a few casts
Volker Lendecke [Mon, 25 Jul 2016 15:05:37 +0000 (17:05 +0200)]
lib: Avoid a few casts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep  9 15:55:50 CEST 2016 on sn-devel-144

7 years agonotifyd: Don't trust remote pointers
Volker Lendecke [Thu, 8 Sep 2016 13:18:39 +0000 (15:18 +0200)]
notifyd: Don't trust remote pointers

Not a security hole IMO: Only root can send us messages, that's at least our
assumption.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agonotifyd: Trim down the noncluster case
Volker Lendecke [Thu, 8 Sep 2016 13:23:59 +0000 (15:23 +0200)]
notifyd: Trim down the noncluster case

Without a cluster, notifyd does not have to receive databases

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agonotifyd: Avoid "includes.h"
Volker Lendecke [Thu, 8 Sep 2016 09:44:36 +0000 (11:44 +0200)]
notifyd: Avoid "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agonotifyd: Fix bad comment wording
Volker Lendecke [Thu, 8 Sep 2016 09:44:23 +0000 (11:44 +0200)]
notifyd: Fix bad comment wording

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agogensec_krb5: Do not leak memory of target_principal
Andreas Schneider [Tue, 6 Sep 2016 10:09:47 +0000 (12:09 +0200)]
gensec_krb5: Do not leak memory of target_principal

CID 1372504

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  9 04:20:04 CEST 2016 on sn-devel-144

7 years agoRevert "krb5_wrap: Add MIT implmentation of smb_krb5_keyblock_init_contents()"
Andreas Schneider [Fri, 2 Sep 2016 08:53:41 +0000 (10:53 +0200)]
Revert "krb5_wrap: Add MIT implmentation of smb_krb5_keyblock_init_contents()"

This reverts commit c0e861666911d84f2d78cdab370077d9ac192005.

The krb5_init_keyblock function from MIT allocates the key but we
operate only on the contents.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agodsdb: Do not use free'd memory.
Andreas Schneider [Tue, 6 Sep 2016 09:08:04 +0000 (11:08 +0200)]
dsdb: Do not use free'd memory.

The msg has already been free'd at this point so we need to print the
user_dn which gets assigned to msg->dn.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoutil: Fix the documentation of push_utf8_talloc()
Andreas Schneider [Wed, 7 Sep 2016 13:15:00 +0000 (15:15 +0200)]
util: Fix the documentation of push_utf8_talloc()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agodbcheck: assert uSNChanged values in release-4-5-0-pre1
Garming Sam [Thu, 8 Sep 2016 04:34:51 +0000 (16:34 +1200)]
dbcheck: assert uSNChanged values in release-4-5-0-pre1

This shows that dbcheck doesn't change the replPropertyMetadata when
fixing the links on these objects.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Thu Sep  8 14:39:19 CEST 2016 on sn-devel-144

7 years agotests: Skip a test for reveal internals for passing Windows
Garming Sam [Thu, 8 Sep 2016 03:45:56 +0000 (15:45 +1200)]
tests: Skip a test for reveal internals for passing Windows

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests: Check that USN bumps when modifying a linked attr
Garming Sam [Thu, 8 Sep 2016 05:04:29 +0000 (17:04 +1200)]
tests: Check that USN bumps when modifying a linked attr

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agodbcheck: Make it clearer about temporary output
Garming Sam [Thu, 8 Sep 2016 03:29:35 +0000 (15:29 +1200)]
dbcheck: Make it clearer about temporary output

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotombstone-expunge: Assert than an expunge does not bump the USN
Garming Sam [Thu, 8 Sep 2016 03:27:42 +0000 (15:27 +1200)]
tombstone-expunge: Assert than an expunge does not bump the USN

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests: Assert vanishing links doesn't bump USN
Garming Sam [Thu, 8 Sep 2016 02:40:08 +0000 (14:40 +1200)]
tests: Assert vanishing links doesn't bump USN

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agorpmd: Skip bump of USN when vanishing forward links
Garming Sam [Thu, 8 Sep 2016 02:40:40 +0000 (14:40 +1200)]
rpmd: Skip bump of USN when vanishing forward links

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agorpmd: Add a TODO regarding the additional work performed
Garming Sam [Thu, 8 Sep 2016 02:46:06 +0000 (14:46 +1200)]
rpmd: Add a TODO regarding the additional work performed

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agorpmd: Remove the seq_num check for skipping additional work
Garming Sam [Thu, 8 Sep 2016 02:42:01 +0000 (14:42 +1200)]
rpmd: Remove the seq_num check for skipping additional work

We will need this in a later patch.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agorpmd: Add the ldb error string to a debug
Garming Sam [Thu, 8 Sep 2016 02:46:38 +0000 (14:46 +1200)]
rpmd: Add the ldb error string to a debug

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotorture: Remove unnecessary whitespace
Garming Sam [Thu, 8 Sep 2016 01:33:11 +0000 (13:33 +1200)]
torture: Remove unnecessary whitespace

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agoctdb-scripts: Optimise tickle_tcp_connections()
Martin Schwenke [Tue, 8 Sep 2015 01:29:25 +0000 (11:29 +1000)]
ctdb-scripts: Optimise tickle_tcp_connections()

Pipe the connections to "ctdb tickle" on stdin to avoid having to fork
so many "ctdb tickle" processes.  This maintains the current level of
verbosity at the price of some extra memory usage.

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 Sep  8 10:45:42 CEST 2016 on sn-devel-144

7 years agoctdb-scripts: Optimise update_tickles()
Martin Schwenke [Mon, 23 Mar 2015 08:37:35 +0000 (19:37 +1100)]
ctdb-scripts: Optimise update_tickles()

Use addtickle and deltickle with stdin.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-tests: Allow "addtickle" and "deltickle" stubs to read from stdin
Martin Schwenke [Mon, 7 Sep 2015 07:24:26 +0000 (17:24 +1000)]
ctdb-tests: Allow "addtickle" and "deltickle" stubs to read from stdin

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-tests: CID 1125635 Dereference null return value (NULL_RETURNS)
Martin Schwenke [Fri, 2 Sep 2016 03:23:36 +0000 (13:23 +1000)]
ctdb-tests: CID 1125635 Dereference null return value (NULL_RETURNS)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-tools: CID 1125617 String not null terminated (STRING_NULL)
Martin Schwenke [Fri, 2 Sep 2016 01:56:02 +0000 (11:56 +1000)]
ctdb-tools: CID 1125617 String not null terminated (STRING_NULL)

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Compare interface pointers instead of using strcmp(3)
Martin Schwenke [Thu, 25 Aug 2016 01:48:36 +0000 (11:48 +1000)]
ctdb-daemon: Compare interface pointers instead of using strcmp(3)

If the interfaces have different names then they are different
interfaces.

Also, move assignment of new_name just above where is is first used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Use ctdb_find_iface() instead of duplicating logic
Martin Schwenke [Thu, 25 Aug 2016 01:41:11 +0000 (11:41 +1000)]
ctdb-daemon: Use ctdb_find_iface() instead of duplicating logic

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-deamon: Rename vnn_has_interface_with_name() to vnn_has_interface()
Martin Schwenke [Wed, 24 Aug 2016 10:41:49 +0000 (20:41 +1000)]
ctdb-deamon: Rename vnn_has_interface_with_name() to vnn_has_interface()

Now takes a pointer to an interface structure and does direct pointer
comparisons.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Drop redundant uses of ctdb_find_iface()
Martin Schwenke [Wed, 24 Aug 2016 10:38:03 +0000 (20:38 +1000)]
ctdb-daemon: Drop redundant uses of ctdb_find_iface()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Make vnn->iface a list of new struct vnn_interface
Martin Schwenke [Wed, 24 Aug 2016 08:21:51 +0000 (18:21 +1000)]
ctdb-daemon: Make vnn->iface a list of new struct vnn_interface

To keep this change small, this leaves behind some redundant calls to
ctdb_find_iface() and similar.  They will be cleaned up later.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Change ctdb_add_local_iface() to return struct ctdb_interface
Martin Schwenke [Wed, 24 Aug 2016 06:59:46 +0000 (16:59 +1000)]
ctdb-daemon: Change ctdb_add_local_iface() to return struct ctdb_interface

This will allow a change to the way interfaces are handled in a VNN.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Move interface addition into interface parsing
Martin Schwenke [Wed, 24 Aug 2016 06:55:15 +0000 (16:55 +1000)]
ctdb-daemon: Move interface addition into interface parsing

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Drop some uses of CTDB_NO_MEMORY{,_FATAL}()
Martin Schwenke [Wed, 24 Aug 2016 06:49:30 +0000 (16:49 +1000)]
ctdb-daemon: Drop some uses of CTDB_NO_MEMORY{,_FATAL}()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Consolidate interface checking with interface parsing
Martin Schwenke [Sat, 20 Aug 2016 10:34:33 +0000 (20:34 +1000)]
ctdb-daemon: Consolidate interface checking with interface parsing

There's no point parsing the interfaces twice, especially since it
doesn't improve error handling.

This also removes a use of strdup(3)/free(3), which is not generally
used in our code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Replace some uses of CTDB_NO_MEMORY_FATAL()
Martin Schwenke [Sat, 20 Aug 2016 10:29:04 +0000 (20:29 +1000)]
ctdb-daemon: Replace some uses of CTDB_NO_MEMORY_FATAL()

Also add a missing out-of-memory check for vnn->ifaces.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Move and improve public IP duplicate checking
Martin Schwenke [Sat, 20 Aug 2016 10:21:34 +0000 (20:21 +1000)]
ctdb-daemon: Move and improve public IP duplicate checking

This also moves the interface validation down, making more obvious
that it can be consolidated.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Drop use of strdup(3) and free(3) when releasing IP
Martin Schwenke [Sat, 20 Aug 2016 10:02:44 +0000 (20:02 +1000)]
ctdb-daemon: Drop use of strdup(3) and free(3) when releasing IP

If anything should be used here it should be talloc functions.
However, this is a remnant from when ctdb_sys_find_ifname() was used
here and, for some reason, it used strdup(3).

In this case the interface string doesn't actually need to be copied.
The only use of it is when ctdb_event_script_callback_v() uses it with
the format string in a call to talloc_vasprintf().  In the same
context the IP address isn't copied.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agolib: call_backtrace() is no more
Volker Lendecke [Tue, 6 Sep 2016 09:46:39 +0000 (11:46 +0200)]
lib: call_backtrace() is no more

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep  8 03:51:34 CEST 2016 on sn-devel-144

7 years agolibrpc: add clusapi_ResourceControlCode to IDL.
Günther Deschner [Wed, 11 May 2016 12:18:02 +0000 (14:18 +0200)]
librpc: add clusapi_ResourceControlCode to IDL.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: also test CLUSCTL_CLUSTER_CHECK_VOTER_DOWN.
Günther Deschner [Fri, 6 May 2016 23:24:28 +0000 (01:24 +0200)]
s4-torture: also test CLUSCTL_CLUSTER_CHECK_VOTER_DOWN.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: add test for CreateGroupEnum.
Günther Deschner [Tue, 3 May 2016 23:34:20 +0000 (01:34 +0200)]
s4-torture: add test for CreateGroupEnum.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolibrpc: add ClusterResTypeEnumType to IDL.
Günther Deschner [Tue, 3 May 2016 22:40:10 +0000 (00:40 +0200)]
librpc: add ClusterResTypeEnumType to IDL.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: add test for CreateResTypeEnum().
Günther Deschner [Tue, 3 May 2016 22:39:48 +0000 (00:39 +0200)]
s4-torture: add test for CreateResTypeEnum().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: test CLUSCTL_GROUP_GET_FLAGS GroupControl.
Günther Deschner [Tue, 3 May 2016 15:38:29 +0000 (17:38 +0200)]
s4-torture: test CLUSCTL_GROUP_GET_FLAGS GroupControl.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolibrpc: add CLUS_RESOURCE_CLASS_INFO to IDL
Günther Deschner [Tue, 3 May 2016 15:18:40 +0000 (17:18 +0200)]
librpc: add CLUS_RESOURCE_CLASS_INFO to IDL

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: add test for clusapi_CreateGroupResourceEnum
Günther Deschner [Tue, 3 May 2016 10:59:24 +0000 (12:59 +0200)]
s4-torture: add test for clusapi_CreateGroupResourceEnum

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolibrpc: add ClusterGroupEnumType enum to IDL.
Günther Deschner [Tue, 3 May 2016 10:58:07 +0000 (12:58 +0200)]
librpc: add ClusterGroupEnumType enum to IDL.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: add new tests for clusapi resourcetypes.
Günther Deschner [Tue, 3 May 2016 09:19:38 +0000 (11:19 +0200)]
s4-torture: add new tests for clusapi resourcetypes.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: Fix logic errors in node and group control clusapi tests.
Günther Deschner [Mon, 2 May 2016 15:53:38 +0000 (17:53 +0200)]
s4-torture: Fix logic errors in node and group control clusapi tests.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolibrpc: add clusapi_ResourceTypeControlCode enum.
Günther Deschner [Mon, 2 May 2016 15:07:04 +0000 (17:07 +0200)]
librpc: add clusapi_ResourceTypeControlCode enum.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: test multiple different cluster control codes.
Günther Deschner [Mon, 2 May 2016 12:53:13 +0000 (14:53 +0200)]
s4-torture: test multiple different cluster control codes.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopidl: fix field2name wireshark dissector test.
Günther Deschner [Tue, 6 Sep 2016 20:37:12 +0000 (22:37 +0200)]
pidl: fix field2name wireshark dissector test.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep  7 16:05:26 CEST 2016 on sn-devel-144

7 years agopidl: Keep case from fieldnames.
Günther Deschner [Wed, 11 May 2016 13:41:02 +0000 (15:41 +0200)]
pidl: Keep case from fieldnames.

Change-Id: I5626cfa0487cc88eb65cc349c05ae1762bc953f4
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-on: https://code.wireshark.org/review/16720
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:torture:smb2 prefer torture_comment() to printf().
Günther Deschner [Mon, 22 Feb 2016 14:40:50 +0000 (15:40 +0100)]
s4:torture:smb2 prefer torture_comment() to printf().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4:torture:smb2:acls: prefer torture_comment() to printf().
Günther Deschner [Mon, 22 Feb 2016 15:27:44 +0000 (16:27 +0100)]
s4:torture:smb2:acls: prefer torture_comment() to printf().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4:torture:smb2:scan: prefer torture_comment() to printf().
Günther Deschner [Mon, 22 Feb 2016 15:06:51 +0000 (16:06 +0100)]
s4:torture:smb2:scan: prefer torture_comment() to printf().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4:torture:smb2:getinfo: prefer torture_comment() to printf().
Günther Deschner [Mon, 22 Feb 2016 14:51:06 +0000 (15:51 +0100)]
s4:torture:smb2:getinfo: prefer torture_comment() to printf().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4:torture:smb2:maxwrite: compile maxwrite test at least.
Günther Deschner [Fri, 26 Feb 2016 16:25:58 +0000 (17:25 +0100)]
s4:torture:smb2:maxwrite: compile maxwrite test at least.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4-torture: reformat TORTURE_SMB2 wscript_build list.
Günther Deschner [Fri, 26 Feb 2016 16:15:32 +0000 (17:15 +0100)]
s4-torture: reformat TORTURE_SMB2 wscript_build list.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4:torture:smb2:maxwrite: prefer torture_comment() to printf().
Günther Deschner [Mon, 22 Feb 2016 14:46:24 +0000 (15:46 +0100)]
s4:torture:smb2:maxwrite: prefer torture_comment() to printf().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agosource4/torture/rpc/testjoin.c: prefer torture_comment() over printf().
Günther Deschner [Mon, 22 Feb 2016 16:39:19 +0000 (17:39 +0100)]
source4/torture/rpc/testjoin.c: prefer torture_comment() over printf().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4:torture:smb2:connect: prefer torture_comment() to printf().
Günther Deschner [Mon, 22 Feb 2016 14:30:26 +0000 (15:30 +0100)]
s4:torture:smb2:connect: prefer torture_comment() to printf().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agos4-torture: cleanup torture_suite_add_ndr_pull_validate_test API.
Günther Deschner [Mon, 25 Jul 2016 14:37:19 +0000 (16:37 +0200)]
s4-torture: cleanup torture_suite_add_ndr_pull_validate_test API.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Sep  7 09:28:13 CEST 2016 on sn-devel-144

7 years agos3-spoolss: fix _spoolss_GetPrinterDataEx by moving the keyname lengthcheck.
Günther Deschner [Thu, 1 Sep 2016 17:55:40 +0000 (19:55 +0200)]
s3-spoolss: fix _spoolss_GetPrinterDataEx by moving the keyname lengthcheck.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep  7 03:00:14 CEST 2016 on sn-devel-144

7 years agos4-torture: test GetPrinterData with server handle and 0 keylength.
Günther Deschner [Thu, 1 Sep 2016 17:54:46 +0000 (19:54 +0200)]
s4-torture: test GetPrinterData with server handle and 0 keylength.

This is what e.g. Windows 10 does a lot.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agopidl: support HRESULT as return code in wireshark autogenerated dissectors.
Günther Deschner [Mon, 28 Sep 2015 05:28:28 +0000 (07:28 +0200)]
pidl: support HRESULT as return code in wireshark autogenerated dissectors.

Guenther

Change-Id: I68b7c579c5a519e429d2f4c2b3f63247e02f24e3
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-on: https://code.wireshark.org/review/16718
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agotevent: fix confused documentation
Michael Adam [Mon, 5 Sep 2016 15:33:38 +0000 (17:33 +0200)]
tevent: fix confused documentation

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep  6 23:16:34 CEST 2016 on sn-devel-144

7 years agoidmap_script: add missing "IDTOSID" argument to the script command line.
Björn Baumbach [Fri, 26 Aug 2016 15:16:51 +0000 (17:16 +0200)]
idmap_script: add missing "IDTOSID" argument to the script command line.

According to the documentation the commands should look like
"IDTOSID UID xxxx" instead of "UID xxxx".

This fixes changes of commit b4239ca096738f553b0f9d7fa6aaa4219b72ef7f:
    idmap_script: Parallelize script calls

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

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-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 Sep  6 19:32:57 CEST 2016 on sn-devel-144

7 years agotests/dns_forwarder: Fail out with an assertion instead OOB error
Garming Sam [Thu, 9 Jun 2016 01:52:38 +0000 (03:52 +0200)]
tests/dns_forwarder: Fail out with an assertion instead OOB error

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Sep  6 15:41:54 CEST 2016 on sn-devel-144

7 years agotests/dns_forwarder: Check that the subprocess is still living
Garming Sam [Thu, 7 Jul 2016 04:58:27 +0000 (16:58 +1200)]
tests/dns_forwarder: Check that the subprocess is still living

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/dns_forwarder: Wait for port for 15 seconds
Garming Sam [Mon, 5 Sep 2016 22:48:57 +0000 (10:48 +1200)]
tests/dns_forwarder: Wait for port for 15 seconds

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agosamba-tool: Remove --use-xattrs support without --use-ntvfs
Andrew Bartlett [Sun, 4 Sep 2016 09:33:30 +0000 (21:33 +1200)]
samba-tool: Remove --use-xattrs support without --use-ntvfs

The only reasonable use --use-xattrs=no should be used is in selftest,
and there is no need for that or --use-xattrs=auto without
--use-ntvfs, all systems we support in production for the AD DC have
xattrs, as using smbd needs posix ACLs.

This also removes the option entirely if NTVFS support is omitted from
the build.

I would prefer to get rid of the option, but currently selftest relies
on the default of --use-xattrs=auto, and we first should get rid of
that auto-detection, which will then mean we need --use-xattrs=no
specified wherever we specify --use-ntvfs.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Sep  6 04:21:42 CEST 2016 on sn-devel-144

7 years agowafsamba: add -Werror=format-security to the developer build
Stefan Metzmacher [Fri, 2 Sep 2016 15:23:28 +0000 (17:23 +0200)]
wafsamba: add -Werror=format-security to the developer build

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): Mon Sep  5 20:23:00 CEST 2016 on sn-devel-144

7 years agoselftest: detect older tshark version
Uri Simchoni [Mon, 5 Sep 2016 05:52:52 +0000 (08:52 +0300)]
selftest: detect older tshark version

Detect older versions of tshark, which do not recognize
the -Y option, and skip the kerberos enc type tests

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  5 16:31:58 CEST 2016 on sn-devel-144

7 years agocopyright: Add the missing notices for garbage collect tombstones
Bob Campbell [Sun, 4 Sep 2016 23:24:19 +0000 (11:24 +1200)]
copyright: Add the missing notices for garbage collect tombstones

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Sep  5 08:14:26 CEST 2016 on sn-devel-144

7 years agodsdb: refactor part of garbage_collect_tombstones into new function
Bob Campbell [Sun, 4 Sep 2016 22:48:13 +0000 (10:48 +1200)]
dsdb: refactor part of garbage_collect_tombstones into new function

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agoscript/release.sh: use 8 byte gpg key ids
Stefan Metzmacher [Fri, 2 Sep 2016 06:47:56 +0000 (08:47 +0200)]
script/release.sh: use 8 byte gpg key ids

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  2 22:05:33 CEST 2016 on sn-devel-144

7 years agogensec/spnego: work around missing server mechListMIC in SMB servers
Stefan Metzmacher [Thu, 1 Sep 2016 06:08:23 +0000 (08:08 +0200)]
gensec/spnego: work around missing server mechListMIC in SMB servers

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Sep  2 18:10:44 CEST 2016 on sn-devel-144

7 years agokcc: Fix a -Werror,-Wformat-security error
Volker Lendecke [Fri, 2 Sep 2016 07:17:33 +0000 (09:17 +0200)]
kcc: Fix a -Werror,-Wformat-security error

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Sep  2 13:54:45 CEST 2016 on sn-devel-144

7 years agos4-dsdb: Change debug level for replication
Andreas Schneider [Wed, 24 Aug 2016 09:33:16 +0000 (11:33 +0200)]
s4-dsdb: Change debug level for replication

Most of the time it is spamming the logs, so increase the level to debug
for most messages.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  2 05:06:00 CEST 2016 on sn-devel-144

7 years agokrb5_wrap: Remove extra parentheses causing compile error
Anoop C S [Thu, 1 Sep 2016 05:55:32 +0000 (11:25 +0530)]
krb5_wrap: Remove extra parentheses causing compile error

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Sep  1 21:02:54 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Add a test to ensure that CTDB works with no eventscripts
Martin Schwenke [Mon, 29 Aug 2016 06:52:45 +0000 (16:52 +1000)]
ctdb-tests: Add a test to ensure that CTDB works with no eventscripts

This only tests something on local daemons, since the configuration
can't be easily manipulated on a real cluster.

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

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 Sep  1 17:15:06 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Conditionally use temporary config file for local daemons
Martin Schwenke [Mon, 29 Aug 2016 06:49:07 +0000 (16:49 +1000)]
ctdb-tests: Conditionally use temporary config file for local daemons

If there's configuration in the environment then daemons_start()
should use a temporary configuration file with that appended.

This means that global overrides don't (harmlessly) build up in the
configuration file during each test and individual tests can override
configuration when calling daemons_start() directly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-tests: Factor out function config_from_environment()
Martin Schwenke [Mon, 29 Aug 2016 06:05:33 +0000 (16:05 +1000)]
ctdb-tests: Factor out function config_from_environment()

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Don't steal control structure before synchronous reply
Martin Schwenke [Tue, 30 Aug 2016 22:29:13 +0000 (08:29 +1000)]
ctdb-daemon: Don't steal control structure before synchronous reply

If *async_reply isn't set then the calling code will reply to the
control and free the control structure.  In some places the control
structure pointer is stolen onto state before a synchronous exit due
to an error condition.  The error handling then frees state and
returns an error.  The calling code will access-after-free when trying
to reply to the control.

To make this easier to understand, the convention is that any
(immediate) error results in a synchronous reply to the control via an
error return code AND *async_reply not being set.  In this case the
control structure pointer should never be stolen onto state.  State is
never used for a synchronous reply, it is only ever used by a
callback.

Also initialise state->c to NULL so that any premature call to a
callback (e.g. in an immediate error path) is more obvious.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Handle failure immediately, do housekeeping later
Martin Schwenke [Fri, 26 Aug 2016 06:38:56 +0000 (16:38 +1000)]
ctdb-daemon: Handle failure immediately, do housekeeping later

The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

An event script isn't being run until the child has been forked.  So
update relevant state and set the destructor after this.

If the child can't be forked then free the state and return with an
error.  The callback will not be called and the caller will process
the error correctly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Schedule running of callback if there are no event scripts
Martin Schwenke [Fri, 26 Aug 2016 06:29:47 +0000 (16:29 +1000)]
ctdb-daemon: Schedule running of callback if there are no event scripts

The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

ctdb_event_script_callback_v() must succeed when there are no event
scripts.  On success the caller will mark the call as asynchronous and
expect the callback to be called.  Given that it can't be called
before return then it needs to be scheduled.

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

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