diff --git a/0001-lvm-dbus-Show-better-error-for-invalid-LVM-IDs.patch b/0001-lvm-dbus-Show-better-error-for-invalid-LVM-IDs.patch new file mode 100644 index 0000000..17383b7 --- /dev/null +++ b/0001-lvm-dbus-Show-better-error-for-invalid-LVM-IDs.patch @@ -0,0 +1,30 @@ +From a0b00c01a4b55a5f19608767ea452046cd7732c4 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 21 Oct 2025 15:34:30 +0200 +Subject: [PATCH] lvm-dbus: Show better error for invalid LVM IDs + +LVM DBus uses assert to check for empty IDs so it produces error +which isn't easy to decipher. + +Resolves: RHEL-123039 +--- + src/plugins/lvm/lvm-dbus.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/plugins/lvm/lvm-dbus.c b/src/plugins/lvm/lvm-dbus.c +index 197dcd12..877a72a5 100644 +--- a/src/plugins/lvm/lvm-dbus.c ++++ b/src/plugins/lvm/lvm-dbus.c +@@ -924,6 +924,12 @@ static GVariant* get_lvm_object_properties (const gchar *obj_id, const gchar *if + GVariant *ret = NULL; + gchar *obj_path = NULL; + ++ if (!obj_id || g_strcmp0 (obj_id, "") == 0) { ++ g_set_error (error, BD_LVM_ERROR, BD_LVM_ERROR_NOEXIST, ++ "Invalid LVM ID specified"); ++ return NULL; ++ } ++ + args = g_variant_new ("(s)", obj_id); + /* consumes (frees) the 'args' parameter */ + ret = g_dbus_connection_call_sync (bus, LVM_BUS_NAME, MANAGER_OBJ, MANAGER_INTF, diff --git a/libblockdev.spec b/libblockdev.spec index ccceab5..00f25a3 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -92,12 +92,14 @@ Name: libblockdev Version: 3.4.0 -Release: 1%{?dist}.alma.1 +Release: 2%{?dist}.alma.1 Summary: A library for low-level manipulation with block devices License: LGPL-2.1-or-later URL: https://github.com/storaged-project/libblockdev Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-lvm-dbus-Show-better-error-for-invalid-LVM-IDs.patch + BuildRequires: make BuildRequires: glib2-devel %if %{with_gi} @@ -952,9 +954,13 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %files plugins-all %changelog -* Fri Sep 26 2025 Neal Gompa - 3.4.0-1.alma.1 +* Sat Nov 01 2025 Neal Gompa - 3.4.0-2.alma.1 - AlmaLinux changes: Enable Btrfs support +* Thu Oct 30 2025 Vojtech Trefny - 3.4.0-2 +- lvm-dbus: Show better error for invalid LVM IDs + Resolves: RHEL-123039 + * Thu Sep 25 2025 Vojtech Trefny - 3.4.0-1 - Update to 3.4.0 Resolves: RHEL-114971