ddiss/samba.git
9 years agolib: Remove load_case_tables_library()
Volker Lendecke [Sat, 21 Mar 2015 18:49:17 +0000 (19:49 +0100)]
lib: Remove load_case_tables_library()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib: Convert [up|low]case.dat to C
Volker Lendecke [Sat, 21 Mar 2015 12:22:34 +0000 (13:22 +0100)]
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>
9 years agolib: Fix CID 1272834 Unchecked return value
Volker Lendecke [Wed, 18 Mar 2015 07:47:37 +0000 (07:47 +0000)]
lib: Fix CID 1272834 Unchecked return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoWHATSNEW: Add logging backends
Christof Schmitt [Thu, 19 Mar 2015 20:15:24 +0000 (13:15 -0700)]
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

9 years agodebug: Add GPFS tracing backend
Christof Schmitt [Thu, 19 Feb 2015 23:32:44 +0000 (16:32 -0700)]
debug: Add GPFS tracing backend

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agogpfswrap: Add wrappers for tracing API
Christof Schmitt [Tue, 24 Feb 2015 23:18:59 +0000 (16:18 -0700)]
gpfswrap: Add wrappers for tracing API

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agogpfswrap: Move gpfswrap to lib/util
Christof Schmitt [Thu, 19 Feb 2015 23:02:11 +0000 (16:02 -0700)]
gpfswrap: Move gpfswrap to lib/util

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Add lttng backend
Christof Schmitt [Fri, 9 Jan 2015 23:17:08 +0000 (16:17 -0700)]
debug: Add lttng backend

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Add systemd backend
Christof Schmitt [Fri, 20 Mar 2015 21:36:58 +0000 (14:36 -0700)]
debug: Add systemd backend

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoparam: Mark syslog and syslog_only as deprecated
Christof Schmitt [Fri, 9 Jan 2015 22:13:37 +0000 (15:13 -0700)]
param: Mark syslog and syslog_only as deprecated

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Remove now unused syslog variables from debug_settings
Christof Schmitt [Fri, 9 Jan 2015 22:07:36 +0000 (15:07 -0700)]
debug: Remove now unused syslog variables from debug_settings

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Simplify Debug1
Christof Schmitt [Fri, 9 Jan 2015 22:00:04 +0000 (15:00 -0700)]
debug: Simplify Debug1

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Use backends instead of explicitly logging to syslog or file
Christof Schmitt [Fri, 9 Jan 2015 21:56:38 +0000 (14:56 -0700)]
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>
9 years agodebug: Remove codepath to open file in Debug1
Christof Schmitt [Fri, 9 Jan 2015 21:51:00 +0000 (14:51 -0700)]
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>
9 years agodebug: Set backends from logging parameter in smb.conf
Christof Schmitt [Fri, 9 Jan 2015 21:46:32 +0000 (14:46 -0700)]
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>
9 years agoparam: Add new 'logging' parameter
Christof Schmitt [Fri, 9 Jan 2015 21:21:32 +0000 (14:21 -0700)]
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>
9 years agodebug: Add syslog backend
Christof Schmitt [Mon, 23 Mar 2015 02:30:31 +0000 (13:30 +1100)]
debug: Add syslog backend

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Add file backend
Christof Schmitt [Fri, 9 Jan 2015 21:00:02 +0000 (14:00 -0700)]
debug: Add file backend

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Add infrastructure for supporting multiple backends
Christof Schmitt [Fri, 9 Jan 2015 20:49:13 +0000 (13:49 -0700)]
debug: Add infrastructure for supporting multiple backends

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Move mapping from level to syslog priority to helper function
Christof Schmitt [Fri, 9 Jan 2015 20:29:48 +0000 (13:29 -0700)]
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>
9 years agodebug: Move logging to callback to separate function
Christof Schmitt [Fri, 9 Jan 2015 20:17:49 +0000 (13:17 -0700)]
debug: Move logging to callback to separate function

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Always store short version of prog_name in debug state
Christof Schmitt [Tue, 24 Feb 2015 21:09:18 +0000 (14:09 -0700)]
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>
9 years agodebug: Remove some unneeded function declarations
Christof Schmitt [Wed, 17 Dec 2014 16:59:52 +0000 (09:59 -0700)]
debug: Remove some unneeded function declarations

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agodebug: Remove FORMAT_BUFR_MAX, use FORMAT_BUFR_SIZE - 1 instead
Christof Schmitt [Fri, 20 Mar 2015 21:19:09 +0000 (14:19 -0700)]
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>
9 years agobuild: Move systemd checks to lib/util
Christof Schmitt [Fri, 20 Mar 2015 19:13:14 +0000 (12:13 -0700)]
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>
9 years agolib: Move get_iconv_handle() call down
Volker Lendecke [Mon, 23 Mar 2015 15:03:47 +0000 (15:03 +0000)]
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

