samba.git
4 years agos4-rpc_server: Get the real initial uid for selftest
Andreas Schneider [Wed, 4 Nov 2015 09:15:13 +0000 (10:15 +0100)]
s4-rpc_server: Get the real initial uid for selftest

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agoselftest: Start smbd, nmbd and winbindd as root
Andreas Schneider [Fri, 30 Oct 2015 13:30:58 +0000 (14:30 +0100)]
selftest: Start smbd, nmbd and winbindd as root

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3-lib: Get the real initial uid for selftest
Andreas Schneider [Fri, 30 Oct 2015 13:31:33 +0000 (14:31 +0100)]
s3-lib: Get the real initial uid for selftest

We need this that if we connect as the user who started smbd, we are
able to perform privileged operation like creating a user.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agovfs_offline: add documentation
Uri Simchoni [Wed, 4 Nov 2015 19:18:20 +0000 (21:18 +0200)]
vfs_offline: add documentation

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov  5 01:22:48 CET 2015 on sn-devel-104

4 years agovfs_offline: add a blackbox test
Uri Simchoni [Wed, 4 Nov 2015 10:06:03 +0000 (12:06 +0200)]
vfs_offline: add a blackbox test

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs_offline: add vfs_offline module
Uri Simchoni [Wed, 4 Nov 2015 06:44:29 +0000 (08:44 +0200)]
vfs_offline: add vfs_offline module

This module marks all file in the share as offline.
It can be useful for shares mounted on top of a remote file
system (either through a samba VFS module or via FUSE).

Offline files change the behavior of Windows explorer, and
prevent it from peeking inside folders just for the sake of
drawing a nice icon of them. This greatly reduces the number
of requests Windows Explorer makes, and improves user experience
when dealing with remote file systems.

The offline bit also has an effect on the behavior of Windows
redirector.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: rpcclient: Prevent null ptr access by returning error if no creds available
Noel Power [Mon, 2 Nov 2015 09:59:12 +0000 (09:59 +0000)]
s3: rpcclient: Prevent null ptr access by returning error if no creds available

Prevent rpccli_netlogon_password_logon being called with 'NULL' credentials.

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3: winbind: Prevent null ptr access by returning error if no creds available
Noel Power [Thu, 22 Oct 2015 11:37:17 +0000 (12:37 +0100)]
s3: winbind: Prevent null ptr access by returning error if no creds available

Prevent rpccli_netlogon_network_logon/rpccli_netlogon_password_logon
being called with 'NULL' credentials

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing...
Jeremy Allison [Wed, 4 Nov 2015 17:34:57 +0000 (09:34 -0800)]
s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing them.

Otherwise a create that should have failed may succeed.

Based on an original patch from John Mulligan <phlogistonjohn@asynchrono.us>
and comments from Uri Simchoni <uri@samba.org>

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Nov  4 22:14:22 CET 2015 on sn-devel-104

4 years agowafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM()
Stefan Metzmacher [Thu, 27 Aug 2015 08:47:05 +0000 (10:47 +0200)]
wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM()

All prerequisite libraries of CHECK_BUNDLED_SYSTEM[_PKG](onlyif='lib1 lib2')
need to be checked before.

That means conf.env['FOUND_SYSTEMLIB_lib1'] and conf.env['FOUND_SYSTEMLIB_lib2']
need to exist independed of its value (True or False). Otherwise this is a logic error.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov  4 18:38:18 CET 2015 on sn-devel-104

4 years agotests: Add tests for net ads (join|leave)
Andreas Schneider [Tue, 20 Oct 2015 13:54:39 +0000 (15:54 +0200)]
tests: Add tests for net ads (join|leave)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Nov  4 15:35:57 CET 2015 on sn-devel-104

4 years agoctdb-build: Add ctdb/ directory to include path for top-level build
Amitay Isaacs [Thu, 29 Oct 2015 07:28:29 +0000 (18:28 +1100)]
ctdb-build: Add ctdb/ directory to include path for top-level build

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Nov  4 03:52:27 CET 2015 on sn-devel-104

4 years agoctdb-include: Use new protocol definitions
Amitay Isaacs [Thu, 29 Oct 2015 06:51:52 +0000 (17:51 +1100)]
ctdb-include: Use new protocol definitions

