import device-mapper-multipath-0.8.3-3.el8_2.3
This commit is contained in:
parent
c080bd0484
commit
738af8fa27
@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Enzo Matsumiya <ematsumiya@suse.de>
|
||||
Date: Fri, 7 Feb 2020 11:45:25 -0300
|
||||
Subject: [PATCH] libmultipath: fix files read from config_dir
|
||||
|
||||
If config_dir contains a file named, for example, "some.conf.backup", this file
|
||||
will still be loaded by multipath because process_config_dir()
|
||||
(libmultipath/config.c) uses strstr() to check for the ".conf" extension, but
|
||||
that doesn't guarantee that ".conf" is at the end of the filename.
|
||||
|
||||
This patch will make sure that only files ending in ".conf" are loaded from
|
||||
config_dir.
|
||||
|
||||
This is to comply with config_dir entry description in man 5 multipath.conf.
|
||||
|
||||
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/config.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index 2c32acf7..791d16a1 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -684,8 +684,11 @@ process_config_dir(struct config *conf, vector keywords, char *dir)
|
||||
sr.n = n;
|
||||
pthread_cleanup_push_cast(free_scandir_result, &sr);
|
||||
for (i = 0; i < n; i++) {
|
||||
- if (!strstr(namelist[i]->d_name, ".conf"))
|
||||
+ char *ext = strrchr(namelist[i]->d_name, '.');
|
||||
+
|
||||
+ if (!ext || strcmp(ext, ".conf"))
|
||||
continue;
|
||||
+
|
||||
old_hwtable_size = VECTOR_SIZE(conf->hwtable);
|
||||
snprintf(path, LINE_MAX, "%s/%s", dir, namelist[i]->d_name);
|
||||
path[LINE_MAX-1] = '\0';
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.8.3
|
||||
Release: 3%{?dist}.2
|
||||
Release: 3%{?dist}.3
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -32,6 +32,7 @@ Patch00018: 0018-RH-Fix-nvme-compilation-warning.patch
|
||||
Patch00019: 0019-RH-attempt-to-get-ANA-info-via-sysfs-first.patch
|
||||
Patch00020: 0020-libmultipath-make-dm_get_map-status-return-codes-sym.patch
|
||||
Patch00021: 0021-multipathd-fix-check_path-errors-with-removed-map.patch
|
||||
Patch00022: 0022-libmultipath-fix-files-read-from-config_dir.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -233,6 +234,11 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Tue Jul 21 2020 Benjamin Marzinski <bmarzins@redhat.com> 0.8.3-3.3
|
||||
- Add 0022-libmultipath-fix-files-read-from-config_dir.patch
|
||||
* Fix for bz #1858993. Only read files ending in .conf
|
||||
- Resolves: bz #1858993
|
||||
|
||||
* Fri Jul 17 2020 Benjamin Marzinski <bmarzins@redhat.com> 0.8.3-3.2
|
||||
- Bump release number for rebuild
|
||||
- Resolves: bz #1856944
|
||||
|
Loading…
Reference in New Issue
Block a user