samba.git
7 years agos3-lib: Do not set an empty string in split_domain_user()
Andreas Schneider [Tue, 20 Sep 2016 17:51:15 +0000 (19:51 +0200)]
s3-lib: Do not set an empty string in split_domain_user()

The function should also return if it failed or not.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Sep 25 12:56:17 CEST 2016 on sn-devel-144

7 years agos3-lib: Parse WORKGROUP\username in set_cmdline_auth_info_username()
Andreas Schneider [Thu, 15 Sep 2016 10:08:24 +0000 (12:08 +0200)]
s3-lib: Parse WORKGROUP\username in set_cmdline_auth_info_username()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-lib: Do not create 'MACHINE$@' usernames
Andreas Schneider [Thu, 15 Sep 2016 10:54:42 +0000 (12:54 +0200)]
s3-lib: Do not create 'MACHINE$@' usernames

If there is no realm set we should not add it to the machine account.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agonsswitch: Use own credential cache for wbinfo tests
Andreas Schneider [Mon, 19 Sep 2016 11:27:30 +0000 (13:27 +0200)]
nsswitch: Use own credential cache for wbinfo tests

If we do not set it will add the credentials to the system default
credential cache, which is e.g. FILE:/tmp/krb5cc_1000.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agotestprogs: Use own credential cache for test_client_etypes.sh
Andreas Schneider [Tue, 20 Sep 2016 22:01:35 +0000 (00:01 +0200)]
testprogs: Use own credential cache for test_client_etypes.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agotestprogs: Use better KRB5CCNAME in test_password_settings.sh
Andreas Schneider [Tue, 20 Sep 2016 07:46:34 +0000 (09:46 +0200)]
testprogs: Use better KRB5CCNAME in test_password_settings.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-script: Use unique krb5ccache name
Andreas Schneider [Mon, 19 Sep 2016 10:18:31 +0000 (12:18 +0200)]
s3-script: Use unique krb5ccache name

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-selftest: Rename samba3.ntlm_auth.krb5 old ccache test
Andreas Schneider [Thu, 15 Sep 2016 13:47:25 +0000 (15:47 +0200)]
s3-selftest: Rename samba3.ntlm_auth.krb5 old ccache test

This makes it easier to run only one of them.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoglusterfs: Avoid tevent_internal.h
Volker Lendecke [Sat, 24 Sep 2016 17:45:13 +0000 (10:45 -0700)]
glusterfs: Avoid tevent_internal.h

Günther confirmed it still compiles :-)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Sep 24 23:41:56 CEST 2016 on sn-devel-144

7 years agos3: events. Move events.c to util_event.c
Jeremy Allison [Sat, 24 Sep 2016 03:00:33 +0000 (20:00 -0700)]
s3: events. Move events.c to util_event.c

Remove all tevent internal code.

Everything is now stock tevent.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: server: s3_tevent_context_init() -> samba_tevent_context_init()
Jeremy Allison [Sat, 24 Sep 2016 02:11:17 +0000 (19:11 -0700)]
s3: server: s3_tevent_context_init() -> samba_tevent_context_init()

We can now remove source3/lib/events.c

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: winbind: Remove dump_event_list() calls.
Jeremy Allison [Sat, 24 Sep 2016 02:07:39 +0000 (19:07 -0700)]
s3: winbind: Remove dump_event_list() calls.

If needed we can add this into actual tevent.

Preparing to remove source3/lib/events.c

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Final changeover to stock tevent for nmbd.
Jeremy Allison [Fri, 23 Sep 2016 19:37:52 +0000 (12:37 -0700)]
s3: nmbd: Final changeover to stock tevent for nmbd.

Removes unused references to fds array used for (removed)
poll call. Renames create_listen_pollfds() to
create_listen_array().

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Change over to using tevent functions from direct poll.
Jeremy Allison [Fri, 23 Sep 2016 19:31:00 +0000 (12:31 -0700)]
s3: nmbd: Change over to using tevent functions from direct poll.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Add a talloc_stackframe().
Jeremy Allison [Fri, 23 Sep 2016 19:22:53 +0000 (12:22 -0700)]
s3: nmbd: Add a talloc_stackframe().