This gets rid of the duplicate definitions from ctdb_protocol.h.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-protocol: Rename G_LOCK_READ/WRITE to CTDB_G_LOCK_READ/WRITE
Amitay Isaacs [Thu, 29 Oct 2015 07:37:42 +0000 (18:37 +1100)]
ctdb-protocol: Rename G_LOCK_READ/WRITE to CTDB_G_LOCK_READ/WRITE

to avoid clash with definitions from source3/include/g_lock.h.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-client: Rename g_lock datatypes as per new protocol.h
Amitay Isaacs [Thu, 29 Oct 2015 06:55:35 +0000 (17:55 +1100)]
ctdb-client: Rename g_lock datatypes as per new protocol.h

struct server_id => ctdb_server_id
enum g_lock_type => ctdb_g_lock_type
struct g_lock_rec => ctdb_g_lock
struct g_lock_recs => ctdb_g_lock_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Remove unused definitions
Amitay Isaacs [Thu, 29 Oct 2015 06:36:23 +0000 (17:36 +1100)]
ctdb-include: Remove unused definitions

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-tools: Use replace headers instead of system headers
Amitay Isaacs [Wed, 28 Oct 2015 08:52:02 +0000 (19:52 +1100)]
ctdb-tools: Use replace headers instead of system headers

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Remove explicit include of ctdb_protocol.h
Amitay Isaacs [Wed, 28 Oct 2015 08:52:53 +0000 (19:52 +1100)]
ctdb-daemon: Remove explicit include of ctdb_protocol.h

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_get_ifaces to ctdb_iface_list_old
Amitay Isaacs [Wed, 28 Oct 2015 08:43:48 +0000 (19:43 +1100)]
ctdb-daemon: Rename struct ctdb_control_get_ifaces to ctdb_iface_list_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_public_ip_info to ctdb_public_ip_info_old
Amitay Isaacs [Wed, 28 Oct 2015 08:39:51 +0000 (19:39 +1100)]
ctdb-daemon: Rename struct ctdb_control_public_ip_info to ctdb_public_ip_info_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_iface_info to ctdb_iface
Amitay Isaacs [Wed, 28 Oct 2015 08:37:17 +0000 (19:37 +1100)]
ctdb-daemon: Rename struct ctdb_control_iface_info to ctdb_iface

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_transdb to ctdb_transdb
Amitay Isaacs [Wed, 28 Oct 2015 08:22:23 +0000 (19:22 +1100)]
ctdb-daemon: Rename struct ctdb_control_transdb to ctdb_transdb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_set_tunable to ctdb_tunable_old
Amitay Isaacs [Wed, 28 Oct 2015 08:18:02 +0000 (19:18 +1100)]
ctdb-daemon: Rename struct ctdb_control_set_tunable to ctdb_tunable_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_pulldb to ctdb_pulldb
Amitay Isaacs [Wed, 28 Oct 2015 08:10:53 +0000 (19:10 +1100)]
ctdb-daemon: Rename struct ctdb_control_pulldb to ctdb_pulldb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_gratious_arp to ctdb_addr_info_old
Amitay Isaacs [Thu, 29 Oct 2015 03:47:54 +0000 (14:47 +1100)]
ctdb-daemon: Rename struct ctdb_control_gratious_arp to ctdb_addr_info_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_ip_iface to ctdb_addr_info_old
Amitay Isaacs [Thu, 29 Oct 2015 03:46:21 +0000 (14:46 +1100)]
ctdb-daemon: Rename struct ctdb_control_ip_iface to ctdb_addr_info_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_tunable to ctdb_tunable_list
Amitay Isaacs [Wed, 28 Oct 2015 07:51:22 +0000 (18:51 +1100)]
ctdb-daemon: Rename struct ctdb_tunable to ctdb_tunable_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_tcp_tickle_list to ctdb_tickle_list_old
Amitay Isaacs [Wed, 28 Oct 2015 07:44:19 +0000 (18:44 +1100)]
ctdb-daemon: Rename struct ctdb_control_tcp_tickle_list to ctdb_tickle_list_old

