vlendec/samba-autobuild/.git
6 years agoctdb-protocol: Fix marshalling for ctdb_reply_control
Amitay Isaacs [Thu, 3 Aug 2017 08:05:41 +0000 (18:05 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_req_control
Amitay Isaacs [Thu, 3 Aug 2017 08:00:24 +0000 (18:00 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_reply_control_data
Amitay Isaacs [Thu, 3 Aug 2017 06:32:55 +0000 (16:32 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_control_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_req_control_data
Amitay Isaacs [Wed, 26 Jul 2017 16:20:03 +0000 (02:20 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_control_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_reply_dmaster
Amitay Isaacs [Wed, 19 Jul 2017 05:08:21 +0000 (15:08 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_dmaster

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_req_dmaster
Amitay Isaacs [Wed, 19 Jul 2017 04:58:21 +0000 (14:58 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_dmaster

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_reply_error
Amitay Isaacs [Wed, 19 Jul 2017 04:41:45 +0000 (14:41 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_error

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_reply_call
Amitay Isaacs [Wed, 19 Jul 2017 04:36:45 +0000 (14:36 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_call

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_req_call
Amitay Isaacs [Wed, 19 Jul 2017 04:30:47 +0000 (14:30 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_call

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_req_header
Amitay Isaacs [Wed, 19 Jul 2017 01:12:08 +0000 (11:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_header

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-tests: Add compatibility test for ctdb protocol elements
Amitay Isaacs [Tue, 15 Aug 2017 05:41:26 +0000 (15:41 +1000)]
ctdb-tests: Add compatibility test for ctdb protocol elements

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-tests: Add test templates for ctdb protocol elements
Amitay Isaacs [Wed, 2 Aug 2017 09:13:52 +0000 (19:13 +1000)]
ctdb-tests: Add test templates for ctdb protocol elements

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_g_lock_list
Amitay Isaacs [Thu, 13 Jul 2017 05:27:17 +0000 (15:27 +1000)]
ctdb-protocol: Fix marshalling for ctdb_g_lock_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_g_lock
Amitay Isaacs [Thu, 13 Jul 2017 05:22:08 +0000 (15:22 +1000)]
ctdb-protocol: Fix marshalling for ctdb_g_lock

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_server_id
Amitay Isaacs [Thu, 13 Jul 2017 05:15:25 +0000 (15:15 +1000)]
ctdb-protocol: Fix marshalling for ctdb_server_id

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_disable_message
Amitay Isaacs [Thu, 13 Jul 2017 05:09:31 +0000 (15:09 +1000)]
ctdb-protocol: Fix marshalling for ctdb_disable_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_srvid_message
Amitay Isaacs [Thu, 13 Jul 2017 05:01:37 +0000 (15:01 +1000)]
ctdb-protocol: Fix marshalling for ctdb_srvid_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_election_message
Amitay Isaacs [Thu, 13 Jul 2017 04:56:50 +0000 (14:56 +1000)]
ctdb-protocol: Fix marshalling for ctdb_election_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_db_statistics
Amitay Isaacs [Wed, 26 Jul 2017 15:00:51 +0000 (01:00 +1000)]
ctdb-protocol: Fix marshalling for ctdb_db_statistics

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_key_data
Amitay Isaacs [Wed, 12 Jul 2017 09:05:13 +0000 (19:05 +1000)]
ctdb-protocol: Fix marshalling for ctdb_key_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_statistics_list
Amitay Isaacs [Wed, 26 Jul 2017 04:43:02 +0000 (14:43 +1000)]
ctdb-protocol: Fix marshalling for ctdb_statistics_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_public_ip_info
Amitay Isaacs [Wed, 12 Jul 2017 08:52:56 +0000 (18:52 +1000)]
ctdb-protocol: Fix marshalling for ctdb_public_ip_info

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_iface_list
Amitay Isaacs [Wed, 12 Jul 2017 08:45:42 +0000 (18:45 +1000)]
ctdb-protocol: Fix marshalling for ctdb_iface_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_iface
Amitay Isaacs [Wed, 12 Jul 2017 08:38:19 +0000 (18:38 +1000)]
ctdb-protocol: Fix marshalling for ctdb_iface

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_notify_data
Amitay Isaacs [Wed, 12 Jul 2017 08:29:12 +0000 (18:29 +1000)]
ctdb-protocol: Fix marshalling for ctdb_notify_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_ban_state
Amitay Isaacs [Wed, 12 Jul 2017 08:24:34 +0000 (18:24 +1000)]
ctdb-protocol: Fix marshalling for ctdb_ban_state

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_script_list
Amitay Isaacs [Wed, 12 Jul 2017 08:18:29 +0000 (18:18 +1000)]
ctdb-protocol: Fix marshalling for ctdb_script_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_script
Amitay Isaacs [Wed, 12 Jul 2017 07:59:02 +0000 (17:59 +1000)]
ctdb-protocol: Fix marshalling for ctdb_script

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_node_map
Amitay Isaacs [Thu, 6 Jul 2017 04:25:58 +0000 (14:25 +1000)]
ctdb-protocol: Fix marshalling for ctdb_node_map

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_node_and_flags
Amitay Isaacs [Thu, 6 Jul 2017 04:18:02 +0000 (14:18 +1000)]
ctdb-protocol: Fix marshalling for ctdb_node_and_flags

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_public_ip_list
Amitay Isaacs [Thu, 6 Jul 2017 04:12:57 +0000 (14:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_public_ip_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_public_ip
Amitay Isaacs [Thu, 6 Jul 2017 04:04:51 +0000 (14:04 +1000)]
ctdb-protocol: Fix marshalling for ctdb_public_ip

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_uptime
Amitay Isaacs [Thu, 6 Jul 2017 05:34:51 +0000 (15:34 +1000)]
ctdb-protocol: Fix marshalling for ctdb_uptime

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_transdb
Amitay Isaacs [Wed, 5 Jul 2017 07:51:03 +0000 (17:51 +1000)]
ctdb-protocol: Fix marshalling for ctdb_transdb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_addr_info
Amitay Isaacs [Tue, 4 Jul 2017 08:12:04 +0000 (18:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_addr_info

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_tickle_list
Amitay Isaacs [Tue, 4 Jul 2017 07:56:12 +0000 (17:56 +1000)]
ctdb-protocol: Fix marshalling for ctdb_tickle_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_tunable_list
Amitay Isaacs [Wed, 26 Jul 2017 05:30:19 +0000 (15:30 +1000)]
ctdb-protocol: Fix marshalling for ctdb_tunable_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_var_list
Amitay Isaacs [Thu, 29 Jun 2017 15:28:26 +0000 (01:28 +1000)]
ctdb-protocol: Fix marshalling for ctdb_var_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_node_flag_change
Amitay Isaacs [Thu, 29 Jun 2017 14:42:53 +0000 (00:42 +1000)]
ctdb-protocol: Fix marshalling for ctdb_node_flag_change

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_tunable
Amitay Isaacs [Thu, 29 Jun 2017 14:36:18 +0000 (00:36 +1000)]
ctdb-protocol: Fix marshalling for ctdb_tunable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_connection
Amitay Isaacs [Thu, 29 Jun 2017 14:31:21 +0000 (00:31 +1000)]
ctdb-protocol: Fix marshalling for ctdb_connection

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_sock_addr
Amitay Isaacs [Tue, 18 Jul 2017 07:12:37 +0000 (17:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_sock_addr

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_traverse_all_ext
Amitay Isaacs [Thu, 29 Jun 2017 14:24:40 +0000 (00:24 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_all_ext

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_traverse_start_ext
Amitay Isaacs [Thu, 29 Jun 2017 14:16:58 +0000 (00:16 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_start_ext

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_traverse_all
Amitay Isaacs [Thu, 29 Jun 2017 13:56:02 +0000 (23:56 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_all

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_traverse_start
Amitay Isaacs [Thu, 29 Jun 2017 13:48:01 +0000 (23:48 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_start

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_rec_buffer
Amitay Isaacs [Thu, 29 Jun 2017 13:41:08 +0000 (23:41 +1000)]
ctdb-protocol: Fix marshalling for ctdb_rec_buffer

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Use ctdb_rec_buffer_traverse to calaculate length of data
Amitay Isaacs [Thu, 3 Aug 2017 07:50:48 +0000 (17:50 +1000)]
ctdb-protocol: Use ctdb_rec_buffer_traverse to calaculate length of data

If the parser function is NULL, ctdb_rec_buffer_traverse will return the
amount of data used by ctdb_rec_data structures.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_rec_data
Amitay Isaacs [Thu, 29 Jun 2017 13:27:33 +0000 (23:27 +1000)]
ctdb-protocol: Fix marshalling for ctdb_rec_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Drop header argument to ctdb_rec_data_pull_data()
Amitay Isaacs [Wed, 2 Aug 2017 07:35:33 +0000 (17:35 +1000)]
ctdb-protocol: Drop header argument to ctdb_rec_data_pull_data()

Since header is always set to NULL, there is no need to pass header as
an argument.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_ltdb_header
Amitay Isaacs [Thu, 29 Jun 2017 12:39:41 +0000 (22:39 +1000)]
ctdb-protocol: Fix marshalling for ctdb_ltdb_header

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_pulldb_ext
Amitay Isaacs [Thu, 29 Jun 2017 09:55:15 +0000 (19:55 +1000)]
ctdb-protocol: Fix marshalling for ctdb_pulldb_ext

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_pulldb
Amitay Isaacs [Thu, 29 Jun 2017 09:50:21 +0000 (19:50 +1000)]
ctdb-protocol: Fix marshalling for ctdb_pulldb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_dbid_map
Amitay Isaacs [Thu, 29 Jun 2017 09:33:04 +0000 (19:33 +1000)]
ctdb-protocol: Fix marshalling for ctdb_dbid_map

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for ctdb_dbid
Amitay Isaacs [Thu, 6 Jul 2017 07:53:24 +0000 (17:53 +1000)]
ctdb-protocol: Add marshalling for ctdb_dbid

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_vnn_map
Amitay Isaacs [Thu, 29 Jun 2017 09:04:56 +0000 (19:04 +1000)]
ctdb-protocol: Fix marshalling for ctdb_vnn_map

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for ctdb_statistics
Amitay Isaacs [Wed, 26 Jul 2017 02:50:12 +0000 (12:50 +1000)]
ctdb-protocol: Fix marshalling for ctdb_statistics

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-tests: Add compatibility test for protocol data types
Amitay Isaacs [Mon, 14 Aug 2017 06:28:16 +0000 (16:28 +1000)]
ctdb-tests: Add compatibility test for protocol data types

This patch prepares for testing old and new marshalling codes for
various data types to ensure backward compatibility.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for ctdb_latency_counter
Amitay Isaacs [Wed, 26 Jul 2017 02:49:51 +0000 (12:49 +1000)]
ctdb-protocol: Add marshalling for ctdb_latency_counter

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for tdb_data with size
Amitay Isaacs [Thu, 29 Jun 2017 08:41:43 +0000 (18:41 +1000)]
ctdb-protocol: Add marshalling for tdb_data with size

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for tdb_data
Amitay Isaacs [Fri, 30 Jun 2017 07:15:47 +0000 (17:15 +1000)]
ctdb-protocol: Fix marshalling for tdb_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Move tdb_data marshalling code
Amitay Isaacs [Mon, 31 Jul 2017 06:48:58 +0000 (16:48 +1000)]
ctdb-protocol: Move tdb_data marshalling code

There is no change in the code.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add padding data type to handle structure padding
Amitay Isaacs [Thu, 6 Jul 2017 07:52:25 +0000 (17:52 +1000)]
ctdb-protocol: Add padding data type to handle structure padding

This takes care of alignment sizes, so that it works on both 32-bit and
64-bit architectures.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for struct timeval
Amitay Isaacs [Thu, 6 Jul 2017 04:48:38 +0000 (14:48 +1000)]
ctdb-protocol: Add marshalling for struct timeval

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for pid_t
Amitay Isaacs [Thu, 29 Jun 2017 12:18:27 +0000 (22:18 +1000)]
ctdb-protocol: Fix marshalling for pid_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for a string with length
Amitay Isaacs [Thu, 20 Apr 2017 02:45:24 +0000 (12:45 +1000)]
ctdb-protocol: Fix marshalling for a string with length

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for a string
Amitay Isaacs [Thu, 29 Jun 2017 08:48:51 +0000 (18:48 +1000)]
ctdb-protocol: Fix marshalling for a string

Always return NULL terminated strings.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for fixed size char array
Amitay Isaacs [Thu, 6 Jul 2017 08:05:04 +0000 (18:05 +1000)]
ctdb-protocol: Add marshalling for fixed size char array

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for bool
Amitay Isaacs [Thu, 29 Jun 2017 14:11:45 +0000 (00:11 +1000)]
ctdb-protocol: Add marshalling for bool

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for double
Amitay Isaacs [Thu, 29 Jun 2017 12:16:56 +0000 (22:16 +1000)]
ctdb-protocol: Fix marshalling for double

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for uint64_t
Amitay Isaacs [Thu, 29 Jun 2017 12:15:43 +0000 (22:15 +1000)]
ctdb-protocol: Fix marshalling for uint64_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for uint32_t
Amitay Isaacs [Thu, 29 Jun 2017 12:14:23 +0000 (22:14 +1000)]
ctdb-protocol: Fix marshalling for uint32_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for int32_t
Amitay Isaacs [Thu, 29 Jun 2017 12:09:26 +0000 (22:09 +1000)]
ctdb-protocol: Fix marshalling for int32_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for uint16_t
Amitay Isaacs [Wed, 12 Jul 2017 08:38:00 +0000 (18:38 +1000)]
ctdb-protocol: Add marshalling for uint16_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Add marshalling for uint8_t
Amitay Isaacs [Thu, 29 Jun 2017 12:24:20 +0000 (22:24 +1000)]
ctdb-protocol: Add marshalling for uint8_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-tests: Add test templates for various data types
Amitay Isaacs [Thu, 27 Jul 2017 07:38:47 +0000 (17:38 +1000)]
ctdb-tests: Add test templates for various data types

These test templates will use new style of len/push/pull functions.
The differences in the new style of marshalling functions are:

1. len/push functions will be passed pointer to a value instead of the value
2. push/pull functions will additionally return the number of bytes consumed

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Fix marshalling for GET_DB_SEQNUM control
Amitay Isaacs [Wed, 26 Jul 2017 15:15:34 +0000 (01:15 +1000)]
ctdb-protocol: Fix marshalling for GET_DB_SEQNUM control

In the control request, database id which is a 32-bit integer is sent
on wire as a 64-bit integer rather than a 32-bit integer.  If we
convert the database id to 64-bit integer before sending, the order of
32-bits with database id will vary depending on the endian-ness.

Instead send the database id as first 32-bits and zeros as next 32-bits.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-tests: Reorganize protocol tests
Amitay Isaacs [Fri, 14 Jul 2017 07:09:57 +0000 (17:09 +1000)]
ctdb-tests: Reorganize protocol tests

This patch splits the protocol tests from:
  protocol_types_test.c
  protocol_client_test.c

and creates the following files:

  protocol_common.[ch]       - common code for data types
  protocol_common_ctdb.[ch]  - common code for ctdb protocol elements
  protocol_common_event.[ch] - common code for eventd protocol elements
  protocol_basic_test.c      - basic data types
  protocol_types_test.c      - ctdb data types
  protocol_ctdb_test.c       - ctdb protocol
  protocol_event_test.c      - eventd protocol

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoctdb-protocol: Separate marshalling for basic data types
Amitay Isaacs [Thu, 13 Jul 2017 07:28:42 +0000 (17:28 +1000)]
ctdb-protocol: Separate marshalling for basic data types

This splits protocol_types.c and creates new protocol_basic.c.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
6 years agoldb: Add tests for indexed and unindexed search expressions
Andrew Bartlett [Thu, 24 Aug 2017 05:01:14 +0000 (17:01 +1200)]
ldb: Add tests for indexed and unindexed search expressions

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 30 14:58:32 CEST 2017 on sn-devel-144

6 years agoldb: Fix tests to call the parent tearDown(), not setUp in tearDown
Andrew Bartlett [Thu, 24 Aug 2017 04:29:58 +0000 (16:29 +1200)]
ldb: Fix tests to call the parent tearDown(), not setUp in tearDown

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agopassword_hash: Make a common failure with "password hash gpg key ids" clearer
Andrew Bartlett [Mon, 21 Aug 2017 05:01:56 +0000 (17:01 +1200)]
password_hash: Make a common failure with "password hash gpg key ids" clearer

This drove me to strace before I understood what it really meant.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agodsdb: Add comment showing where the normal password rules are applied
Andrew Bartlett [Wed, 9 Aug 2017 22:13:24 +0000 (10:13 +1200)]
dsdb: Add comment showing where the normal password rules are applied

This looks like a footnote, but is actually where the default password rules are applied.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agos4/torture: make --unclist active with smb2 testcases
Peter Somogyi [Tue, 29 Aug 2017 09:15:11 +0000 (11:15 +0200)]
s4/torture: make --unclist active with smb2 testcases

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

Signed-off-by: Peter Somogyi <psomogyi@hu.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 30 00:16:51 CEST 2017 on sn-devel-144

6 years agoctdb-tests: Add sock daemon test for do_fork
Martin Schwenke [Wed, 23 Aug 2017 10:32:29 +0000 (20:32 +1000)]
ctdb-tests: Add sock daemon test for do_fork

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Aug 29 15:03:33 CEST 2017 on sn-devel-144

6 years agoctdb-tests: Add sock daemon test for create_session
Martin Schwenke [Wed, 16 Aug 2017 09:15:32 +0000 (19:15 +1000)]
ctdb-tests: Add sock daemon test for create_session

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-common: Allow sock_daemon to daemonise during startup
Martin Schwenke [Wed, 16 Aug 2017 03:52:08 +0000 (13:52 +1000)]
ctdb-common: Allow sock_daemon to daemonise during startup

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Add a sock_daemon test for PID file contention
Martin Schwenke [Wed, 16 Aug 2017 03:31:04 +0000 (13:31 +1000)]
ctdb-tests: Add a sock_daemon test for PID file contention

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-common: Move PID file creation to sock_daemon_run_send()
Amitay Isaacs [Mon, 28 Aug 2017 08:39:40 +0000 (18:39 +1000)]
ctdb-common: Move PID file creation to sock_daemon_run_send()

Only create PID file when actually starting the daemon, rather than
when setting up the context.  This will facilitate future changes.

Tweak test to confirm that PID file is no longer created during setup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Add improved PID file check to test2
Martin Schwenke [Mon, 28 Aug 2017 06:00:53 +0000 (16:00 +1000)]
ctdb-tests: Add improved PID file check to test2

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-tests: Add comments describing sock daemon tests
Martin Schwenke [Wed, 16 Aug 2017 07:37:16 +0000 (17:37 +1000)]
ctdb-tests: Add comments describing sock daemon tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-daemon: Use become_daemon() instead of custom code
Martin Schwenke [Tue, 15 Aug 2017 02:53:02 +0000 (12:53 +1000)]
ctdb-daemon: Use become_daemon() instead of custom code

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoctdb-daemon: Narrow a #include
Martin Schwenke [Tue, 15 Aug 2017 02:51:59 +0000 (12:51 +1000)]
ctdb-daemon: Narrow a #include

Only time.h is needed here, not all of samba_util.h.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agoldb_tdb: Rework ltdb_modify_internal() to use ltdb_search_dn1() internally
Andrew Bartlett [Wed, 16 Aug 2017 00:51:09 +0000 (12:51 +1200)]
ldb_tdb: Rework ltdb_modify_internal() to use ltdb_search_dn1() internally

This avoids duplicate code and allows us to use the allocation-avoiding
LDB_UNPACK_DATA_FLAG_NO_DATA_ALLOC flag.

We can not use LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC as el2->values
is talloc_realloc()ed in the routine.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 29 11:13:50 CEST 2017 on sn-devel-144

6 years agoldb: Add LDB_UNPACK_DATA_FLAG_NO_ATTRS
Andrew Bartlett [Thu, 10 Aug 2017 23:31:05 +0000 (11:31 +1200)]
ldb: Add LDB_UNPACK_DATA_FLAG_NO_ATTRS

This will allow us to avoid a full unpack in situations where we just want to confirm
if the DN exists

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agoselftest: Use a unique(ish) OU for every run of getnc_unpriv
Tim Beale [Thu, 17 Aug 2017 00:30:30 +0000 (12:30 +1200)]
selftest: Use a unique(ish) OU for every run of getnc_unpriv

An intermittent problem I noticed with tests in the past is that the
setup can fail to create the base OU because it already exists.
I believe this is because the previous testenv DC has replicated out the
test object, but not its deletion at the point that the next testenv DC
starts running the test.

This only seemed to happen very occassionally (I haven't seen it
happen with getnc_unpriv yet, but I also haven't run it through the
autobuild yet).

Using same randomness in the test OU should help avoid this sort of
problem, and it matches what some other replication tests do.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agos4-drsuapi/selftest: Add extra tests for invalid DNs
Tim Beale [Wed, 16 Aug 2017 23:36:24 +0000 (11:36 +1200)]
s4-drsuapi/selftest: Add extra tests for invalid DNs

Add some test cases to check for requests for invalid/non-existent DNs.
This exercises the first return case added in commit:
  s4-drsuapi: Refuse to replicate an NC is that not actually an NC

I've also updated the error code returned here to match Windows.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agoselftest: Update getnc_unpriv tests to pass against Samba
Tim Beale [Wed, 16 Aug 2017 03:00:31 +0000 (15:00 +1200)]
selftest: Update getnc_unpriv tests to pass against Samba

In general Windows seems to return BAD_DN rather than ACCESS_DENIED for
an unprivileged user. In the the long-term, it's unrealistic to think
that Samba and Windows will agree exactly on every error code returned.
So for the tests to be maintainable and pass against Windows and Samba,
they need to handle differences in expected errors. To get around this
problem, I've changed the expected_error to be a set, so that multiple
error codes (one for Microsoft, one for Samba) can be specified for each
test case. This approach also highlights the cases where Microsoft and
Samba currently differ.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agos4-drsuapi: Set getnc_state *after* we've checked request is valid
Tim Beale [Wed, 16 Aug 2017 04:20:37 +0000 (16:20 +1200)]
s4-drsuapi: Set getnc_state *after* we've checked request is valid

We were creating the getnc_state (and storing it on the connection)
before we had done some basic checks that the request was valid. If the
request was not valid and we returned early with an error, then the
partially-initialized getnc_state was left hanging on the connection.
The next request that got sent on the connection would try to use this,
rather than creating a new getnc_state from scratch.

The main side-effect of this was if you sent an invalid GetNCChanges
request twice, then it could be rejected the first time and accepted the
second time.

Note that although an invalid request was accepted, it would typically
not return any objects, so it would not actually leak any secure
information.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agoselftest: GetNCChanges can 'accept' a repeated bad request
Tim Beale [Mon, 14 Aug 2017 03:31:08 +0000 (15:31 +1200)]
selftest: GetNCChanges can 'accept' a repeated bad request

In theory, if we send the exact same rejected request again, we should
get the same response back from the DC. However, we don't - the request
is accepted if we send it a second time.

This patch updates the repl_rodc test to demonstrate the problem (which
now causes the test to fail).

Note that although the bad GetNCChanges request is not rejected outright,
the response that gets sent back is empty - it has no objects in it, so
it's not an actual security hole. It is annoying problem for writing
self-tests though.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>