Blame SOURCES/041-bundle-port-fixes.patch

60de42
From 1e37d7b1eefca9087afa7f82e3928ca1ff8b47e1 Mon Sep 17 00:00:00 2001
60de42
From: Andrew Beekhof <andrew@beekhof.net>
60de42
Date: Thu, 23 Mar 2017 11:26:00 +1100
60de42
Subject: [PATCH 1/2] PE: Bundle: Fix use-after-free of control port
60de42
60de42
---
60de42
 lib/pengine/container.c | 2 +-
60de42
 1 file changed, 1 insertion(+), 1 deletion(-)
60de42
60de42
diff --git a/lib/pengine/container.c b/lib/pengine/container.c
60de42
index 71b74ed..6f3a3b9 100644
60de42
--- a/lib/pengine/container.c
60de42
+++ b/lib/pengine/container.c
60de42
@@ -576,7 +576,7 @@ container_unpack(resource_t * rsc, pe_working_set_t * data_set)
60de42
         container_data->mounts = g_list_append(container_data->mounts, mount);
60de42
 
60de42
         if(container_data->control_port) {
60de42
-            container_data->ports = g_list_append(container_data->ports, container_data->control_port);
60de42
+            container_data->ports = g_list_append(container_data->ports, strdup(container_data->control_port));
60de42
         } else {
60de42
             container_data->ports = g_list_append(container_data->ports, crm_itoa(DEFAULT_REMOTE_PORT));
60de42
         }
60de42
-- 
60de42
1.8.3.1
60de42
60de42
60de42
From 3ffafe02f63b2e57b866782c4693ef9ed6e7b1db Mon Sep 17 00:00:00 2001
60de42
From: Andrew Beekhof <andrew@beekhof.net>
60de42
Date: Thu, 23 Mar 2017 11:57:56 +1100
60de42
Subject: [PATCH 2/2] remote: Correctly expose the -p option
60de42
60de42
---
60de42
 lrmd/main.c | 2 +-
60de42
 1 file changed, 1 insertion(+), 1 deletion(-)
60de42
60de42
diff --git a/lrmd/main.c b/lrmd/main.c
60de42
index 5f5873a..ca8cdf2 100644
60de42
--- a/lrmd/main.c
60de42
+++ b/lrmd/main.c
60de42
@@ -399,7 +399,7 @@ static struct crm_option long_options[] = {
60de42
     {"verbose", 0, 0,    'V', "\tIncrease debug output"},
60de42
 
60de42
     {"logfile", 1, 0,    'l', "\tSend logs to the additional named logfile"},
60de42
-#ifndef ENABLE_PCMK_REMOTE
60de42
+#ifdef ENABLE_PCMK_REMOTE
60de42
     {"port", 1, 0,       'p', "\tPort to listen on"},
60de42
 #endif
60de42
 
60de42
-- 
60de42
1.8.3.1
60de42