Also remove unnecessary struct ctdb_tcp_wire_array.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct srvid_request_data to ctdb_disable_message
Amitay Isaacs [Wed, 28 Oct 2015 07:23:13 +0000 (18:23 +1100)]
ctdb-daemon: Rename struct srvid_request_data to ctdb_disable_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct srvid_request to ctdb_srvid_message
Amitay Isaacs [Thu, 29 Oct 2015 03:32:49 +0000 (14:32 +1100)]
ctdb-daemon: Rename struct srvid_request to ctdb_srvid_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_ban_time to ctdb_ban_state
Amitay Isaacs [Wed, 28 Oct 2015 07:18:33 +0000 (18:18 +1100)]
ctdb-daemon: Rename struct ctdb_ban_time to ctdb_ban_state

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_tcp_connection to ctdb_connection
Amitay Isaacs [Wed, 28 Oct 2015 07:14:21 +0000 (18:14 +1100)]
ctdb-daemon: Rename struct ctdb_tcp_connection to ctdb_connection

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_control_tcp_addr to ctdb_connection
Amitay Isaacs [Thu, 29 Oct 2015 03:25:34 +0000 (14:25 +1100)]
ctdb-daemon: Rename struct ctdb_control_tcp_addr to ctdb_connection

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_server_id_list to ctdb_client_id_list_old
Amitay Isaacs [Thu, 29 Oct 2015 03:16:45 +0000 (14:16 +1100)]
ctdb-daemon: Rename struct ctdb_server_id_list to ctdb_client_id_list_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_server_id to ctdb_client_id
Amitay Isaacs [Wed, 28 Oct 2015 06:47:03 +0000 (17:47 +1100)]
ctdb-daemon: Rename struct ctdb_server_id to ctdb_client_id

This is to avoid clash with samba structure server_id.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename enum ctdb_server_id_type to ctdb_client_id_type
Amitay Isaacs [Thu, 29 Oct 2015 03:12:11 +0000 (14:12 +1100)]
ctdb-daemon: Rename enum ctdb_server_id_type to ctdb_client_id_type

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_dbid_map to ctdb_dbid_map_old
Amitay Isaacs [Thu, 29 Oct 2015 06:46:05 +0000 (17:46 +1100)]
ctdb-daemon: Rename struct ctdb_dbid_map to ctdb_dbid_map_old

Match struct ctdb_dbid as per protocol/protocol.h

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Remove struct ctdb_client_notify_deregister
Amitay Isaacs [Wed, 28 Oct 2015 06:47:03 +0000 (17:47 +1100)]
ctdb-daemon: Remove struct ctdb_client_notify_deregister

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_client_notify_register to ctdb_notify_data_old
Amitay Isaacs [Wed, 28 Oct 2015 06:43:20 +0000 (17:43 +1100)]
ctdb-daemon: Rename struct ctdb_client_notify_register to ctdb_notify_data_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Remove unused structure definitions
Amitay Isaacs [Wed, 28 Oct 2015 06:36:14 +0000 (17:36 +1100)]
ctdb-include: Remove unused structure definitions

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_iface to ctdb_interface
Amitay Isaacs [Wed, 28 Oct 2015 06:34:24 +0000 (17:34 +1100)]
ctdb-daemon: Rename struct ctdb_iface to ctdb_interface

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_db_statistics to ctdb_db_statistics_old
Amitay Isaacs [Thu, 29 Oct 2015 06:33:09 +0000 (17:33 +1100)]
ctdb-daemon: Rename struct ctdb_db_statistics to ctdb_db_statistics_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_statistics_wire to ctdb_statistics_list_old
Amitay Isaacs [Wed, 28 Oct 2015 09:09:40 +0000 (20:09 +1100)]
ctdb-daemon: Rename struct ctdb_statistics_wire to ctdb_statistics_list_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_rec_data to ctdb_rec_data_old
Amitay Isaacs [Thu, 29 Oct 2015 06:30:30 +0000 (17:30 +1100)]
ctdb-daemon: Rename struct ctdb_rec_data to ctdb_rec_data_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct latency_counter to ctdb_latency_counter
Amitay Isaacs [Wed, 28 Oct 2015 06:18:24 +0000 (17:18 +1100)]
ctdb-daemon: Rename struct latency_counter to ctdb_latency_counter

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_all_public_ips to ctdb_public_ip_list_old
Amitay Isaacs [Wed, 28 Oct 2015 06:16:24 +0000 (17:16 +1100)]
ctdb-daemon: Rename struct ctdb_all_public_ips to ctdb_public_ip_list_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_public_ip_list to public_ip_list
Amitay Isaacs [Wed, 28 Oct 2015 06:10:54 +0000 (17:10 +1100)]
ctdb-daemon: Rename struct ctdb_public_ip_list to public_ip_list