We will use this to create real tevent timer and fd
events.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Add (currently unused) timeout and fd handlers.
Jeremy Allison [Fri, 23 Sep 2016 19:18:37 +0000 (12:18 -0700)]
s3: nmbd: Add (currently unused) timeout and fd handlers.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Now attrs array mirrors fd's array use it in preference.
Jeremy Allison [Fri, 23 Sep 2016 19:16:58 +0000 (12:16 -0700)]
s3: nmbd: Now attrs array mirrors fd's array use it in preference.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Ensure attrs array mirrors fd's array for dns.
Jeremy Allison [Fri, 23 Sep 2016 19:12:43 +0000 (12:12 -0700)]
s3: nmbd: Ensure attrs array mirrors fd's array for dns.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3: nmbd: Add fd, triggered elements to struct socket_attributes.
Jeremy Allison [Fri, 23 Sep 2016 19:05:59 +0000 (12:05 -0700)]
s3: nmbd: Add fd, triggered elements to struct socket_attributes.

Zero the attrs array on allocation, and mirror the fd's.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agos3:nmbd: fix talloc_zero_array() check in nmbd_packets.c
Stefan Metzmacher [Wed, 27 Feb 2013 08:29:47 +0000 (09:29 +0100)]
s3:nmbd: fix talloc_zero_array() check in nmbd_packets.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 23 18:08:21 CEST 2016 on sn-devel-144

7 years agokcc: Don't check schedule if None
Garming Sam [Thu, 22 Sep 2016 03:28:57 +0000 (15:28 +1200)]
kcc: Don't check schedule if None

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Sep 23 06:52:28 CEST 2016 on sn-devel-144

7 years agotorture/ioctl: switch sparse src/dest dup ext behaviour
David Disseldorp [Thu, 22 Sep 2016 07:00:07 +0000 (00:00 -0700)]
torture/ioctl: switch sparse src/dest dup ext behaviour

Contrary to 2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE
STATUS_NOT_SUPPORTED: Target file is sparse, while source is a
non-sparse file.

...Windows Server 2016 RTM appears to respond the other way around.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 23 00:23:09 CEST 2016 on sn-devel-144

7 years agotorture/smb2/ioctl: don't check for untruncated dest failure
David Disseldorp [Wed, 21 Sep 2016 23:43:54 +0000 (16:43 -0700)]
torture/smb2/ioctl: don't check for untruncated dest failure

This should fail, but passes against WS2016 RTM...

2.3.8 FSCTL_DUPLICATE_EXTENTS_TO_FILE Reply:
The destination range extends beyond the target file's allocation size.
The caller might need to increase the target's allocation size before
using FSCTL_DUPLICATE_EXTENTS_TO_FILE.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotorture/ioctl: add FSCTL_DUP_EXTENTS_TO_FILE tests
David Disseldorp [Fri, 30 Jan 2015 11:59:42 +0000 (12:59 +0100)]
torture/ioctl: add FSCTL_DUP_EXTENTS_TO_FILE tests

FSCTL_DUPLICATE_EXTENTS_TO_FILE is yet another copy offload mechanism,
this time only targeting COW FSes, where the request triggers a meta-
data only clone of the source range.

These tests attempt to cover most of the normal use cases, as well as
number of more exotic scenarios.

FILE_SUPPORTS_BLOCK_REFCOUNTING FS attribute presence is checked prior
to running the tests, so they will currently be skipped during Samba
self test (which lacks the flag).

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolibcli: add FILE_SUPPORTS_BLOCK_REFCOUNTING
David Disseldorp [Mon, 20 Jul 2015 15:56:34 +0000 (17:56 +0200)]
libcli: add FILE_SUPPORTS_BLOCK_REFCOUNTING

