- Filesystem: fail when leading or trailing whitespace is present in

device or directory parameters

  Resolves: RHEL-24683
This commit is contained in:
Oyvind Albrigtsen 2024-06-25 14:17:54 +02:00
parent 9e605117dc
commit 9015957e38
3 changed files with 46 additions and 10 deletions

View File

@ -0,0 +1,30 @@
From 1317efc72af6b72d9fb37aea18dc16129c146148 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Tue, 25 Jun 2024 13:33:19 +0200
Subject: [PATCH] Filesystem: return success during stop-action when leading or
trailing whitespace is present in device or directory parameters
---
heartbeat/Filesystem | 2 ++
1 file changed, 2 insertions(+)
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
index 8e0127531..3eb520e0c 100755
--- a/heartbeat/Filesystem
+++ b/heartbeat/Filesystem
@@ -1037,6 +1037,7 @@ fi
DEVICE="$OCF_RESKEY_device"
case "$DEVICE" in
[[:space:]]*|*[[:space:]])
+ [ "$__OCF_ACTION" = "stop" ] && exit $OCF_SUCCESS
ocf_exit_reason "device parameter does not accept leading or trailing whitespace characters"
exit $OCF_ERR_CONFIGURED
;;
@@ -1080,6 +1081,7 @@ else
: ${MOUNTPOINT:=/}
case "$MOUNTPOINT" in
[[:space:]]*|*[[:space:]])
+ [ "$__OCF_ACTION" = "stop" ] && exit $OCF_SUCCESS
ocf_exit_reason "directory parameter does not accept leading or trailing whitespace characters"
exit $OCF_ERR_CONFIGURED
;;

View File

@ -45,7 +45,7 @@
Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.10.0
Release: 58%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
Release: 59%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
License: GPLv2+ and LGPLv2+
URL: https://github.com/ClusterLabs/resource-agents
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
@ -122,12 +122,13 @@ Patch69: RHEL-15304-2-findif.sh-dont-use-table-parameter.patch
Patch70: RHEL-31763-galera-fix-joiner-promotion-fails-issue.patch
Patch71: RHEL-16246-aws-agents-use-curl_retry.patch
Patch72: RHEL-34777-Filesystem-fail-when-incorrect-device-mounted.patch
Patch73: RHEL-24683-Filesystem-fail-leading-trailing-whitespace.patch
Patch74: RHEL-32265-1-findif.sh-fix-corner-cases.patch
Patch75: RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch
Patch76: RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch
Patch77: RHEL-40393-Filesystem-2-update-bsd-logic.patch
Patch78: RHEL-32829-db2-fix-OCF_SUCESS-typo.patch
Patch73: RHEL-24683-1-Filesystem-fail-leading-trailing-whitespace.patch
Patch74: RHEL-24683-2-Filesystem-return-success-stop-action.patch
Patch75: RHEL-32265-1-findif.sh-fix-corner-cases.patch
Patch76: RHEL-32265-2-IPsrcaddr-add-IPv6-support.patch
Patch77: RHEL-40393-Filesystem-1-dont-kill-unrelated-processes.patch
Patch78: RHEL-40393-Filesystem-2-update-bsd-logic.patch
Patch79: RHEL-32829-db2-fix-OCF_SUCESS-typo.patch
# bundled ha-cloud-support libs
Patch500: ha-cloud-support-aws.patch
@ -330,6 +331,7 @@ exit 1
%patch -p1 -P 76
%patch -p1 -P 77
%patch -p1 -P 78
%patch -p1 -P 79
# bundled ha-cloud-support libs
%patch -p1 -P 500
@ -651,10 +653,17 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
%changelog
* Tue Jun 25 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-59
- Filesystem: fail when leading or trailing whitespace is present in
device or directory parameters
Resolves: RHEL-24683
* Tue Jun 11 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-58
- IPsrcaddr: add IPv6 support
- Filesystem: dont kill unrelated processes during stop-action
- db2: fix OCF_SUCESS typo
Resolves: RHEL-32265
Resolves: RHEL-40393
Resolves: RHEL-32829
@ -662,11 +671,8 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
* Wed May 15 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-57
- Filesystem: fail when incorrect device mounted on mountpoint, and
dont unmount the mountpoint in this case, or if mountpoint set to "/"
- Filesystem: fail when leading or trailing whitespace is present in
device or directory parameters
Resolves: RHEL-34777
Resolves: RHEL-24683
* Tue Apr 30 2024 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-56
- AWS agents: retry failed metadata requests to avoid instantly