diff --git a/SOURCES/bz1683438-fix-vrrp_script-execution.patch b/SOURCES/bz1683438-fix-vrrp_script-execution.patch new file mode 100644 index 0000000..3f8519e --- /dev/null +++ b/SOURCES/bz1683438-fix-vrrp_script-execution.patch @@ -0,0 +1,51 @@ +From 4e60fead497c9e99953dd6106c6a5869182533cc Mon Sep 17 00:00:00 2001 +From: Quentin Armitage +Date: Thu, 9 May 2019 19:23:46 +0100 +Subject: [PATCH] Don't enclose /dev/tcp/127.0.0.1/22 in ' chars when running + as script + +RedHat identified a problem with scripts like: + vrrp_script { + script "' resolves the problem. + +Signed-off-by: Quentin Armitage +--- + lib/notify.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/lib/notify.c b/lib/notify.c +index 2f60e24c..1984bde3 100644 +--- a/lib/notify.c ++++ b/lib/notify.c +@@ -130,10 +130,18 @@ cmd_str_r(const notify_script_t *script, char *buf, size_t len) + + if (i) + *str_p++ = ' '; +- *str_p++ = '\''; ++ ++ /* Allow special case of bash script which is redirection only to ++ * test for file existence. */ ++ if (i || (script->args[i][0] != '<' && script->args[i][0] != '>')) ++ *str_p++ = '\''; ++ + strcpy(str_p, script->args[i]); + str_p += str_len; +- *str_p++ = '\''; ++ ++ /* Close opening ' if we added one */ ++ if (i || (script->args[i][0] != '<' && script->args[i][0] != '>')) ++ *str_p++ = '\''; + } + *str_p = '\0'; + +-- +2.24.1 + diff --git a/SPECS/keepalived.spec b/SPECS/keepalived.spec index 94792e0..bb6a6ef 100644 --- a/SPECS/keepalived.spec +++ b/SPECS/keepalived.spec @@ -10,7 +10,7 @@ Name: keepalived Summary: High Availability monitor built upon LVS, VRRP and service pollers Version: 2.0.10 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ URL: http://www.keepalived.org/ Group: System Environment/Daemons @@ -25,6 +25,7 @@ Patch4: bz1688892-fix-openssl-init-configure.patch Patch5: bz1693706-fix-smtp-alerts-segfault.patch Patch6: bz1693706-fix-smtp_helo_name-double-free.patch Patch7: bz1792160-fix-fault-rename-interface.patch +Patch8: bz1683438-fix-vrrp_script-execution.patch Requires(post): systemd Requires(preun): systemd @@ -67,6 +68,7 @@ infrastructures. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %build %configure \ @@ -117,6 +119,9 @@ mkdir -p %{buildroot}%{_libexecdir}/keepalived %{_mandir}/man8/keepalived.8* %changelog +* Tue Jun 16 2020 Ryan O'Hara - 2.0.10-11 +- Fix vrrp_script execution (#1683438) + * Mon Feb 24 2020 Ryan O'Hara - 2.0.10-10 - Disable libiptc/ipset (#1806642)