This FS attribute is used to advertise whether the server supports
FSCTL_DUP_EXTENTS_TO_FILE requests.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoidl/ioctl: fix DUPLICATE_EXTENTS_TO_FILE fid field
David Disseldorp [Tue, 20 Sep 2016 16:10:37 +0000 (09:10 -0700)]
idl/ioctl: fix DUPLICATE_EXTENTS_TO_FILE fid field

This idl was based on an earlier draft documentation version. The
current documentation now shows:
"SourceFileID (16 bytes): An SMB2_FILEID structure, as specified in
[MS-SMB2] section 2.2.14.1, that is an identifier of the open to the
source file.".

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotorture/ioctl: make sparse file support check generic
David Disseldorp [Mon, 20 Jul 2015 15:52:44 +0000 (17:52 +0200)]
torture/ioctl: make sparse file support check generic

Rename test_ioctl_sparse_fs_supported() to test_ioctl_fs_supported() and
allow callers to query generic FileSystemAttributes flags via the new
fs_support_flags parameter.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-torture: parse spoolss ndr packets using iremotewinspool calls
Günther Deschner [Tue, 30 Aug 2016 16:55:39 +0000 (18:55 +0200)]
s4-torture: parse spoolss ndr packets using iremotewinspool calls

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): Thu Sep 22 16:16:30 CEST 2016 on sn-devel-144

7 years agos4-torture: add IRemoteWinspool ndr testsuite.
Günther Deschner [Thu, 16 May 2013 16:20:20 +0000 (18:20 +0200)]
s4-torture: add IRemoteWinspool ndr testsuite.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoidl: compile iremotewinspool.idl.
Günther Deschner [Tue, 15 Jan 2013 14:20:32 +0000 (15:20 +0100)]
idl: compile iremotewinspool.idl.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agolibrpc: add IRemoteWinspool idl
Günther Deschner [Tue, 4 Aug 2009 16:52:52 +0000 (18:52 +0200)]
librpc: add IRemoteWinspool idl

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-torture: add new test to compare "ServerSecurityDescriptor" and GetPrinter level 3.
Günther Deschner [Tue, 13 Sep 2016 07:28:03 +0000 (09:28 +0200)]
s4-torture: add new test to compare "ServerSecurityDescriptor" and GetPrinter level 3.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-spoolss: in _spoolss_OpenPrinterEx map max_allowed for the print server
Günther Deschner [Sat, 10 Sep 2016 09:11:12 +0000 (11:11 +0200)]
s3-spoolss: in _spoolss_OpenPrinterEx map max_allowed for the print server

TODO: do real access checks against the security descriptor.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-spoolss: allow SetPrinter level 3 for server handles as well.
Günther Deschner [Sat, 10 Sep 2016 09:10:12 +0000 (11:10 +0200)]
s3-spoolss: allow SetPrinter level 3 for server handles as well.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-spoolss: use server sd stored in the backend in _spoolss_GetPrinter level 3
Günther Deschner [Sat, 10 Sep 2016 09:09:44 +0000 (11:09 +0200)]
s3-spoolss: use server sd stored in the backend in _spoolss_GetPrinter level 3

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-torture: test spoolss_SetPrinter level 3 on server handle.
Günther Deschner [Sat, 10 Sep 2016 09:07:06 +0000 (11:07 +0200)]
s4-torture: test spoolss_SetPrinter level 3 on server handle.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-rpc_client: add winreg_set_printserver_secdesc.
Günther Deschner [Fri, 9 Sep 2016 22:07:23 +0000 (00:07 +0200)]
s3-rpc_client: add winreg_set_printserver_secdesc.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-rpc_client: add winreg_get_printserver_secdesc.
Günther Deschner [Fri, 9 Sep 2016 22:06:27 +0000 (00:06 +0200)]
s3-rpc_client: add winreg_get_printserver_secdesc.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-spoolss: Fix _spoolss_GetPrinter behaviour for server handles.
Günther Deschner [Fri, 9 Sep 2016 14:34:57 +0000 (16:34 +0200)]
s3-spoolss: Fix _spoolss_GetPrinter behaviour for server handles.

