1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/ctdb
Martin Schwenke 582518c7e8 ctdb-daemon: Handle failure immediately, do housekeeping later
The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

An event script isn't being run until the child has been forked.  So
update relevant state and set the destructor after this.

If the child can't be forked then free the state and return with an
error.  The callback will not be called and the caller will process
the error correctly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-09-01 13:30:10 +02:00
..
client ctdb-client: Print error message before next syscall to avoid losing errno 2016-08-17 23:00:25 +02:00
common ctdb-common: Save errno before closing file to keep debug accurate 2016-08-17 23:00:26 +02:00
config ctdb-scripts: Add early exit for redundant updateip 2016-08-17 23:00:26 +02:00
doc ctdb-tools: Addition of IPs is deferred until the next takeover run 2016-08-17 05:28:19 +02:00
ib ctdb-ib: Fix DEBUG log messages 2016-08-10 08:18:16 +02:00
include ctdb-daemon: Fix format-nonliteral warning 2016-08-10 08:18:16 +02:00
packaging ctdb-packaging: Stop RPM from renaming working config to ctdb.rpmsave 2016-08-08 11:30:57 +02:00
protocol ctdb-protocol: Deprecate global transaction controls 2016-07-28 05:00:18 +02:00
server ctdb-daemon: Handle failure immediately, do housekeeping later 2016-09-01 13:30:10 +02:00
tcp ctdb-tcp: Fix CID 1362724 Unchecked return value from library 2016-08-17 23:00:25 +02:00
tests ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper 2016-08-23 21:17:46 +02:00
tools ctdb-tools: Consistently use db_name 2016-08-17 23:00:26 +02:00
utils ctdb-pmda: Use 1s timeout for fetching statistics 2016-08-12 00:32:17 +02:00
.bzrignore more code rearrangement 2007-06-07 22:16:48 +10:00
.gitignore git: Ignore generated documentation files 2013-10-22 13:07:13 +11:00
configure ctdb-build: Allow configure and Makefile to find waf in tarball 2014-09-10 01:36:14 +02:00
configure.rpm ctdb-packaging: Package private libraries 2015-07-01 07:19:43 +02:00
COPYING add a licence file 2009-02-07 08:10:34 +11:00
Makefile ctdb-build: Allow configure and Makefile to find waf in tarball 2014-09-10 01:36:14 +02:00
README doc: README - add information about CTDB, license and website 2012-10-22 17:39:49 +11:00
wscript ctdb-waf: Move ctdb tests to libexec directory 2016-08-04 18:26:07 +02:00

This is the release version of CTDB, a clustered implementation of TDB
database used by Samba and other projects to store temporary data.

This software is freely distributable under the GNU public license,
a copy of which you should have received with this software (in a file
called COPYING).

For documentation on CTDB, please visit CTDB website http://ctdb.samba.org.