9 years agos4:torture: avoid use of uninitialized variable in error case.
Michael Adam [Mon, 23 Mar 2015 00:55:02 +0000 (01:55 +0100)]
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

9 years agos4:torture: avoid free of uninitialized variable in error case.
Michael Adam [Mon, 23 Mar 2015 00:52:32 +0000 (01:52 +0100)]
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>
9 years agos4:torture: avoid free of uninitialized variable in error case.
Michael Adam [Mon, 23 Mar 2015 00:51:16 +0000 (01:51 +0100)]
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>
9 years agos4:torture: avoid free of uninitialized variables in error-case.
Michael Adam [Mon, 23 Mar 2015 00:48:32 +0000 (01:48 +0100)]
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>
9 years agolib/crypto: fix header guard for crypto.h
Michael Adam [Mon, 23 Mar 2015 00:41:57 +0000 (01:41 +0100)]
lib/crypto: fix header guard for crypto.h

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agolibnetapi: Fix CID 1272947 Fix logically dead code
Anoop C S [Mon, 23 Mar 2015 11:41:31 +0000 (17:11 +0530)]
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>
9 years agodsdb: Fix CID 1034681 Copy-paste error
Volker Lendecke [Tue, 17 Mar 2015 20:43:50 +0000 (21:43 +0100)]
dsdb: Fix CID 1034681 Copy-paste error

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agosmbd: Fix a typo
Volker Lendecke [Mon, 23 Mar 2015 14:38:35 +0000 (14:38 +0000)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoctdb-tools: Use a broadcast to connected nodes for "reloadnodes"
Martin Schwenke [Wed, 25 Feb 2015 00:43:10 +0000 (11:43 +1100)]
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

9 years agoctdb-tests: Add unit tests for "reloadnodes" sanity checking
Martin Schwenke [Wed, 4 Feb 2015 03:57:03 +0000 (14:57 +1100)]
ctdb-tests: Add unit tests for "reloadnodes" sanity checking

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tools: Sanity check changes before processing "reloadnodes"
Martin Schwenke [Fri, 30 Jan 2015 09:14:26 +0000 (20:14 +1100)]
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>
9 years agoctdb-tests: Add "ctdb reloadnodes" unit tests
Martin Schwenke [Tue, 17 Mar 2015 09:12:22 +0000 (20:12 +1100)]
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>
9 years agoctdb-tools: Add cross-node file comparison to "reloadnodes"
Martin Schwenke [Tue, 24 Feb 2015 05:13:46 +0000 (16:13 +1100)]
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>
9 years agoctdb-tests: Test stub for ctrl_getnodesfile()
Martin Schwenke [Tue, 24 Feb 2015 05:13:09 +0000 (16:13 +1100)]
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>
9 years agoctdb-daemon: New control CTDB_CONTROL_GET_NODES_FILE
Martin Schwenke [Fri, 20 Feb 2015 10:19:01 +0000 (21:19 +1100)]
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>
9 years agoctdb-tools: "reloadnodes" should only run against current node
Martin Schwenke [Wed, 28 Jan 2015 00:54:39 +0000 (11:54 +1100)]
ctdb-tools: "reloadnodes" should only run against current node

It should not be possible to specify "-n <othernode>", unless
<othernode> is the current node.  To support this, add new function
assert_current_node_only().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tools: Remove unused struct pnn_node and function read_pnn_node_file()
Martin Schwenke [Tue, 24 Feb 2015 00:18:34 +0000 (11:18 +1100)]
ctdb-tools: Remove unused struct pnn_node and function read_pnn_node_file()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tools: Reimplement read_natgw_nodes_file() using ctdb_read_nodes_file()
Martin Schwenke [Tue, 24 Feb 2015 00:17:20 +0000 (11:17 +1100)]
ctdb-tools: Reimplement read_natgw_nodes_file() using ctdb_read_nodes_file()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tools: Reimplement read_nodes_file() using ctdb_get_nodes_file()
Martin Schwenke [Mon, 23 Feb 2015 11:05:36 +0000 (22:05 +1100)]
ctdb-tools: Reimplement read_nodes_file() using ctdb_get_nodes_file()

Update the implementation of "ctdb xpnn" and "ctdb listnodes"
accordingly.  Update associated tests too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-daemon: Move ctdb_read_nodes_file() to utilities
Martin Schwenke [Sat, 21 Feb 2015 19:49:04 +0000 (06:49 +1100)]
ctdb-daemon: Move ctdb_read_nodes_file() to utilities

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-daemon: Factor out node parsing code
Martin Schwenke [Tue, 17 Feb 2015 04:35:07 +0000 (15:35 +1100)]
ctdb-daemon: Factor out node parsing code

New function ctdb_read_nodes_file() reads a nodes file into a node
map, which is a useful intermediate format.  This function should
replace the node reading code in the ctdb CLI tool.  It will also be
useful for sanity checking of nodes files across the cluster.

New function convert_node_map_to_list() converts a node map to a node
array (and associated node count).  This fills in the details that
aren't present in the node map.  This may also useful as a separate
function later if node list reloading stages the data after a sanity
check - the approach is not yet finalised.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-daemon: Store node addresses as ctdb_sock_addr rather than strings
Martin Schwenke [Fri, 20 Feb 2015 00:47:23 +0000 (11:47 +1100)]
ctdb-daemon: Store node addresses as ctdb_sock_addr rather than strings

Every time a nodemap is contructed the node IP addresses all need to
be parsed.  This isn't very productive use of CPU.

Instead, parse each string once when the nodes file is loaded.  This
results in much simpler code.

This code also removes the use of ctdb_address.  Duplicating the port
is pointless without an abstraction layer around ctdb_address.  If
CTDB gets an incompatible transport in the future then add an
abstraction layer.

Note that the infiniband code is not updated.  Compilation of the
infiniband code is already broken.  Fixing it will be a separate,
properly tested effort.

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

9 years agoctdb-common: Drop ctdb context from ctdb_parse_address()
Martin Schwenke [Sun, 22 Feb 2015 23:34:33 +0000 (10:34 +1100)]
ctdb-common: Drop ctdb context from ctdb_parse_address()

Having it require a CTDB context stops ctdb_parse_address() from being
used in more generic code.  Just use the existing talloc context for
memory allocations.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-daemon: Remove function ctdb_add_deleted_node()
Martin Schwenke [Tue, 10 Feb 2015 09:50:05 +0000 (20:50 +1100)]
ctdb-daemon: Remove function ctdb_add_deleted_node()

Just add a flags parameter to ctdb_add_nodes() and use the same code.
Less is more.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-daemon: Set node PNN in one place
Martin Schwenke [Tue, 17 Feb 2015 04:21:15 +0000 (15:21 +1100)]
ctdb-daemon: Set node PNN in one place

This is currently set in 2 places.  One of them makes the node loading
code difficult to refactor.  Also, when the surrounding code in either
place is touched then it might get broken.

This only needs to be done once at startup, not on every reload.  So
do it once in a very obvious way, sacrificing a few CPU cycles for
some added clarity.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-daemon: Move VNN map initialisation out of node loading
Martin Schwenke [Tue, 17 Feb 2015 01:34:41 +0000 (12:34 +1100)]
ctdb-daemon: Move VNN map initialisation out of node loading

Each node reload unnecessarily and incorrectly resets the VNN map,
causing a potentially unnecessary recovery.  When nodes are reloaded
any newly deleted nodes should already be disconnected and any newly
added nodes should also be disconnected.  This means that reloading
the nodes file should not cause a change in the VNN map.

The current implementation also leaks memory every time the nodes are
reloaded.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tests: Fix error return for ctdb_client_async_control_stub()
Martin Schwenke [Tue, 17 Mar 2015 09:14:08 +0000 (20:14 +1100)]
ctdb-tests: Fix error return for ctdb_client_async_control_stub()

It should be -1 even without a failure callback registered.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-tests: Add asserts to ensure that pointers are set
Martin Schwenke [Tue, 17 Mar 2015 00:03:52 +0000 (11:03 +1100)]
ctdb-tests: Add asserts to ensure that pointers are set

These can be unset if a NODEMAP, IFACES or VNNMAP section is missing.
Affected functions would then dereference a NULL pointer and the test
program would crash.  Adding some helpful messages makes the problem
easier to diagnose when writing tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agotorture: Fix the usage of the MEMORY credential cache.
Andreas Schneider [Thu, 26 Feb 2015 16:03:44 +0000 (17:03 +0100)]
torture: Fix the usage of the MEMORY credential cache.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Mar 21 02:03:34 CET 2015 on sn-devel-104

9 years agokdc-db-glue: Remove unused code.
Andreas Schneider [Wed, 25 Feb 2015 10:57:23 +0000 (11:57 +0100)]
kdc-db-glue: Remove unused code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agokdc-db-glue: Do not allocate memory for the principal
Andreas Schneider [Wed, 25 Feb 2015 10:56:34 +0000 (11:56 +0100)]
kdc-db-glue: Do not allocate memory for the principal

The function we are calling already allocate memory.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agokdc-db-glue: Fix memory cleanup to avoid crashes.
Andreas Schneider [Wed, 25 Feb 2015 10:55:43 +0000 (11:55 +0100)]
kdc-db-glue: Fix memory cleanup to avoid crashes.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agokdc-db-glue: Fix function format of samba_kdc_message2entry()
Andreas Schneider [Wed, 25 Feb 2015 10:54:52 +0000 (11:54 +0100)]
kdc-db-glue: Fix function format of samba_kdc_message2entry()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agokdc-db-glue: Fix a NULL pointer dereference.
Andreas Schneider [Wed, 25 Feb 2015 10:52:45 +0000 (11:52 +0100)]
kdc-db-glue: Fix a NULL pointer dereference.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: bad idea to free parent mem_ctx when sub function got a failure.
Günther Deschner [Tue, 10 Feb 2015 13:38:22 +0000 (14:38 +0100)]
s4-kdc/db_glue: bad idea to free parent mem_ctx when sub function got a failure.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/pac_glue: only include required headers.
Günther Deschner [Thu, 8 May 2014 13:49:17 +0000 (15:49 +0200)]
s4-kdc/pac_glue: only include required headers.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/pac_glue: use ENCTYPE_ARCFOUR_HMAC just like in db_glue.
Günther Deschner [Thu, 8 May 2014 13:20:59 +0000 (15:20 +0200)]
s4-kdc/pac_glue: use ENCTYPE_ARCFOUR_HMAC just like in db_glue.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db-glue: use krb5_copy_data_contents in samba_kdc_message2entry_keys().
Günther Deschner [Mon, 12 May 2014 15:45:26 +0000 (17:45 +0200)]
s4-kdc/db-glue: use krb5_copy_data_contents in samba_kdc_message2entry_keys().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/pac_glue: use krb5_copy_data_contents in samba_make_krb5_pac().
Günther Deschner [Mon, 12 May 2014 15:45:14 +0000 (17:45 +0200)]
s4-kdc/pac_glue: use krb5_copy_data_contents in samba_make_krb5_pac().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use KRB5_PW_SALT instead of hdb type.
Günther Deschner [Thu, 8 May 2014 12:32:47 +0000 (14:32 +0200)]
s4-kdc/db_glue: use KRB5_PW_SALT instead of hdb type.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use smb_krb5_principal_get_type() to access private members
Günther Deschner [Thu, 8 May 2014 10:21:43 +0000 (12:21 +0200)]
s4-kdc/db_glue: use smb_krb5_principal_get_type() to access private members

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use KRB5_KEY_TYPE to access private key members.
Günther Deschner [Thu, 8 May 2014 08:50:21 +0000 (10:50 +0200)]
s4-kdc/db_glue: use KRB5_KEY_TYPE to access private key members.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use time_t directly instead of KerberosTime.
Günther Deschner [Thu, 8 May 2014 08:49:00 +0000 (10:49 +0200)]
s4-kdc/db_glue: use time_t directly instead of KerberosTime.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use krb5_principal_get_comp_string() to access members of private...
Günther Deschner [Thu, 8 May 2014 08:44:09 +0000 (10:44 +0200)]
s4-kdc/db_glue: use krb5_principal_get_comp_string() to access members of private structs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use krb5_princ_size() instead of inspecting private structs.
Günther Deschner [Thu, 8 May 2014 08:25:07 +0000 (10:25 +0200)]
s4-kdc/db_glue: use krb5_princ_size() instead of inspecting private structs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use smb_krb5_principal_get_realm().
Günther Deschner [Thu, 8 May 2014 08:10:49 +0000 (10:10 +0200)]
s4-kdc/db_glue: use smb_krb5_principal_get_realm().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:kdc/db-glue: pass a valid principal from samba_kdc_seq() to samba_kdc_message2entry()
Stefan Metzmacher [Fri, 20 Mar 2015 14:29:30 +0000 (15:29 +0100)]
s4:kdc/db-glue: pass a valid principal from samba_kdc_seq() to samba_kdc_message2entry()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
9 years agos4-kdc/db_glue: use smb_krb5_principal_set_realm().
Günther Deschner [Thu, 8 May 2014 08:09:17 +0000 (10:09 +0200)]
s4-kdc/db_glue: use smb_krb5_principal_set_realm().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use krb5_copy_principal().
Günther Deschner [Wed, 7 May 2014 15:14:14 +0000 (17:14 +0200)]
s4-kdc/db_glue: use krb5_copy_principal().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use smb_krb5_make_principal().
Günther Deschner [Wed, 7 May 2014 14:47:52 +0000 (16:47 +0200)]
s4-kdc/db_glue: use smb_krb5_make_principal().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: use smb_krb5_keyblock_init_contents().
Günther Deschner [Wed, 7 May 2014 14:46:31 +0000 (16:46 +0200)]
s4-kdc/db_glue: use smb_krb5_keyblock_init_contents().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: no need to include kdc/kdc-glue.h header here.
Günther Deschner [Wed, 7 May 2014 17:58:39 +0000 (19:58 +0200)]
s4-kdc/db_glue: no need to include kdc/kdc-glue.h header here.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: no need to NULL entry_ex->entry.generation.
Günther Deschner [Wed, 7 May 2014 14:56:06 +0000 (16:56 +0200)]
s4-kdc/db_glue: no need to NULL entry_ex->entry.generation.

The whole entry_ex->entry struct is initialized already.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: remove unused hdb_entry_ex from samba_kdc_seq().
Günther Deschner [Wed, 7 May 2014 14:37:25 +0000 (16:37 +0200)]
s4-kdc/db_glue: remove unused hdb_entry_ex from samba_kdc_seq().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/db_glue: fix Debug messages.
Günther Deschner [Wed, 7 May 2014 14:11:51 +0000 (16:11 +0200)]
s4-kdc/db_glue: fix Debug messages.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-kdc/pac-glue: use kerberos_free_data_contents().
Günther Deschner [Wed, 7 May 2014 09:50:52 +0000 (11:50 +0200)]
s4-kdc/pac-glue: use kerberos_free_data_contents().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-libnet: only build python_dckeytab when heimdal is available.
Günther Deschner [Tue, 29 Apr 2014 23:19:53 +0000 (01:19 +0200)]
s4-libnet: only build python_dckeytab when heimdal is available.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-rpc_server: only build backup_key rpc service when Heimdal is available.
Günther Deschner [Fri, 25 Apr 2014 13:21:17 +0000 (15:21 +0200)]
s4-rpc_server: only build backup_key rpc service when Heimdal is available.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4-dsdb/samdb: use abstract functions for MIT compatibility.
Günther Deschner [Fri, 25 Apr 2014 12:17:10 +0000 (14:17 +0200)]
s4-dsdb/samdb: use abstract functions for MIT compatibility.

This involves switching to krb5_data, smb_krb5_get_pw_salt and
smb_krb5_create_key_from_string.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3-winbind: Correct debug message for starting winbind.
Andreas Schneider [Tue, 27 Jan 2015 15:32:48 +0000 (16:32 +0100)]
s3-winbind: Correct debug message for starting winbind.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agodlz_bind9: Fix keytab location.
Andreas Schneider [Thu, 26 Feb 2015 17:17:18 +0000 (18:17 +0100)]
dlz_bind9: Fix keytab location.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoYouCompleteMe: Add missing path.
Andreas Schneider [Thu, 26 Feb 2015 16:10:28 +0000 (17:10 +0100)]
YouCompleteMe: Add missing path.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:torture/libnetapi: remove allow_warnings=True
Stefan Metzmacher [Wed, 18 Mar 2015 22:10:26 +0000 (23:10 +0100)]
s4:torture/libnetapi: remove allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 20 23:23:55 CET 2015 on sn-devel-104

9 years agos4:torture/libnetapi: avoid compiler warning
Stefan Metzmacher [Wed, 18 Mar 2015 22:10:01 +0000 (23:10 +0100)]
s4:torture/libnetapi: avoid compiler warning

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/winbind: remove allow_warnings=True
Stefan Metzmacher [Wed, 18 Mar 2015 22:08:33 +0000 (23:08 +0100)]
s4:torture/winbind: remove allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/winbind: avoid compiler warnings
Stefan Metzmacher [Wed, 18 Mar 2015 22:08:02 +0000 (23:08 +0100)]
s4:torture/winbind: avoid compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/wscript_build: remove allow_warnings=True for torture_rpc
Stefan Metzmacher [Wed, 18 Mar 2015 22:04:09 +0000 (23:04 +0100)]
s4:torture/wscript_build: remove allow_warnings=True for torture_rpc

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/rpc: avoid compiler warnings
Stefan Metzmacher [Wed, 18 Mar 2015 22:03:48 +0000 (23:03 +0100)]
s4:torture/rpc: avoid compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/wscript_build: remove allow_warnings=True for TORTURE_RAW
Stefan Metzmacher [Wed, 18 Mar 2015 21:53:00 +0000 (22:53 +0100)]
s4:torture/wscript_build: remove allow_warnings=True for TORTURE_RAW

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/raw: avoid compiler warnings
Stefan Metzmacher [Wed, 18 Mar 2015 21:52:32 +0000 (22:52 +0100)]
s4:torture/raw: avoid compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/wscript_build: remove allow_warnings=True for TORTURE_NDR
Stefan Metzmacher [Wed, 18 Mar 2015 21:46:13 +0000 (22:46 +0100)]
s4:torture/wscript_build: remove allow_warnings=True for TORTURE_NDR

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/ndr: #if 0 unused code
Stefan Metzmacher [Wed, 18 Mar 2015 21:45:17 +0000 (22:45 +0100)]
s4:torture/ndr: #if 0 unused code

This avoids compiler warnings, but keep the code arround to be activated later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/smb2: remove allow_warnings=True
Stefan Metzmacher [Wed, 18 Mar 2015 21:39:33 +0000 (22:39 +0100)]
s4:torture/smb2: remove allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos4:torture/smb2: avoid compiler warnings
Stefan Metzmacher [Wed, 18 Mar 2015 21:39:11 +0000 (22:39 +0100)]
s4:torture/smb2: avoid compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>