Without this the security tab of the print server properties will be obviously
empty and only display a warning.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos4-torture: test GetPrinter level 3 on server handle (security descriptor query)
Günther Deschner [Fri, 9 Sep 2016 14:00:38 +0000 (16:00 +0200)]
s4-torture: test GetPrinter level 3 on server handle (security descriptor query)

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename RPC_PrintNamedProperty to spoolss_PrintNamedProperty
Günther Deschner [Wed, 7 Sep 2016 05:50:14 +0000 (07:50 +0200)]
spoolss: rename RPC_PrintNamedProperty to spoolss_PrintNamedProperty

We should try to avoid the RPC_ prefix in structs, enums for spoolss.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename spoolss_RpcSendRecvBidiData to spoolss_SendRecvBidiData
Günther Deschner [Mon, 29 Aug 2016 12:05:34 +0000 (14:05 +0200)]
spoolss: rename spoolss_RpcSendRecvBidiData to spoolss_SendRecvBidiData

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename spoolss_RpcEnumJobNamedProperties to spoolss_EnumJobNamedProperties
Günther Deschner [Mon, 29 Aug 2016 10:55:23 +0000 (12:55 +0200)]
spoolss: rename spoolss_RpcEnumJobNamedProperties to spoolss_EnumJobNamedProperties

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename spoolss_RpcDeleteJobNamedProperty to spoolss_DeleteJobNamedProperty
Günther Deschner [Mon, 29 Aug 2016 10:54:47 +0000 (12:54 +0200)]
spoolss: rename spoolss_RpcDeleteJobNamedProperty to spoolss_DeleteJobNamedProperty

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename spoolss_RpcSetJobNamedProperty to spoolss_SetJobNamedProperty
Günther Deschner [Mon, 29 Aug 2016 10:53:45 +0000 (12:53 +0200)]
spoolss: rename spoolss_RpcSetJobNamedProperty to spoolss_SetJobNamedProperty

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename spoolss_RpcGetJobNamedPropertyValue to spoolss_GetJobNamedPropertyValue
Günther Deschner [Mon, 29 Aug 2016 10:52:38 +0000 (12:52 +0200)]
spoolss: rename spoolss_RpcGetJobNamedPropertyValue to spoolss_GetJobNamedPropertyValue

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agospoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes
Günther Deschner [Thu, 25 Aug 2016 23:05:20 +0000 (01:05 +0200)]
spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes

This change makes automatic mapping for PAR->RPRN opcodes easier.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoctdb-daemon: Log when removing stale Unix domain socket
Martin Schwenke [Thu, 22 Sep 2016 04:52:55 +0000 (14:52 +1000)]
ctdb-daemon: Log when removing stale Unix domain socket

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

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 22 12:28:12 CEST 2016 on sn-devel-144

7 years agoctdb-daemon: Drop attempt to connect to Unix domain socket
Martin Schwenke [Thu, 22 Sep 2016 04:47:02 +0000 (14:47 +1000)]
ctdb-daemon: Drop attempt to connect to Unix domain socket

This was a weak attempt at exclusivity.  PID file creation now does
that properly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Don't try to reopen TDB files
Martin Schwenke [Thu, 22 Sep 2016 04:46:12 +0000 (14:46 +1000)]
ctdb-daemon: Don't try to reopen TDB files

There aren't any open at this stage.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Bind to Unix domain socket after PID file creation
Martin Schwenke [Thu, 22 Sep 2016 04:43:58 +0000 (14:43 +1000)]
ctdb-daemon: Bind to Unix domain socket after PID file creation

