[dlm/f18] dlm_stonith: include errno.h
David Teigland
teigland at fedoraproject.org
Thu Aug 16 17:54:53 UTC 2012
commit 954b760ce738fbe7595deef5ed5dec9ef703c61f
Author: David Teigland <teigland at redhat.com>
Date: Thu Aug 16 12:54:04 2012 -0500
dlm_stonith: include errno.h
...d-fix-uninitialized-mem-for-fence_all-con.patch | 29 ++++++++++++++++++++
0002-dlm_stonith-include-errno.h.patch | 27 ++++++++++++++++++
dlm.spec | 7 ++++-
3 files changed, 62 insertions(+), 1 deletions(-)
---
diff --git a/0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch b/0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch
new file mode 100644
index 0000000..6194add
--- /dev/null
+++ b/0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch
@@ -0,0 +1,29 @@
+From 5e069a534379611e08714ac81870af6b387a4038 Mon Sep 17 00:00:00 2001
+From: David Teigland <teigland at redhat.com>
+Date: Thu, 16 Aug 2012 11:29:43 -0500
+Subject: [PATCH 1/2] dlm_controld: fix uninitialized mem for fence_all config
+
+If the fence_all config option is used, this could cause
+unfencing to be used when it shouldn't, which could cause
+startup to fail.
+
+Signed-off-by: David Teigland <teigland at redhat.com>
+---
+ dlm_controld/fence_config.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/dlm_controld/fence_config.c b/dlm_controld/fence_config.c
+index 66a1ad6..5d8d7dc 100644
+--- a/dlm_controld/fence_config.c
++++ b/dlm_controld/fence_config.c
+@@ -251,6 +251,7 @@ int fence_config_init(struct fence_config *fc, unsigned int nodeid, char *path)
+ rv = -ENOMEM;
+ goto out;
+ }
++ memset(dev, 0, sizeof(struct fence_device));
+
+ rv = sscanf(line, "%s %s %[^\n]s\n", dev->name, dev->agent, dev->args);
+ if (rv < 2) {
+--
+1.7.10.1.362.g242cab3
+
diff --git a/0002-dlm_stonith-include-errno.h.patch b/0002-dlm_stonith-include-errno.h.patch
new file mode 100644
index 0000000..383f81b
--- /dev/null
+++ b/0002-dlm_stonith-include-errno.h.patch
@@ -0,0 +1,27 @@
+From e8fdd228dfff06967223c7c5a36ed72129c096e7 Mon Sep 17 00:00:00 2001
+From: David Teigland <teigland at redhat.com>
+Date: Thu, 16 Aug 2012 12:51:13 -0500
+Subject: [PATCH 2/2] dlm_stonith: include errno.h
+
+pacemaker header now needs it
+
+Signed-off-by: David Teigland <teigland at redhat.com>
+---
+ fence/stonith_helper.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fence/stonith_helper.c b/fence/stonith_helper.c
+index df44219..5b384c1 100644
+--- a/fence/stonith_helper.c
++++ b/fence/stonith_helper.c
+@@ -11,6 +11,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <syslog.h>
++#include <errno.h>
+ #include <pacemaker/crm/stonith-ng.h>
+
+ int nodeid;
+--
+1.7.10.1.362.g242cab3
+
diff --git a/dlm.spec b/dlm.spec
index 558907c..7d5e3c9 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -1,6 +1,6 @@
Name: dlm
Version: 3.99.5
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+
# For a breakdown of the licensing, see README.license
Group: System Environment/Kernel
@@ -14,6 +14,7 @@ BuildRequires: systemd-units
Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
Patch0: 0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch
+Patch1: 0002-dlm_stonith-include-errno.h.patch
%if 0%{?rhel}
ExclusiveArch: i686 x86_64
@@ -33,6 +34,7 @@ The kernel dlm requires a user daemon to control cluster membership.
%prep
%setup -q
%patch0 -p1 -b .0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch
+%patch0 -p1 -b .0002-dlm_stonith-include-errno.h.patch
%build
# upstream does not require configure
@@ -112,6 +114,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/*.pc
%changelog
+* Thu Aug 16 2012 David Teigland <teigland at redhat.com> - 3.99.5-4
+- dlm_stonith: include errno.h
+
* Thu Aug 16 2012 David Teigland <teigland at redhat.com> - 3.99.5-3
- dlm_controld: fix uninitialized mem for fence_all config
More information about the scm-commits
mailing list