From 598898e105dcbed6cc2809b9872facc0862e4232 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 25 2022 05:28:26 +0000 Subject: import udisks2-2.9.0-9.el8 --- diff --git a/SOURCES/udisks-2.10.0-udiskslinuxencrypted_GError.patch b/SOURCES/udisks-2.10.0-udiskslinuxencrypted_GError.patch new file mode 100644 index 0000000..572a187 --- /dev/null +++ b/SOURCES/udisks-2.10.0-udiskslinuxencrypted_GError.patch @@ -0,0 +1,30 @@ +From 486778c778a4ddb24395408c6b267e702e19ae02 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Sat, 1 Jan 2022 22:01:49 +0100 +Subject: [PATCH] udiskslinuxencrypted: Fix GError ownership + +--- + src/udiskslinuxencrypted.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/udiskslinuxencrypted.c b/src/udiskslinuxencrypted.c +index c3a0821ac..3bc54e695 100644 +--- a/src/udiskslinuxencrypted.c ++++ b/src/udiskslinuxencrypted.c +@@ -1040,7 +1040,7 @@ handle_resize (UDisksEncrypted *encrypted, + object = udisks_daemon_util_dup_object (encrypted, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -1066,7 +1066,6 @@ handle_resize (UDisksEncrypted *encrypted, + if (!udisks_daemon_util_get_caller_uid_sync (daemon, invocation, NULL /* GCancellable */, &caller_uid, &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); +- g_clear_error (&error); + goto out; + } + diff --git a/SOURCES/udisks-2.10.0-udiskslinuxfilesystem_GError.patch b/SOURCES/udisks-2.10.0-udiskslinuxfilesystem_GError.patch new file mode 100644 index 0000000..dae7068 --- /dev/null +++ b/SOURCES/udisks-2.10.0-udiskslinuxfilesystem_GError.patch @@ -0,0 +1,49 @@ +From 223256777f6e269b8501d95a64c4c6095a7a8a3e Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Sat, 1 Jan 2022 22:02:17 +0100 +Subject: [PATCH] udiskslinuxfilesystem: Fix GError ownership + +--- + src/udiskslinuxfilesystem.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c +index f7c99757a..a8390a044 100644 +--- a/src/udiskslinuxfilesystem.c ++++ b/src/udiskslinuxfilesystem.c +@@ -1739,7 +1739,7 @@ handle_resize (UDisksFilesystem *filesystem, + object = udisks_daemon_util_dup_object (filesystem, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -1921,7 +1921,7 @@ handle_repair (UDisksFilesystem *filesystem, + object = udisks_daemon_util_dup_object (filesystem, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -2089,7 +2089,7 @@ handle_check (UDisksFilesystem *filesystem, + object = udisks_daemon_util_dup_object (filesystem, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -2257,7 +2257,7 @@ handle_take_ownership (UDisksFilesystem *filesystem, + object = udisks_daemon_util_dup_object (filesystem, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + diff --git a/SOURCES/udisks-2.10.0-udiskslinuxpartition_GError.patch b/SOURCES/udisks-2.10.0-udiskslinuxpartition_GError.patch new file mode 100644 index 0000000..d2bdec4 --- /dev/null +++ b/SOURCES/udisks-2.10.0-udiskslinuxpartition_GError.patch @@ -0,0 +1,70 @@ +From 7c9933c0f80faaabbed607983fdf77f8c4562df6 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Sat, 1 Jan 2022 20:11:57 +0100 +Subject: [PATCH] udiskslinuxpartition: Fix GError ownership + +--- + src/udiskslinuxpartition.c | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c +index 5461b3903..3d970768d 100644 +--- a/src/udiskslinuxpartition.c ++++ b/src/udiskslinuxpartition.c +@@ -135,8 +135,7 @@ check_authorization (UDisksPartition *partition, + caller_uid, + &error)) + { +- g_dbus_method_invocation_return_gerror (invocation, error); +- g_clear_error (&error); ++ g_dbus_method_invocation_take_error (invocation, error); + goto out; + } + +@@ -351,7 +350,7 @@ handle_set_flags (UDisksPartition *partition, + object = udisks_daemon_util_dup_object (partition, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -499,7 +498,7 @@ handle_set_name (UDisksPartition *partition, + object = udisks_daemon_util_dup_object (partition, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -873,7 +872,7 @@ handle_resize (UDisksPartition *partition, + object = udisks_daemon_util_dup_object (partition, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -994,7 +993,7 @@ handle_delete (UDisksPartition *partition, + object = udisks_daemon_util_dup_object (partition, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -1012,9 +1011,7 @@ handle_delete (UDisksPartition *partition, + if (!udisks_linux_block_teardown (block, invocation, options, &error)) + { + if (invocation != NULL) +- g_dbus_method_invocation_take_error (invocation, error); +- else +- g_clear_error (&error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + } diff --git a/SOURCES/udisks-2.10.0-udiskslinuxpartitiontable_GError.patch b/SOURCES/udisks-2.10.0-udiskslinuxpartitiontable_GError.patch new file mode 100644 index 0000000..d97851e --- /dev/null +++ b/SOURCES/udisks-2.10.0-udiskslinuxpartitiontable_GError.patch @@ -0,0 +1,73 @@ +From f486a9fa22c2f9785a4a8fc58eb3be7b0cf934ce Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Sat, 1 Jan 2022 19:59:27 +0100 +Subject: [PATCH] udiskslinuxpartitiontable: Fix GError ownership + +--- + src/udiskslinuxpartitiontable.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/src/udiskslinuxpartitiontable.c b/src/udiskslinuxpartitiontable.c +index b4c301095..14a54c9c7 100644 +--- a/src/udiskslinuxpartitiontable.c ++++ b/src/udiskslinuxpartitiontable.c +@@ -277,7 +277,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + object = udisks_daemon_util_dup_object (table, &error); + if (object == NULL) + { +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + goto out; + } + +@@ -293,7 +293,6 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + goto out; + } + +- error = NULL; + if (!udisks_daemon_util_get_caller_uid_sync (daemon, + invocation, + NULL /* GCancellable */, +@@ -301,7 +300,6 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + &error)) + { + g_dbus_method_invocation_return_gerror (invocation, error); +- g_clear_error (&error); + goto out; + } + +@@ -464,7 +462,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + if (!bd_part_set_part_name (device_name, part_spec->path, name, &error)) + { + g_prefix_error (&error, "Error setting name for newly created partition: "); +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message); + goto out; + } +@@ -483,7 +481,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + if (!ret) + { + g_prefix_error (&error, "Error setting type for newly created partition: "); +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message); + goto out; + } +@@ -520,7 +518,6 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + /* sit and wait for the partition to show up */ + g_warn_if_fail (wait_data->pos_to_wait_for > 0); + wait_data->partition_table_object = object; +- error = NULL; + partition_object = udisks_daemon_wait_for_object_sync (daemon, + wait_for_partition, + wait_data, +@@ -530,7 +527,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta + if (partition_object == NULL) + { + g_prefix_error (&error, "Error waiting for partition to appear: "); +- g_dbus_method_invocation_take_error (invocation, error); ++ g_dbus_method_invocation_return_gerror (invocation, error); + udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message); + goto out; + } diff --git a/SOURCES/udisks-2.10.0-vdo_test_writeAmplificationRatio.patch b/SOURCES/udisks-2.10.0-vdo_test_writeAmplificationRatio.patch new file mode 100644 index 0000000..e232e77 --- /dev/null +++ b/SOURCES/udisks-2.10.0-vdo_test_writeAmplificationRatio.patch @@ -0,0 +1,25 @@ +From 0edd6f5579c964323d86897aff9476c20d7901ba Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 22 Nov 2021 14:23:08 +0100 +Subject: [PATCH] tests: Do not check that writeAmplificationRatio is bigger + than 0 + +Apparently the bios_in_write value is now 0 for newly created VDO +pools and because we use it for the writeAmplificationRatio +calculation we get zero too. +--- + src/tests/dbus-tests/test_20_LVM.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/tests/dbus-tests/test_20_LVM.py b/src/tests/dbus-tests/test_20_LVM.py +index 7fbff0434..fde7c3f3f 100644 +--- a/src/tests/dbus-tests/test_20_LVM.py ++++ b/src/tests/dbus-tests/test_20_LVM.py +@@ -508,7 +508,6 @@ def test_create(self): + # get statistics and do some simple sanity check + stats = lv.GetStatistics(self.no_options, dbus_interface=self.iface_prefix + '.VDOVolume') + self.assertIn("writeAmplificationRatio", stats.keys()) +- self.assertGreater(float(stats["writeAmplificationRatio"]), 0) + + def test_enable_disable_compression_deduplication(self): + vgname = 'udisks_test_vdo_vg' diff --git a/SPECS/udisks2.spec b/SPECS/udisks2.spec index e26adf2..acae95f 100644 --- a/SPECS/udisks2.spec +++ b/SPECS/udisks2.spec @@ -56,7 +56,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: https://github.com/storaged-project/udisks @@ -78,6 +78,14 @@ Patch17: udisks-2.9.4-ext-mount-options.patch Patch20: udisks-2.10.0-tests-drive_ata-apm.patch Patch21: udisks-2.10.0-tests-no-dev_disk-by-path.patch Patch22: tests-disable-zram.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2023880 +# https://bugzilla.redhat.com/show_bug.cgi?id=2025483 +Patch23: udisks-2.10.0-vdo_test_writeAmplificationRatio.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1999149 +Patch24: udisks-2.10.0-udiskslinuxencrypted_GError.patch +Patch25: udisks-2.10.0-udiskslinuxpartition_GError.patch +Patch26: udisks-2.10.0-udiskslinuxpartitiontable_GError.patch +Patch27: udisks-2.10.0-udiskslinuxfilesystem_GError.patch BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -296,6 +304,11 @@ This package contains module for VDO management. %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" %build @@ -488,6 +501,10 @@ fi %endif %changelog +* Tue Feb 01 2022 Tomas Bzatek - 2.9.0-9 +- Fix LVM-VDO statistics tests (#2023880,#2025483) +- Fix GError ownership (#1999149) + * Mon Oct 25 2021 Tomas Bzatek - 2.9.0-8 - CVE-2021-3802: Harden the default mount options for ext filesystems (#2004422)