1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

112060 Commits

Author SHA1 Message Date
Volker Lendecke
4051b70450 winbindd: Make DOMAIN_INFO a proper async request
This has an async code path hidden inside. Expose that properly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
7b11e91759 winbindd: winbindd_list_trusted_domains() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
4f8ea6da43 winbindd: winbindd_priv_pipe_dir() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
a781596ed6 winbindd: winbindd_ccache_save() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
a180f401f8 winbindd: winbindd_ccache_ntlm_auth() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
de162c033c winbindd: winbindd_dc_info() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
762d8ab759 winbindd: winbindd_netbios_name() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
05105ea0f8 winbindd: winbindd_domain_name() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
c6b9a0fd70 winbindd: winbindd_ping() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
25c365c637 winbindd: winbindd_info() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:19 +02:00
Volker Lendecke
214d78a6fa winbindd: winbindd_interface_version() -> bool_dispatch_table
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:18 +02:00
Volker Lendecke
4109236cfd winbindd: Introduce "bool_dispatch_table"
This is meant to replace the synchronous "dispatch_table".

The current dispatch_table assumes that every synchronous function does
the request_ok or request_error itself. This mixes two concerns: Doing
the work and shipping the reply to the winbind client. This new dispatch
table will make it possible to centralize shipping the reply to the
client. At a later stage this will enable easier statistics on how long
request processing took precisely.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-05-17 08:44:18 +02:00
Martin Schwenke
87284da7a2 ctdb: Drop configuration file ctdbd.conf
Drop function loadconfig(), replacing uses with "load_system_config
ctdb".  Drop translation of old-style configuration to new
configuration file.  Drop export of debugging variables.  Drop
documentation and configuration examples.

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 May 17 07:03:04 CEST 2018 on sn-devel-144
2018-05-17 07:03:04 +02:00
Martin Schwenke
b184761829 ctdb-tests: Switch local daemons to use new style configuration file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
1aa17eb447 ctdb-config: Add default ctdb.conf file
Install it in RPM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
bd58f7af40 ctdb-docs: Add example configuration files
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
409b0b797e ctdb-docs: Add ctdb.conf(5) cross references and documentation tweaks
Minor updates to other manual pages for compatibility.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
72ba7ea887 ctdb-docs: Add ctdb.conf(5)
This documents the new Samba-style configuration file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
60811d62e5 ctdb-tests: Clean up tests to not expose script options
The tests still use the script options but the event scripts no longer
see them exported from the test infrastructure.  Testing now depends
on the event scripts successfully fetching the options from the
configuration file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
9b099431fd ctdb-scripts: Fetch recovery lock option from config file in 01.reclock
Put it in a function so it is easy to move to common code just in case
it is needed somewhere else.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
2bc6be1e4f ctdb-scripts: Fetch database options from config file in scripts
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
16aa9e7a30 ctdb-scripts: Add function ctdb_get_db_options()
This pulls database options from the configuration file, caches then
and makes the values available in scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
ad82b8abc3 ctdb-tests: Add ctdb-config wrapper stub for event script tests
Create a shim helper around that simply invokes ctdb-config via its
real location.

This is needed because the event script tests set CTDB_HELPER_BINDIR
to the stubs directory because all other helpers used by event script
testing are currently stubs.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
7c33f5ec2d ctdb-tests: Add setup of ctdb.conf recovery lock setting
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
ff3d0e70b6 ctdb-tests: Add setup of ctdb.conf database directory settings
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
25f05ced2f ctdb-tests: Add new variable CTDB_SCRIPTS_HELPER_BINDIR
This will always find a binary helper, as opposed to a script helper,
which currently lives under tools/ in the source tree.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
78fbbfa4d3 ctdb-daemon: Drop most ctdbd command-line options
All except -i/--interactive.  This remaining popt option is now neatly
wrapped to fit in 80 columns.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
4e06610f8c ctdb-scripts: Translate old style options into new configuration file
This allows the relevant command-line options to be removed from the
daemon while still leaving the old ctdbd.conf options file in place.
It is a temporary measure to enable testing in an old testing
environment.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
61e288ad70 ctdb-daemon: Integrate configuration file handling
Testing is now broken because command-line options are no longer
respected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
239f189b10 ctdb-daemon: Implement ctdb configuration file loading
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
b42dbadbef ctdb-tools: Add legacy config options to config tool
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
d91b9b309c ctdb-daemon: Define ctdbd legacy configuration file options
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
65d9d1e743 ctdb-tools: Add database config options to config tool
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
52d2701279 ctdb-database: Define database configuration file options
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:31 +02:00
Martin Schwenke
dbdd49da23 ctdb-tools: Add cluster config options to config tool
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Martin Schwenke
cf17a48d29 ctdb-cluster: Define cluster configuration file options
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Amitay Isaacs
5eec5e7c1f ctdb-tools: Add event daemon config options to config tool
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-17 04:04:30 +02:00
Amitay Isaacs
8831f6740e ctdb-event: Add event daemon config file options
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-17 04:04:30 +02:00
Martin Schwenke
920f834578 ctdb-daemon: Drop ctdbd --max-persistent-check-errors option
Leave the code with an internal default of 0.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Martin Schwenke
61efed5a7e ctdb-scripts: Drop CTDB_MAX_PERSISTENT_CHECK_ERRORS option
This must harken back to the days of yore when corrupt persistent
databases were an issue.  We haven't seen this used.  If CTDB fails to
start due to a corrupt persistent database then this database can be
removed by hand.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Martin Schwenke
9193a10f05 ctdb-daemon: Do not create database directories
These should be created at installation or, if non-standard, by the
administrator.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Martin Schwenke
344e6eecb2 ctdb-tests: Create database directories for local daemons
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Martin Schwenke
31747da5ff ctdb-build: Create database directories during installation
Create and package.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Andreas Schneider
c83dad5b12 s4:torture: Do not leak file descriptor in smb2 oplock test
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May 17 04:03:21 CEST 2018 on sn-devel-144
2018-05-17 04:03:21 +02:00
Andreas Schneider
4eefd573d2 s4:torture: Do not leak memory in libsmbclient test
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2018-05-17 01:10:29 +02:00
David Disseldorp
a762386ccf s3:libsmbclient: cleanup smbc_setWorkgroup() usage
It now takes a const char *. There's no need to use heap memory here.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-05-17 01:10:28 +02:00
Andreas Schneider
20c158c1f4 s3:libsmbclient: Use const for setting and getting strings
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2018-05-17 01:10:28 +02:00
Andreas Schneider
cb9796ffc0 ctdb: Check return values of tevent_req_set_endtime()
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 17 01:09:46 CEST 2018 on sn-devel-144
2018-05-17 01:09:46 +02:00
Andreas Schneider
76d5f78bb8 s3:smbd: Fix converity warning with _smb_setlen_large()
result_independent_of_operands: "(outsize - 4 & 0xffffff) >> 16 >> 8" is
0 regardless of the values of its operands. This occurs as the bitwise
first operand of "&".

So we should just pass a variable to silence the warning. However for
this, we should calculate it correctly and use size_t for it.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-16 21:30:23 +02:00
Andreas Schneider
25c4f8c561 libcli: Fix coverity warning in smb2cli_notify_send()
result_independent_of_operands: "(uint16_t)(recursive ? 1 : 0) >> 8" is
0 regardless of the values of its operands. This occurs as the operand
of assignment.

Found by Coverity.

Pair-Programmed-With: Ralph Boehme <slow@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-16 21:30:23 +02:00