A private structure need not have ctdb_ prefix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_node_map to ctdb_node_map_old
Amitay Isaacs [Thu, 29 Oct 2015 06:22:48 +0000 (17:22 +1100)]
ctdb-daemon: Rename struct ctdb_node_map to ctdb_node_map_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Remove unnecessary typedefs
Amitay Isaacs [Wed, 28 Oct 2015 05:58:02 +0000 (16:58 +1100)]
ctdb-include: Remove unnecessary typedefs

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_req_keepalive to ctdb_req_keepalive_old
Amitay Isaacs [Thu, 29 Oct 2015 05:45:41 +0000 (16:45 +1100)]
ctdb-daemon: Rename struct ctdb_req_keepalive to ctdb_req_keepalive_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_reply_control to ctdb_reply_control_old
Amitay Isaacs [Thu, 29 Oct 2015 05:44:08 +0000 (16:44 +1100)]
ctdb-daemon: Rename struct ctdb_reply_control to ctdb_reply_control_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_req_control to ctdb_req_control_old
Amitay Isaacs [Thu, 29 Oct 2015 05:42:05 +0000 (16:42 +1100)]
ctdb-daemon: Rename struct ctdb_req_control to ctdb_req_control_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_req_message to ctdb_req_message_old
Amitay Isaacs [Thu, 29 Oct 2015 05:36:30 +0000 (16:36 +1100)]
ctdb-daemon: Rename struct ctdb_req_message to ctdb_req_message_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_reply_dmaster to ctdb_reply_dmaster_old
Amitay Isaacs [Thu, 29 Oct 2015 05:34:01 +0000 (16:34 +1100)]
ctdb-daemon: Rename struct ctdb_reply_dmaster to ctdb_reply_dmaster_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_req_dmaster to ctdb_req_dmaster_old
Amitay Isaacs [Thu, 29 Oct 2015 05:32:09 +0000 (16:32 +1100)]
ctdb-daemon: Rename struct ctdb_req_dmaster to ctdb_req_dmaster_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_reply_error to ctdb_reply_error_old
Amitay Isaacs [Thu, 29 Oct 2015 05:30:31 +0000 (16:30 +1100)]
ctdb-daemon: Rename struct ctdb_reply_error to ctdb_reply_error_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_reply_call to ctdb_reply_call_old
Amitay Isaacs [Thu, 29 Oct 2015 05:29:01 +0000 (16:29 +1100)]
ctdb-daemon: Rename struct ctdb_reply_call to ctdb_reply_call_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_req_call to ctdb_req_call_old
Amitay Isaacs [Thu, 29 Oct 2015 05:26:29 +0000 (16:26 +1100)]
ctdb-daemon: Rename struct ctdb_req_call to ctdb_req_call_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename enum ctdb_eventscript_call to ctdb_event
Amitay Isaacs [Wed, 28 Oct 2015 05:54:10 +0000 (16:54 +1100)]
ctdb-daemon: Rename enum ctdb_eventscript_call to ctdb_event

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_scripts_wire to ctdb_script_list_old
Amitay Isaacs [Wed, 28 Oct 2015 09:02:45 +0000 (20:02 +1100)]
ctdb-daemon: Rename struct ctdb_scripts_wire to ctdb_script_list_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-daemon: Rename struct ctdb_script_wire to ctdb_script
Amitay Isaacs [Wed, 28 Oct 2015 05:49:47 +0000 (16:49 +1100)]
ctdb-daemon: Rename struct ctdb_script_wire to ctdb_script

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoChanging log level of two entries to DBG_NOTICE
Marc Muehlfeld [Tue, 3 Nov 2015 09:09:13 +0000 (10:09 +0100)]
Changing log level of two entries to DBG_NOTICE