No use touching the socket if PID file creation fails.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Use PID file abstraction
Martin Schwenke [Thu, 22 Sep 2016 04:35:03 +0000 (14:35 +1000)]
ctdb-daemon: Use PID file abstraction

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-common: Add routines to manage PID file
Amitay Isaacs [Mon, 19 Sep 2016 06:30:12 +0000 (16:30 +1000)]
ctdb-common: Add routines to manage PID file

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-locking: Restrict lock debugging to once per second
Amitay Isaacs [Thu, 22 Sep 2016 04:06:44 +0000 (14:06 +1000)]
ctdb-locking: Restrict lock debugging to once per second

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-locking: Log if ctdb is unable to take db locks in INACTIVE state
Amitay Isaacs [Thu, 22 Sep 2016 03:58:06 +0000 (13:58 +1000)]
ctdb-locking: Log if ctdb is unable to take db locks in INACTIVE state

This is useful information if ctdb is unable to freeze any of the
databases on banning or stopping.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-tests: Produce clear errors for missing IPv6 node IP addresses
Martin Schwenke [Wed, 21 Sep 2016 01:51:50 +0000 (11:51 +1000)]
ctdb-tests: Produce clear errors for missing IPv6 node IP addresses

This replaces a broken FIXME comment in the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-tests: Fix typo in local daemons IPv6 setup
Martin Schwenke [Thu, 8 Sep 2016 09:01:31 +0000 (19:01 +1000)]
ctdb-tests: Fix typo in local daemons IPv6 setup

This should be a sub-shell not an arithmetic expansion.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoremove duplicate lines from 'man smb.conf'
Rowland Penny [Wed, 21 Sep 2016 09:53:46 +0000 (10:53 +0100)]
remove duplicate lines from 'man smb.conf'

Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 21 17:18:46 CEST 2016 on sn-devel-144

7 years agodocs/vfs_fruit: explain when to use vfs_catia
Ralph Boehme [Tue, 20 Sep 2016 16:12:15 +0000 (09:12 -0700)]
docs/vfs_fruit: explain when to use vfs_catia

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 21 03:54:59 CEST 2016 on sn-devel-144

7 years agotls: Fix warning Wunused-variable
Lukas Slebodnik [Sat, 17 Sep 2016 16:03:12 +0000 (18:03 +0200)]
tls: Fix warning Wunused-variable

The variable error_pos is used only with enabled ENABLE_GNUTLS
There are warnings if compiled witout gnutls

../source4/lib/tls/tls_tstream.c: In function ‘_tstream_tls_connect_send’:
../source4/lib/tls/tls_tstream.c:1053:14:
    warning: unused variable ‘error_pos’ [-Wunused-variable]
  const char *error_pos;
              ^~~~~~~~~
../source4/lib/tls/tls_tstream.c: In function ‘_tstream_tls_accept_send’:
../source4/lib/tls/tls_tstream.c:1333:14:
     warning: unused variable ‘error_pos’ [-Wunused-variable]
  const char *error_pos;
              ^~~~~~~~~

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 21 00:01:09 CEST 2016 on sn-devel-144

7 years agonsswitch: Also set h_errnop for nss_wins functions
Andreas Schneider [Tue, 20 Sep 2016 11:26:52 +0000 (13:26 +0200)]
nsswitch: Also set h_errnop for nss_wins functions

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Sep 20 20:16:43 CEST 2016 on sn-devel-144

7 years agowaf: Explicitly link against libnss_wins.so
Andreas Schneider [Mon, 19 Sep 2016 14:21:31 +0000 (16:21 +0200)]
waf: Explicitly link against libnss_wins.so

If we do not specify replace as a depencency here, it will not link to
libreplace using an rpath.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Sep 20 08:00:08 CEST 2016 on sn-devel-144

7 years agonsswitch: Add missing arguments to wins gethostbyname*
Andreas Schneider [Mon, 19 Sep 2016 14:17:11 +0000 (16:17 +0200)]
nsswitch: Add missing arguments to wins gethostbyname*

The errno pointer argument is missing.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
7 years agogencache: Bail out of stabilize if we can not get the allrecord lock
Volker Lendecke [Mon, 19 Sep 2016 21:29:21 +0000 (14:29 -0700)]
gencache: Bail out of stabilize if we can not get the allrecord lock

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

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): Tue Sep 20 04:09:33 CEST 2016 on sn-devel-144

