<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/ctdb/server/eventscript.c, branch v4-7-stable</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>ctdb-daemon: Use sock_clean() to remove stale sockets</title>
<updated>2017-02-17T13:45:10+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2017-01-30T03:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2458752fd06b3ebf760455208a524e335b9d48ba'/>
<id>2458752fd06b3ebf760455208a524e335b9d48ba</id>
<content type='text'>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;

Autobuild-User(master): Martin Schwenke &lt;martins@samba.org&gt;
Autobuild-Date(master): Fri Feb 17 14:45:10 CET 2017 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;

Autobuild-User(master): Martin Schwenke &lt;martins@samba.org&gt;
Autobuild-Date(master): Fri Feb 17 14:45:10 CET 2017 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Remove stale eventd socket</title>
<updated>2017-01-17T14:00:15+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2017-01-13T05:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=49fb663d6e48e9c8a4759cc4c68bc877c798c6c2'/>
<id>49fb663d6e48e9c8a4759cc4c68bc877c798c6c2</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12513

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;

Autobuild-User(master): Martin Schwenke &lt;martins@samba.org&gt;
Autobuild-Date(master): Tue Jan 17 15:00:15 CET 2017 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12513

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;

Autobuild-User(master): Martin Schwenke &lt;martins@samba.org&gt;
Autobuild-Date(master): Tue Jan 17 15:00:15 CET 2017 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Switch to using event daemon</title>
<updated>2016-12-18T13:23:23+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2016-09-16T10:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=69b1ae34231f20d45bff5bdd50c0a2adfc87f90b'/>
<id>69b1ae34231f20d45bff5bdd50c0a2adfc87f90b</id>
<content type='text'>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Add functions to talk to event daemon</title>
<updated>2016-12-18T13:23:23+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2016-08-27T07:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=bcd7444c57447983f571cbbe3ceed7d5558040e9'/>
<id>bcd7444c57447983f571cbbe3ceed7d5558040e9</id>
<content type='text'>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Refactor check for valid events during recovery</title>
<updated>2016-12-18T13:23:23+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2016-09-16T08:44:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=21cac65b67b2f9880586404f6492260541f05e30'/>
<id>21cac65b67b2f9880586404f6492260541f05e30</id>
<content type='text'>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Drop implementation of eventscript controls</title>
<updated>2016-12-18T13:23:23+00:00</updated>
<author>
<name>Amitay Isaacs</name>
<email>amitay@gmail.com</email>
</author>
<published>2016-09-12T01:25:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=def5f4b1bfeeddba97141a3d3c08ac5a1187ce32'/>
<id>def5f4b1bfeeddba97141a3d3c08ac5a1187ce32</id>
<content type='text'>
Following controls are now implemented by event daemon
 - RUN_EVENTSCRIPTS
 - GET_EVENT_SCRIPT_STATUS
 - ENABLE_SCRIPT
 - DISABLE_SCRIPT

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following controls are now implemented by event daemon
 - RUN_EVENTSCRIPTS
 - GET_EVENT_SCRIPT_STATUS
 - ENABLE_SCRIPT
 - DISABLE_SCRIPT

Signed-off-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-common: Drop CTDB's copy of sys_read() and sys_write()</title>
<updated>2016-11-29T10:22:40+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2016-11-29T01:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=bdc049dfcea9756f4d5a1f2ad6fb0685181f8ad0'/>
<id>bdc049dfcea9756f4d5a1f2ad6fb0685181f8ad0</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Tue Nov 29 11:22:40 CET 2016 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Tue Nov 29 11:22:40 CET 2016 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Don't steal control structure before synchronous reply</title>
<updated>2016-09-01T11:30:10+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2016-08-30T22:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9d975b860d52030a702723c70791c6a2829107c0'/>
<id>9d975b860d52030a702723c70791c6a2829107c0</id>
<content type='text'>
If *async_reply isn't set then the calling code will reply to the
control and free the control structure.  In some places the control
structure pointer is stolen onto state before a synchronous exit due
to an error condition.  The error handling then frees state and
returns an error.  The calling code will access-after-free when trying
to reply to the control.

To make this easier to understand, the convention is that any
(immediate) error results in a synchronous reply to the control via an
error return code AND *async_reply not being set.  In this case the
control structure pointer should never be stolen onto state.  State is
never used for a synchronous reply, it is only ever used by a
callback.

Also initialise state-&gt;c to NULL so that any premature call to a
callback (e.g. in an immediate error path) is more obvious.

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

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If *async_reply isn't set then the calling code will reply to the
control and free the control structure.  In some places the control
structure pointer is stolen onto state before a synchronous exit due
to an error condition.  The error handling then frees state and
returns an error.  The calling code will access-after-free when trying
to reply to the control.

To make this easier to understand, the convention is that any
(immediate) error results in a synchronous reply to the control via an
error return code AND *async_reply not being set.  In this case the
control structure pointer should never be stolen onto state.  State is
never used for a synchronous reply, it is only ever used by a
callback.

Also initialise state-&gt;c to NULL so that any premature call to a
callback (e.g. in an immediate error path) is more obvious.

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

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Handle failure immediately, do housekeeping later</title>
<updated>2016-09-01T11:30:10+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2016-08-26T06:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=582518c7e89b279e34147bdb0b04b73056fac048'/>
<id>582518c7e89b279e34147bdb0b04b73056fac048</id>
<content type='text'>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-daemon: Schedule running of callback if there are no event scripts</title>
<updated>2016-09-01T11:30:10+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2016-08-26T06:29:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9076c44f35bf309b9e183bae98829f7154b93f33'/>
<id>9076c44f35bf309b9e183bae98829f7154b93f33</id>
<content type='text'>
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.

ctdb_event_script_callback_v() must succeed when there are no event
scripts.  On success the caller will mark the call as asynchronous and
expect the callback to be called.  Given that it can't be called
before return then it needs to be scheduled.

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

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

ctdb_event_script_callback_v() must succeed when there are no event
scripts.  On success the caller will mark the call as asynchronous and
expect the callback to be called.  Given that it can't be called
before return then it needs to be scheduled.

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

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