On domain members using RFC2307, machine acccounts without an uidNumber
attribute are not retrieved via idmap_ad. This leads to many of the following
two error messages:
   Username DOMAIN\machineaccountname$ is invalid on this system
and
   Failed to map kerberos principal to system user (NT_STATUS_LOGON_FAILURE)
Machine accounts don't have an uidNumber attribute, if not set manually. To
avoid flooding the logs, setting message from debug level 1 to DBG_NOTICE.

Bugreport: https://bugzilla.samba.org/show_bug.cgi?id=9912

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov  4 00:46:15 CET 2015 on sn-devel-104

4 years agobackupkey: Fix CID 1338078 (RESOURCE_LEAK)
Volker Lendecke [Tue, 3 Nov 2015 11:00:56 +0000 (12:00 +0100)]
backupkey: Fix CID 1338078 (RESOURCE_LEAK)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonotifyd: Do not include CTDB headers without CLUSTER_SUPPORT enabled
Amitay Isaacs [Tue, 3 Nov 2015 01:14:41 +0000 (12:14 +1100)]
notifyd: Do not include CTDB headers without CLUSTER_SUPPORT enabled

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov  3 15:15:56 CET 2015 on sn-devel-104

4 years agosmbd: Do not include CTDB headers without CLUSTER_SUPPORT enabled
Amitay Isaacs [Tue, 3 Nov 2015 01:37:38 +0000 (12:37 +1100)]
smbd: Do not include CTDB headers without CLUSTER_SUPPORT enabled

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agos4.torture.smb2/session : Replace CHECK_VAL with torture macros
Anoop C S [Tue, 13 Oct 2015 08:55:20 +0000 (14:25 +0530)]
s4.torture.smb2/session : Replace CHECK_VAL with torture macros

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov  3 03:17:14 CET 2015 on sn-devel-104

4 years agos3:smb2_server: make the logic of SMB2_CANCEL DLIST_REMOVE() clearer
Stefan Metzmacher [Mon, 2 Nov 2015 12:40:24 +0000 (13:40 +0100)]
s3:smb2_server: make the logic of SMB2_CANCEL DLIST_REMOVE() clearer

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agomanpage: corrected small typo error
YvanM [Sun, 1 Nov 2015 10:53:45 +0000 (11:53 +0100)]
manpage: corrected small typo error

Corrected mistakes, probably comming from a too fast
"copy and paste", in the smb.conf manpage.

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

Signed-off-by: YvanM <yvan.masson@openmailbox.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Nov  2 14:43:15 CET 2015 on sn-devel-104

4 years agobuild:wafsamba: Remove the now unneeded special treatment of rpath flags
Thomas Nagy [Sat, 31 Oct 2015 13:39:35 +0000 (14:39 +0100)]
build:wafsamba: Remove the now unneeded special treatment of rpath flags

The flags parsing fixes were backported to waf 1.5 from waf 1.8. There is no reason
to keep the flags parsing fixes in Samba.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov  2 03:35:31 CET 2015 on sn-devel-104

4 years agobuild:wafsamba: Update waf/wafadmin/Tools/config_c.py from upstream
Thomas Nagy [Sat, 31 Oct 2015 13:38:10 +0000 (14:38 +0100)]
build:wafsamba: Update waf/wafadmin/Tools/config_c.py from upstream

The upstream version features the flags processing fixes present in Waf 1.8.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agobuildtools: Ignore exact Python version for ABI checking
Petr Viktorin [Fri, 14 Aug 2015 10:17:48 +0000 (12:17 +0200)]
buildtools: Ignore exact Python version for ABI checking

Utilities for Python libraries are built for a specific Python
version. Starting with Python 3, the Python version is recorded
in the shared library filename as an ABI tag, e.g. "pytalloc.cpython-34m.so.
The exact version doesn't matter for Samba's ABI check.
Replace the ABI tag with a simpler one that just records the major
version of Python.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Nov  1 01:09:06 CET 2015 on sn-devel-104

