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

98321 Commits

Author SHA1 Message Date
Andreas Schneider
8c4d4f9e62 Revert "lib: tdb: Use sigaction when testing for robust mutexes."
This fails on Linux platforms with robust mutex support with the
following error:

tdb(/home/asn/workspace/projects/samba/git/st/nt4_dc/lockdir/gencache_notrans.tdb):
    tdb_mutex_open_ok[/home/asn/workspace/projects/samba/git/st/nt4_dc/lockdir/gencache_notrans.tdb]:
    Can use mutexes only with MUTEX_LOCKING or NOLOCK

We also see winbind is not able to start with this error message trying
to open the serverid.tdb.

This reverts commit d191436728.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar 25 14:58:38 CET 2015 on sn-devel-104
2015-03-25 14:58:38 +01:00
Stefan Metzmacher
293e2fcacb lib/util: fix the default code path for debug_set_settings()
logging_param is typically "" instead of NULL!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-03-25 12:24:14 +01:00
David Disseldorp
59633070e1 util_tdb: mark tdb_pack() and friends as deprecated
Following a discussion[1] with Volker, add a note to the tdb_unpack()
and tdb_pack[_append]() prototypes describing them as deprecated.

1. https://lists.samba.org/archive/samba-technical/2015-March/106548.html

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Mar 25 11:05:02 CET 2015 on sn-devel-104
2015-03-25 11:05:02 +01:00
Jeremy Allison
d191436728 lib: tdb: Use sigaction when testing for robust mutexes.
Fixes bug #11175 - Lots of winbindd zombie processes on Solaris platform.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar 24 14:43:22 CET 2015 on sn-devel-104
2015-03-24 14:43:22 +01:00
Jelmer Vernooij
e67130c606 Explicitly include util/debug.h from server stubs generated by pidl.
This is necessary since Server.pm generates calls to DEBUG().

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 24 02:40:00 CET 2015 on sn-devel-104
2015-03-24 02:40:00 +01:00
Volker Lendecke
67dd17d0f4 lib: Remove unused [un]map_file
Reviewed-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
2015-03-24 00:00:20 +01:00
Volker Lendecke
af7893734b codepages/*.dat are gone
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Volker Lendecke
2c1201eb7a smbd: Convert valid.dat to C code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Volker Lendecke
c51300ad89 lib: load_case_tables() -> smb_init_locale()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Volker Lendecke
06a727e8f8 lib: Remove load_case_tables_library()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Volker Lendecke
00df00d8d0 lib: Convert [up|low]case.dat to C
This creates a bit more source code, but it removes the requirement to
explicitly mmap the files

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Volker Lendecke
cccec44842 lib: Fix CID 1272834 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Christof Schmitt
72f1a2a0af WHATSNEW: Add logging backends
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Mon Mar 23 23:59:37 CET 2015 on sn-devel-104
2015-03-23 23:59:36 +01:00
Christof Schmitt
f9e92fc2b0 debug: Add GPFS tracing backend
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:12 +01:00
Christof Schmitt
b818e09c02 gpfswrap: Add wrappers for tracing API
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:12 +01:00
Christof Schmitt
8dcf8cfe66 gpfswrap: Move gpfswrap to lib/util
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:12 +01:00
Christof Schmitt
1257977125 debug: Add lttng backend
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:12 +01:00
Christof Schmitt
4aaf270ea8 debug: Add systemd backend
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
409b5433d2 param: Mark syslog and syslog_only as deprecated
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
f1f3804f6c debug: Remove now unused syslog variables from debug_settings
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
d8ba76e997 debug: Simplify Debug1
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
c89a33a07a debug: Use backends instead of explicitly logging to syslog or file
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
25bd64ffb2 debug: Remove codepath to open file in Debug1
This is not used, the log file is already open from the call to
reopen_logs_internal.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
8a46da3280 debug: Set backends from logging parameter in smb.conf
Fallback to the settings of 'syslog' and 'syslog only' if logging has not
been set.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
5a3eddc7b9 param: Add new 'logging' parameter
This parameter allows to configure multiple backends at the same time.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
2681c31170 debug: Add syslog backend
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
978fee84d0 debug: Add file backend
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
289a7b41bc debug: Add infrastructure for supporting multiple backends
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
364e8768d6 debug: Move mapping from level to syslog priority to helper function
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
1270813691 debug: Move logging to callback to separate function
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
17bd9b7349 debug: Always store short version of prog_name in debug state
Storing the prog_name in the debug state is not necessary at this point,
but it will be used later.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
8eba2cfa51 debug: Remove some unneeded function declarations
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
ba86450b27 debug: Remove FORMAT_BUFR_MAX, use FORMAT_BUFR_SIZE - 1 instead
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Christof Schmitt
0509790ec3 build: Move systemd checks to lib/util
Only lib/util uses the systemd library, so it makes sense to have the
checks there. This also removes the need for the ctdb build script to
specify an empty tag for the systemd library.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 21:22:11 +01:00
Volker Lendecke
dee2b958c0 lib: Move get_iconv_handle() call down
We only need this in the slow path. A good compiler might detect this,
but as get_iconv_handle() might have side-effects from a compiler's
point of view, I'm not sure it's legal to skip the call in the fast
path. Might be premature optimization, but it's low hanging fruit :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Mar 23 21:21:15 CET 2015 on sn-devel-104
2015-03-23 21:21:15 +01:00
Michael Adam
8de2164835 s4:torture: avoid use of uninitialized variable in error case.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Mar 23 18:40:18 CET 2015 on sn-devel-104
2015-03-23 18:40:18 +01:00
Michael Adam
1dc770ce81 s4:torture: avoid free of uninitialized variable in error case.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-03-23 16:04:19 +01:00
Michael Adam
2bf66d95d8 s4:torture: avoid free of uninitialized variable in error case.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-03-23 16:04:19 +01:00
Michael Adam
b92d51f98c s4:torture: avoid free of uninitialized variables in error-case.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-03-23 16:04:19 +01:00
Michael Adam
59cce7cbeb lib/crypto: fix header guard for crypto.h
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-03-23 16:04:19 +01:00
Anoop C S
73f951e98f libnetapi: Fix CID 1272947 Fix logically dead code
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-23 16:04:19 +01:00
Volker Lendecke
b024ea84ff dsdb: Fix CID 1034681 Copy-paste error
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-23 16:04:18 +01:00
Volker Lendecke
9b73a477f6 smbd: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-23 16:04:18 +01:00
Martin Schwenke
c8918b70b9 ctdb-tools: Use a broadcast to connected nodes for "reloadnodes"
There is no reason to serialise these or even handle remote nodes
first.  Using a broadcast is more efficient and is less code.

Update expected test results to reflect changed order of messages.

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): Mon Mar 23 15:04:00 CET 2015 on sn-devel-104
2015-03-23 15:04:00 +01:00
Martin Schwenke
c99d2702ee ctdb-tests: Add unit tests for "reloadnodes" sanity checking
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 12:23:12 +01:00
Martin Schwenke
1cebd75f62 ctdb-tools: Sanity check changes before processing "reloadnodes"
"ctdb reloadnodes" currently does no sanity checking of the nodes
file.  This can cause chaos if a line is deleted from the nodes file
rather than commented out.  It also repeatedly produces a spurious
warning for each deleted node, even if the node was deleted a long
time ago.

Instead compare the nodemap with the contents of the local nodes file
to sanity check before attempting any reloads.  Note that this is
still imperfect if the nodes files are inconsistent across nodes but
it is better.  Also ensure that any nodes that are to be deleted are
already disconnected.  Avoid trying to talk to deleted nodes.

The current implementation is a bit unfortunate when it comes to
deleting nodes.  The most obvious alternative to the above complexity
would be to reloadnodes on the specified node first, then fetch the
node map (in which newly deleted nodes would be marked as such) and
then handle the remote nodes.  However, the implementation of
reloadnodes is asynchronous and it only actions the reload after 1
second.  This is presumably to avoid the recovery master noticing the
inconsistency between nodemaps and triggering a recovery before all
nodes have had their nodemaps updated.

Note that this recovery can still occur if the check is done at an
inconvenient time.  A better long term approach might be to quiesce
the recovery master checks while reloadnodes is in progress.

Update a unit test to reflect the change.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 12:23:12 +01:00
Martin Schwenke
2cb2aa58d0 ctdb-tests: Add "ctdb reloadnodes" unit tests
A basic test and some for cross-node consistency checking.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 12:23:12 +01:00
Martin Schwenke
16c79eb887 ctdb-tools: Add cross-node file comparison to "reloadnodes"
This compares the nodes file on the current node with that on all
nodes.  If any are different then do not reload nodes.

If any nodes files can't be fetched then do not reload nodes.  This
could be because some nodes are running an older version without this
feature.  This is unsupported: why make a major cluster
reconfiguration while a cluster is half upgraded?

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 12:23:12 +01:00
Martin Schwenke
5207d13152 ctdb-tests: Test stub for ctrl_getnodesfile()
Also stub support for CTDB_CONTROL_GET_NODES_FILE

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 12:23:12 +01:00
Martin Schwenke
81e526965c ctdb-daemon: New control CTDB_CONTROL_GET_NODES_FILE
This is like CTDB_CONTROL_GET_NODEMAP but it loads from the nodes file
instead of the daemon.

Also new client function ctdb_ctrl_getnodesfile()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-03-23 12:23:12 +01:00