metze/samba/wip.git
7 years agos4-kdc: Add a new kpasswd service implementation
Andreas Schneider [Wed, 7 Sep 2016 10:32:14 +0000 (12:32 +0200)]
s4-kdc: Add a new kpasswd service implementation

This function is intended to be be passed to kdc_add_socket(). The
function kpasswd_handle_request() which is called by kpasswd_process()
is Kerberos implementation specific and should be implemented in a
kpasswd-service-<kerberos flavour>.c file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-kdc: Allow to set the keytab_name in the kdc_server structure
Andreas Schneider [Wed, 7 Sep 2016 10:30:21 +0000 (12:30 +0200)]
s4-kdc: Allow to set the keytab_name in the kdc_server structure

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-kdc: Add a kpasswd_samdb_set_password() helper function
Andreas Schneider [Wed, 7 Sep 2016 13:07:49 +0000 (15:07 +0200)]
s4-kdc: Add a kpasswd_samdb_set_password() helper function

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/smbd: use stat from smb_fname if valid in refuse_symlink()
Ralph Boehme [Sat, 10 Sep 2016 12:43:07 +0000 (14:43 +0200)]
s3/smbd: use stat from smb_fname if valid in refuse_symlink()

Now that refuse_symlink() gets passed in a smb_fname and not just a char
buffer, we can try to reuse its stat info and save one stat call here.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Sep 11 23:52:17 CEST 2016 on sn-devel-144

7 years agos3/smbd: in call_trans2qfilepathinfo call lstat when dealing with posix pathnames
Ralph Boehme [Sun, 11 Sep 2016 13:35:37 +0000 (15:35 +0200)]
s3/smbd: in call_trans2qfilepathinfo call lstat when dealing with posix pathnames

This might be an info level SMB_INFO_QUERY_ALL_EAS which is not covered
by INFO_LEVEL_IS_UNIX(). If smb_fname is a symlink we would then stat it
in POSIX context.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-registry: create winprint print processor entry for x64 as well.
Günther Deschner [Sat, 10 Sep 2016 09:07:54 +0000 (11:07 +0200)]
s3-registry: create winprint print processor entry for x64 as well.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolibgpo: accept more boolean matches in gp_inifile_getbool().
Günther Deschner [Thu, 8 Sep 2016 19:28:22 +0000 (21:28 +0200)]
libgpo: accept more boolean matches in gp_inifile_getbool().

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-rpc_client: make it more clear printer driver version is a QWORD not a DWORD.
Günther Deschner [Thu, 8 Sep 2016 19:22:17 +0000 (21:22 +0200)]
s3-rpc_client: make it more clear printer driver version is a QWORD not a DWORD.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: also test NULL servername in spoolss_GetPrinterDriverPackagePath
Günther Deschner [Thu, 8 Sep 2016 19:09:42 +0000 (21:09 +0200)]
s4-torture: also test NULL servername in spoolss_GetPrinterDriverPackagePath

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-spoolss: avoid referencing p->opnum in _spoolss_AddPrinterDriverEx
Günther Deschner [Thu, 8 Sep 2016 19:06:41 +0000 (21:06 +0200)]
s3-spoolss: avoid referencing p->opnum in _spoolss_AddPrinterDriverEx

When called by another protocol, this call would fail when called with an
unexpected opnum... This change is in preparation for supporting MS-PAR.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-rpcclient: add getdriverpackagepath command.
Günther Deschner [Thu, 8 Sep 2016 18:57:05 +0000 (20:57 +0200)]
s3-rpcclient: add getdriverpackagepath command.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-waf: give rpcclient its own wscript_build.
Günther Deschner [Thu, 10 Jan 2013 12:53:56 +0000 (13:53 +0100)]
s3-waf: give rpcclient its own wscript_build.

Guenther
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: use torture_comment in torture_rpc_connection()
Günther Deschner [Fri, 2 Sep 2016 10:44:34 +0000 (12:44 +0200)]
s4-torture: use torture_comment in torture_rpc_connection()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-spoolss: add missing newline in debug message of _spoolss_OpenPrinterEx.
Günther Deschner [Thu, 25 Aug 2016 15:10:09 +0000 (17:10 +0200)]
s3-spoolss: add missing newline in debug message of _spoolss_OpenPrinterEx.

Guenther

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
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