4 years agos4:heimdal_build: also use check_system_heimdal_lib() for "com_err"
Stefan Metzmacher [Thu, 27 Aug 2015 09:44:23 +0000 (11:44 +0200)]
s4:heimdal_build: also use check_system_heimdal_lib() for "com_err"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agos4:heimdal_build: handle CHECK_BUNDLED_SYSTEM returning False in check_system_heimdal...
Stefan Metzmacher [Thu, 27 Aug 2015 09:40:09 +0000 (11:40 +0200)]
s4:heimdal_build: handle CHECK_BUNDLED_SYSTEM returning False in check_system_heimdal_lib()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agoscript/autobuild.py: exclude !pytalloc-util and !pyldb-util from bundling in samba...
Stefan Metzmacher [Thu, 27 Aug 2015 09:05:08 +0000 (11:05 +0200)]
script/autobuild.py: exclude !pytalloc-util and !pyldb-util from bundling in samba-libs

We need to make sure we're really not bundling any of these.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agos3: Remove unnecessary __P() macro
Felix Janda [Thu, 22 Oct 2015 10:42:07 +0000 (12:42 +0200)]
s3: Remove unnecessary __P() macro

__P() is used for compatibility with old K&R C compilers. With
ANSI C this macro has no effect. Since we are assuming ANSI C in
the rest of the code, the macro is not necessary.

This fixes a compilation error with musl libc because of undeclared
__P().

Signed-off-by: Felix Janda <felix.janda@posteo.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib/replace: Make sure that replacement strto[u]ll does not reset errno unexpectedly
Felix Janda [Thu, 22 Oct 2015 10:37:55 +0000 (12:37 +0200)]
lib/replace: Make sure that replacement strto[u]ll does not reset errno unexpectedly

Fix the replacement functions for strtoll and strtoull to not set errno
to 0 if errno is EINVAL before calling, strto[u]ll does not modify errno
and the base is ok.

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

Signed-off-by: Felix Janda <felix.janda@posteo.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolib/replace: Replace BSD strtoull by wrapping strtoull instead of strtouq
Felix Janda [Thu, 22 Oct 2015 10:32:48 +0000 (12:32 +0200)]
lib/replace: Replace BSD strtoull by wrapping strtoull instead of strtouq

Same as commit e50bf6d537ef09e936d19d6e0bf63f9bbc5d4818 but for strtoull
instead of strtoll.

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

Signed-off-by: Felix Janda <felix.janda@posteo.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4.torture.smb2/session: Add torture assert for close
Anoop C S [Mon, 26 Oct 2015 11:03:11 +0000 (16:33 +0530)]
s4.torture.smb2/session: Add torture assert for close

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Oct 31 15:52:22 CET 2015 on sn-devel-104

4 years agos4.torture.smb2/session: Add torture assert for unlink
Anoop C S [Thu, 29 Oct 2015 14:50:52 +0000 (20:20 +0530)]
s4.torture.smb2/session: Add torture assert for unlink

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4.torture.smb2/session : Replace CHECK_STATUS with torture macros
Anoop C S [Thu, 8 Oct 2015 13:32:06 +0000 (19:02 +0530)]
s4.torture.smb2/session : Replace CHECK_STATUS with torture macros

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Fix/simplify scavenger routines
Volker Lendecke [Thu, 29 Oct 2015 13:27:32 +0000 (14:27 +0100)]
smbd: Fix/simplify scavenger routines

Use read_data/write_data, "ofs" was not incremented

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 Oct 30 22:53:56 CET 2015 on sn-devel-104

4 years agos3-smbd: Fix use after issue in smbd_smb2_request_dispatch()
Andreas Schneider [Fri, 30 Oct 2015 08:01:28 +0000 (09:01 +0100)]
s3-smbd: Fix use after issue in smbd_smb2_request_dispatch()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 30 19:49:47 CET 2015 on sn-devel-104

4 years agoctdb-banning: Do not set recovery mode to ACTIVE in daemon
Amitay Isaacs [Fri, 30 Oct 2015 03:25:50 +0000 (14:25 +1100)]
ctdb-banning: Do not set recovery mode to ACTIVE in daemon

When a node gets banned, it should go into recovery and freeze all
databases.  We rely on the recovery daemon to detect the banned state
and put the node in recovery and freeze all databases.

