[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Wed Dec 28 04:19:02 UTC 2016


The branch, master has been updated
       via  3660c76 ctdb-takeover: Clean up when exiting on error
       via  3b0b29b ctdb-takeover: Fix CID 1398169 Unchecked return value
       via  bdaa2bc ctdbd_conn: remove unused fde from struct ctdbd_connection
       via  dd3868a ctdbd_conn: fix a resource leak
      from  91d0275 winbindd: Use idmap cache in xids2sids

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3660c76dce8bfb8b20832cd10151f832d367d9bb
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Dec 28 06:18:26 2016 +1100

    ctdb-takeover: Clean up when exiting on error
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Wed Dec 28 05:18:08 CET 2016 on sn-devel-144

commit 3b0b29bcb6fe5fa3555b234cb30f64e1473b2472
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Dec 28 06:14:56 2016 +1100

    ctdb-takeover: Fix CID 1398169 Unchecked return value
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit bdaa2bcc1dd768d27d3696de23c1e9c6084d58d3
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Dec 27 15:41:51 2016 +0100

    ctdbd_conn: remove unused fde from struct ctdbd_connection
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12485
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit dd3868a5c76cc6d177c393215c6755d1b42d74a6
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Dec 27 09:19:16 2016 +0100

    ctdbd_conn: fix a resource leak
    
    When reinitializing the ctdb messaging subsystem we must free the ctdb
    connection fde.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12485
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/server/ctdb_takeover_helper.c | 10 ++++++++--
 source3/lib/ctdbd_conn.c           |  2 --
 source3/lib/messages_ctdbd.c       |  2 ++
 3 files changed, 10 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_takeover_helper.c b/ctdb/server/ctdb_takeover_helper.c
index 3057528..f83b914 100644
--- a/ctdb/server/ctdb_takeover_helper.c
+++ b/ctdb/server/ctdb_takeover_helper.c
@@ -1160,11 +1160,17 @@ int main(int argc, const char *argv[])
 		force_rebalance_nodes = parse_node_list(mem_ctx, argv[3]);
 		if (force_rebalance_nodes == NULL) {
 			usage(argv[0]);
-			exit(1);
+			ret = EINVAL;
+			goto done;
 		}
 	}
 
-	logging_init(mem_ctx, NULL, NULL, "ctdb-takeover");
+	ret = logging_init(mem_ctx, NULL, NULL, "ctdb-takeover");
+	if (ret != 0) {
+		fprintf(stderr,
+			"ctdb-takeover: Unable to initialize logging\n");
+		goto done;
+	}
 
 	ev = tevent_context_init(mem_ctx);
 	if (ev == NULL) {
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 118f3a0..d16796f 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -50,7 +50,6 @@ struct ctdbd_connection {
 	uint64_t rand_srvid;
 	struct ctdbd_srvid_cb *callbacks;
 	int fd;
-	struct tevent_fd *fde;
 	int timeout;
 };
 
@@ -394,7 +393,6 @@ static int ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
 
 static int ctdbd_connection_destructor(struct ctdbd_connection *c)
 {
-	TALLOC_FREE(c->fde);
 	if (c->fd != -1) {
 		close(c->fd);
 		c->fd = -1;
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index 5964894..bee2685 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -183,6 +183,8 @@ static int messaging_ctdbd_init_internal(struct messaging_context *msg_ctx,
 	int ret, ctdb_fd;
 
 	if (reinit) {
+		TALLOC_FREE(ctx->fde);
+
 		ret = ctdbd_reinit_connection(ctx,
 					      lp_ctdbd_socket(),
 					      lp_ctdb_timeout(),


-- 
Samba Shared Repository



More information about the samba-cvs mailing list