From c8dee361612a2c71ebb67b4439e003d6b1820bed Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 8 Nov 2023 15:43:16 +0300 Subject: [PATCH] import libstoragemgmt-1.9.7-2.el9 --- .gitignore | 2 +- .libstoragemgmt.metadata | 2 +- SOURCES/0001-Correction-for-fips-error.patch | 63 ++++++++++++++++++++ SOURCES/0001-change-run-dir.patch | 9 --- SPECS/libstoragemgmt.spec | 12 +++- 5 files changed, 74 insertions(+), 14 deletions(-) create mode 100644 SOURCES/0001-Correction-for-fips-error.patch delete mode 100644 SOURCES/0001-change-run-dir.patch diff --git a/.gitignore b/.gitignore index 60f7b27..23ebaef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libstoragemgmt-1.9.5.tar.gz +SOURCES/libstoragemgmt-1.9.7.tar.gz diff --git a/.libstoragemgmt.metadata b/.libstoragemgmt.metadata index 388981f..644b270 100644 --- a/.libstoragemgmt.metadata +++ b/.libstoragemgmt.metadata @@ -1 +1 @@ -43714185f0cda2f18de370e62e1d959efea691a5 SOURCES/libstoragemgmt-1.9.5.tar.gz +d1d300522b73f1db12763100d0bc0abcd01af5e4 SOURCES/libstoragemgmt-1.9.7.tar.gz diff --git a/SOURCES/0001-Correction-for-fips-error.patch b/SOURCES/0001-Correction-for-fips-error.patch new file mode 100644 index 0000000..41470dd --- /dev/null +++ b/SOURCES/0001-Correction-for-fips-error.patch @@ -0,0 +1,63 @@ +From bbb13a7970c4d82d2e7bace5e96056ef469eb7b3 Mon Sep 17 00:00:00 2001 +From: Tony Asleson +Date: Fri, 14 Apr 2023 10:43:27 -0500 +Subject: [PATCH] Correction for fips error + +When running on a fips enabled system we encounter the following +error: + +PLUGIN_BUG(2): [digital envelope routines] unsupported Data: Traceback (most recent call last): +... + File "/usr/lib64/python3.9/site-packages/lsm/_common.py", line 348, in md5 + h = hashlib.md5() +ValueError: [digital envelope routines] unsupported + +Utilize the usedforsecurity=False parameter to md5 to indicate that our +use is not for security related purposes. + +Signed-off-by: Tony Asleson +--- + plugin/nfs_plugin/nfs.py | 8 +++++++- + python_binding/lsm/_common.py | 7 ++++++- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/plugin/nfs_plugin/nfs.py b/plugin/nfs_plugin/nfs.py +index 8a87652..11ce3c2 100644 +--- a/plugin/nfs_plugin/nfs.py ++++ b/plugin/nfs_plugin/nfs.py +@@ -55,7 +55,13 @@ def _export_id(path, auth_type, anon_uid, anon_gid, options): + if auth_type is None: + auth_type = 'sec' + +- hsh = hashlib.md5() ++ try: ++ # The use of md5 is not used for security, indicate ++ # this to hashlib so that we can run when fips is enabled ++ hsh = hashlib.md5(usedforsecurity=False) ++ except Exception: ++ hsh = hashlib.md5() ++ + hsh.update(path.encode('utf-8')) + hsh.update(auth_type.encode('utf-8')) + if anon_uid is not None and anon_uid != NfsExport.ANON_UID_GID_NA: +diff --git a/python_binding/lsm/_common.py b/python_binding/lsm/_common.py +index 1220381..163f726 100644 +--- a/python_binding/lsm/_common.py ++++ b/python_binding/lsm/_common.py +@@ -345,7 +345,12 @@ def uri_parameters(uri): + # @param t Item to generate signature on. + # @returns md5 hex digest. + def md5(t): +- h = hashlib.md5() ++ try: ++ # The use of md5 is not used for security, indicate ++ # this to hashlib so that we can run when fips is enabled ++ h = hashlib.md5(usedforsecurity=False) ++ except Exception: ++ h = hashlib.md5() + h.update(t.encode("utf-8")) + return h.hexdigest() + +-- +2.39.2 + diff --git a/SOURCES/0001-change-run-dir.patch b/SOURCES/0001-change-run-dir.patch deleted file mode 100644 index a8616c0..0000000 --- a/SOURCES/0001-change-run-dir.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/packaging/daemon/libstoragemgmt.conf b/packaging/daemon/libstoragemgmt.conf -index 1c118a9..cdb43c2 100644 ---- a/packaging/daemon/libstoragemgmt.conf -+++ b/packaging/daemon/libstoragemgmt.conf -@@ -1,2 +1,2 @@ --D /var/run/lsm 0775 root libstoragemgmt - --D /var/run/lsm/ipc 0775 root libstoragemgmt - -+D /run/lsm 0775 root libstoragemgmt - -+D /run/lsm/ipc 0775 root libstoragemgmt - diff --git a/SPECS/libstoragemgmt.spec b/SPECS/libstoragemgmt.spec index f9a37d5..7b72cd6 100644 --- a/SPECS/libstoragemgmt.spec +++ b/SPECS/libstoragemgmt.spec @@ -1,13 +1,13 @@ %bcond_with test Name: libstoragemgmt -Version: 1.9.5 -Release: 1%{?dist} +Version: 1.9.7 +Release: 2%{?dist} Summary: Storage array management library License: LGPLv2+ URL: https://github.com/libstorage/libstoragemgmt Source0: https://github.com/libstorage/libstoragemgmt/releases/download/%{version}/%{name}-%{version}.tar.gz -Patch1: 0001-change-run-dir.patch +Patch1: 0001-Correction-for-fips-error.patch Requires: python3-%{name}%{_isa} # Packages that have been removed @@ -444,6 +444,12 @@ fi %{_mandir}/man1/local_lsmplugin.1* %changelog +* Tue Apr 18 2023 Tony Asleson - 1.9.7-2 +- FIPS correction ref: https://issues.redhat.com/browse/RHEL-376 + +* Wed Feb 22 2023 Tony Asleson - 1.9.7-1 +- Upgrade to 1.9.7 + * Thu Oct 27 2022 Tony Asleson - 1.9.5-1 - Upgrade to 1.9.5 - Use systemd-sysusers