Recent change in b4357a79d916b1f8ade8fa78563fbef0ce670aa9 took explicit
freezing out of banning code but left the setting of recovery mode
to ACTIVE.  Recovery daemon will freeze databases only if the recovery
mode is NORMAL.  Recovery mode set to ACTIVE is an indication that the
freeze has started.

Do not set the recovery mode to ACTIVE in banning.  Let recovery daemon
take care of it.

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): Fri Oct 30 10:32:38 CET 2015 on sn-devel-104

4 years agoctdb-include: Order function prototypes as per ctdb_client.c
Amitay Isaacs [Tue, 27 Oct 2015 06:34:06 +0000 (17:34 +1100)]
ctdb-include: Order function prototypes as per ctdb_client.c

This makes sure that all function prototypes in ctdb_client.h are in
the same order of functions defined in ctdb_client.c.

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): Fri Oct 30 05:04:49 CET 2015 on sn-devel-104

4 years agoctdb-include: Remove unused structures and prototypes
Amitay Isaacs [Tue, 27 Oct 2015 05:45:12 +0000 (16:45 +1100)]
ctdb-include: Remove unused structures and prototypes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Move client function prototypes to ctdb_client.h
Amitay Isaacs [Tue, 27 Oct 2015 04:34:30 +0000 (15:34 +1100)]
ctdb-include: Move client function prototypes to ctdb_client.h

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Move protocol structures from ctdb_private.h to ctdb_protocol.h
Amitay Isaacs [Tue, 27 Oct 2015 05:29:36 +0000 (16:29 +1100)]
ctdb-include: Move protocol structures from ctdb_private.h to ctdb_protocol.h

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Move protocol structures from ctdb_client.h to ctdb_protocol.h
Amitay Isaacs [Tue, 27 Oct 2015 04:32:12 +0000 (15:32 +1100)]
ctdb-include: Move protocol structures from ctdb_client.h to ctdb_protocol.h

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/eventscript.c
Amitay Isaacs [Fri, 23 Oct 2015 05:00:39 +0000 (16:00 +1100)]
ctdb-include: Group function prototypes from server/eventscript.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_vacuum.c
Amitay Isaacs [Fri, 23 Oct 2015 04:49:32 +0000 (15:49 +1100)]
ctdb-include: Group function prototypes from server/ctdb_vacuum.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_uptime.c
Amitay Isaacs [Fri, 23 Oct 2015 04:46:49 +0000 (15:46 +1100)]
ctdb-include: Group function prototypes from server/ctdb_uptime.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_update_record.c
Amitay Isaacs [Fri, 23 Oct 2015 04:45:55 +0000 (15:45 +1100)]
ctdb-include: Group function prototypes from server/ctdb_update_record.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_tunables.c
Amitay Isaacs [Fri, 23 Oct 2015 04:44:21 +0000 (15:44 +1100)]
ctdb-include: Group function prototypes from server/ctdb_tunables.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_traverse.c
Amitay Isaacs [Fri, 23 Oct 2015 04:42:50 +0000 (15:42 +1100)]
ctdb-include: Group function prototypes from server/ctdb_traverse.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_takeover.c
Amitay Isaacs [Fri, 23 Oct 2015 04:40:19 +0000 (15:40 +1100)]
ctdb-include: Group function prototypes from server/ctdb_takeover.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_statistics.c
Amitay Isaacs [Fri, 23 Oct 2015 04:31:34 +0000 (15:31 +1100)]
ctdb-include: Group function prototypes from server/ctdb_statistics.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_serverids.c
Amitay Isaacs [Fri, 23 Oct 2015 04:30:37 +0000 (15:30 +1100)]
ctdb-include: Group function prototypes from server/ctdb_serverids.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_server.c
Amitay Isaacs [Fri, 23 Oct 2015 04:28:56 +0000 (15:28 +1100)]
ctdb-include: Group function prototypes from server/ctdb_server.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_recoverd.c
Amitay Isaacs [Fri, 23 Oct 2015 04:57:25 +0000 (15:57 +1100)]
ctdb-include: Group function prototypes from server/ctdb_recoverd.c

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
4 years agoctdb-include: Group function prototypes from server/ctdb_recover.c
Amitay Isaacs [Fri, 23 Oct 2015 04:54:59 +0000 (15:54 +1100)]
ctdb-include: Group function prototypes from server/ctdb_recover.c

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