7 years agos3/smbd: use correct talloc memory context for tevent subrequests
Ralph Boehme [Sun, 18 Sep 2016 15:14:37 +0000 (17:14 +0200)]
s3/smbd: use correct talloc memory context for tevent subrequests

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): Mon Sep 19 23:25:37 CEST 2016 on sn-devel-144

7 years agoctdb-daemon: Log a message when vfork() takes long time
Amitay Isaacs [Thu, 15 Sep 2016 06:10:49 +0000 (16:10 +1000)]
ctdb-daemon: Log a message when vfork() takes long time

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): Mon Sep 19 12:18:15 CEST 2016 on sn-devel-144

7 years agoctdb-daemon: Log a message when fork() takes long time
Amitay Isaacs [Thu, 15 Sep 2016 06:10:49 +0000 (16:10 +1000)]
ctdb-daemon: Log a message when fork() takes long time

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-daemon: Avoid extra condition in tevent trace callback
Amitay Isaacs [Fri, 27 Mar 2015 05:23:48 +0000 (16:23 +1100)]
ctdb-daemon: Avoid extra condition in tevent trace callback

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-recovery-helper: Add missing initialisation of ban_credits
Amitay Isaacs [Mon, 19 Sep 2016 04:59:06 +0000 (14:59 +1000)]
ctdb-recovery-helper: Add missing initialisation of ban_credits

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agolib: poll_funcs : poll_funcs_context_slot_find can select the wrong slot to replace.
Jeremy Allison [Sat, 17 Sep 2016 06:37:20 +0000 (23:37 -0700)]
lib: poll_funcs : poll_funcs_context_slot_find can select the wrong slot to replace.

Look for an exact match first, before a free slot.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Sep 19 07:12:00 CEST 2016 on sn-devel-144

7 years agos4/messaging: let the imessaging ctx destructor free msg_dgm_ref
Ralph Boehme [Thu, 15 Sep 2016 12:19:51 +0000 (14:19 +0200)]
s4/messaging: let the imessaging ctx destructor free msg_dgm_ref

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib/poll_funcs: free contexts in poll_funcs_state_destructor()
Ralph Boehme [Fri, 16 Sep 2016 15:55:56 +0000 (17:55 +0200)]
lib/poll_funcs: free contexts in poll_funcs_state_destructor()

This ensures the destructors get called in the proper order.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib/poll_funcs: free timers in poll_funcs_state_destructor()
Ralph Boehme [Thu, 15 Sep 2016 12:19:27 +0000 (14:19 +0200)]
lib/poll_funcs: free timers in poll_funcs_state_destructor()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/smbd: remove a misleading error message
Ralph Boehme [Fri, 16 Sep 2016 10:48:39 +0000 (12:48 +0200)]
s3/smbd: remove a misleading error message

It can happen that we get 0 cleanup events, so remove this error
message.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Sep 16 16:43:16 CEST 2016 on sn-devel-144

7 years agotevent_tutorial: Fix tevent_thread referencing
Volker Lendecke [Sun, 11 Sep 2016 07:28:35 +0000 (09:28 +0200)]
tevent_tutorial: Fix tevent_thread referencing

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 Sep 16 05:16:02 CEST 2016 on sn-devel-144

7 years agotevent_tutorial: Fix typos
Volker Lendecke [Sun, 11 Sep 2016 07:28:35 +0000 (09:28 +0200)]
tevent_tutorial: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/smbd: set FILE_ATTRIBUTE_DIRECTORY as necessary
Ralph Boehme [Wed, 14 Sep 2016 10:52:48 +0000 (12:52 +0200)]
s3/smbd: set FILE_ATTRIBUTE_DIRECTORY as necessary

Some VFS modules like GPFS will always return success from
SMB_VFS_GET_DOS_ATTRIBUTES() but only set a subset of the attributes. It
neither sets FILE_ATTRIBUTE_NORMAL nor FILE_ATTRIBUTE_DIRECTORY.

We already handle the case that the VFS stack returns with result==0 and
then add the FILE_ATTRIBUTE_NORMAL, regardless of the type of the
filesystem object. If we want to handle result==0 situation in the
SMB_VFS_GET_DOS_ATTRIBUTES() caller, then do it right by either setting
FILE_ATTRIBUTE_NORMAL or FILE_ATTRIBUTE_DIRECTORY.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 16 00:34:43 CEST 2016 on sn-devel-144

7 years agonfs4acl: Fix owner mapping with ID_TYPE_BOTH
Christof Schmitt [Mon, 12 Sep 2016 23:22:16 +0000 (16:22 -0700)]
nfs4acl: Fix owner mapping with ID_TYPE_BOTH

This fixes a corner case when using NFS4 ACLs with ID_TYPE_BOTH.  Before
this patch, the owner entry in the ACL would be mapped to a gid entry in
the NFSv4 ACL, and not the expected special owner entry. This is caused
by the id mapping returning a valid gid and the nfs4 mapping assumed
that this was actually a group.

Fix this by asking for the uid first, and explicitly checking if the
mapped uid matches the owner. That creates a uid entry in the NFSv4 ACL
that can be changed later in smbacl4_substitute_{simple,special} to the
expected special owner entry.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-spoolss: fix winreg_printer_ver_to_qword
Günther Deschner [Mon, 12 Sep 2016 15:55:37 +0000 (17:55 +0200)]
s3-spoolss: fix winreg_printer_ver_to_qword

We were reporting the OS minor number as the driver version number in all
GetDriver/EnumDriver calls.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agosmbd: Reset O_NONBLOCK on open files
Volker Lendecke [Mon, 29 Aug 2016 07:58:45 +0000 (09:58 +0200)]
smbd: Reset O_NONBLOCK on open files

See the comment inline :-)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12268
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Simo <simo@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 15 20:21:41 CEST 2016 on sn-devel-144

7 years agos4:samba_spnupdate: do not attempt to parse log level, use parsed value
Christian Ambach [Tue, 13 Sep 2016 08:49:47 +0000 (10:49 +0200)]
s4:samba_spnupdate: do not attempt to parse log level, use parsed value

The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Sep 14 23:15:18 CEST 2016 on sn-devel-144

7 years agopython/join: do not attempt to parse log level, use parsed value
Christian Ambach [Tue, 13 Sep 2016 08:49:47 +0000 (10:49 +0200)]
python/join: do not attempt to parse log level, use parsed value

The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agopython/drs_utils: do not attempt to parse log level, use parsed value
Christian Ambach [Tue, 13 Sep 2016 08:49:47 +0000 (10:49 +0200)]
python/drs_utils: do not attempt to parse log level, use parsed value

The log level parameter can contain debug class specific entries.
Do not attempt to parse this as int, but use the values that the
debugging system already parsed

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/param add a test for LoadParm.log_level
Christian Ambach [Tue, 13 Sep 2016 09:22:38 +0000 (11:22 +0200)]
tests/param add a test for LoadParm.log_level

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4:param add log_level function to retrieve log level in Python code
Christian Ambach [Tue, 13 Sep 2016 08:48:03 +0000 (10:48 +0200)]
s4:param add log_level function to retrieve log level in Python code

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agounix_msg: Fix unix_dgram_send_queue_init
Volker Lendecke [Wed, 14 Sep 2016 05:16:26 +0000 (07:16 +0200)]
unix_msg: Fix unix_dgram_send_queue_init

We should not free a DLIST element

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 14 19:30:28 CEST 2016 on sn-devel-144

7 years agounix_msg: Fix CID 1372875 Double close
Volker Lendecke [Wed, 14 Sep 2016 05:13:38 +0000 (07:13 +0200)]
unix_msg: Fix CID 1372875 Double close

The two error callers of unix_dgram_sendq_schedule_free already run down the
sendq in the error case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
7 years agoctdb-tests: Add new public IP takeover no-op test
Martin Schwenke [Tue, 13 Sep 2016 03:48:19 +0000 (13:48 +1000)]
ctdb-tests: Add new public IP takeover no-op test

Test with DisableIPFailover=1 and with no public IP addresses
configured.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Sep 14 12:30:30 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Factor out new local daemons functions ps_ctdbd
Martin Schwenke [Tue, 13 Sep 2016 03:44:04 +0000 (13:44 +1000)]
ctdb-tests: Factor out new local daemons functions ps_ctdbd

Useful for being able to ensure that tests are doing what is expected.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-ipalloc: ipalloc_set_public_ips() can't fail
Martin Schwenke [Mon, 12 Sep 2016 06:04:18 +0000 (16:04 +1000)]
ctdb-ipalloc: ipalloc_set_public_ips() can't fail

So make it a void function.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-ipalloc: Move merged IP list creation to ipalloc()
Martin Schwenke [Mon, 12 Sep 2016 05:59:09 +0000 (15:59 +1000)]
ctdb-ipalloc: Move merged IP list creation to ipalloc()

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-ipalloc: Drop known_ips argument from merged IP list creation
Martin Schwenke [Mon, 12 Sep 2016 05:57:23 +0000 (15:57 +1000)]
ctdb-ipalloc: Drop known_ips argument from merged IP list creation

This is available in the IP allocation state.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-ipalloc: Optimise check to see if IPs can be hosted
Martin Schwenke [Mon, 12 Sep 2016 05:51:58 +0000 (15:51 +1000)]
ctdb-ipalloc: Optimise check to see if IPs can be hosted

Add an early return if there are no known IP addresses.

Also add an extra comment for clarification.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-ipalloc: Whether IPs can be hosted need not depend on merged IP list
Martin Schwenke [Mon, 12 Sep 2016 05:49:03 +0000 (15:49 +1000)]
ctdb-ipalloc: Whether IPs can be hosted need not depend on merged IP list

Merged IP list won't be available here...

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-ipalloc: Store known public IPs in IP allocation state
Martin Schwenke [Mon, 12 Sep 2016 05:41:06 +0000 (15:41 +1000)]
ctdb-ipalloc: Store known public IPs in IP allocation state

This was dropped because it wasn't used, but it will be needed again.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-packaging: Fix systemd network dependency
Martin Schwenke [Thu, 8 Sep 2016 02:28:00 +0000 (12:28 +1000)]
ctdb-packaging: Fix systemd network dependency

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ says:

  network.target has very little meaning during start-up. [...]
  Whether any network interfaces are already configured when it is
  reached is undefined. [...]

  network-online.target is a target that actively waits until the
  ne[t]work is "up",

CTDB expects to be able to bind a socket to a node address and expects
interfaces for public IP addresses to exist.  CTDB also doesn't expect
time to jump, so also wait until time is synchronised.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Steve French <sfrench@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Tested-by: Steve French <sfrench@samba.org>
7 years agoctdb-daemon: Remove NUM_DB_PRIORITIES
Amitay Isaacs [Tue, 13 Sep 2016 03:08:58 +0000 (13:08 +1000)]
ctdb-daemon: Remove NUM_DB_PRIORITIES

It's not used anymore.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-recoverd: Drop code to freeze databases from set_recovery_mode()
Amitay Isaacs [Tue, 13 Sep 2016 05:45:54 +0000 (15:45 +1000)]
ctdb-recoverd: Drop code to freeze databases from set_recovery_mode()

This function is called only once from force_election() and does not
require freezing of databases.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agos3-ctdb: Use correct db_id size in marshalling record buffer
Amitay Isaacs [Tue, 28 Jun 2016 04:35:43 +0000 (14:35 +1000)]
s3-ctdb: Use correct db_id size in marshalling record buffer

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
7 years agoctdb-common: Use correct db_id size in marshalling record buffer
Amitay Isaacs [Tue, 28 Jun 2016 04:35:11 +0000 (14:35 +1000)]
ctdb-common: Use correct db_id size in marshalling record buffer

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