From bec888cb71881d8f397612388e609a3ad9a524c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:07 +0100 Subject: [PATCH 01/36] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- udisks2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/udisks2.spec b/udisks2.spec index 3d0064d..1a55969 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -48,7 +48,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 @@ -426,6 +426,10 @@ fi %endif %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.9.2-2 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Thu Feb 04 2021 Tomas Bzatek - 2.9.2-1 - Version 2.9.2 From 8eb05435f07a89544f717607667b28049f1313f5 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 26 Mar 2021 18:09:54 +0100 Subject: [PATCH 02/36] * Fri Mar 26 2021 Tomas Bzatek - 2.9.2-2 - Fix FAT mkfs with dosfstools >= 4.2 - udiskslinuxdriveata: Use GTask to apply configuration in a thread - Limit allowed module names - 80-udisks2.rules: Ignore Apple boot partition from livecd-tools --- ignore-apple-boot-part.patch | 25 ++++ udisks-2.10.0-ata_conf_apply_GTask.patch | 60 ++++++++ ...ks-2.10.0-dosfstools_4.2-reread_part.patch | 24 ++++ udisks-2.10.0-dosfstools_4.2.patch | 75 ++++++++++ udisks-2.10.0-module-names.patch | 136 ++++++++++++++++++ udisks2.spec | 17 ++- 6 files changed, 335 insertions(+), 2 deletions(-) create mode 100644 ignore-apple-boot-part.patch create mode 100644 udisks-2.10.0-ata_conf_apply_GTask.patch create mode 100644 udisks-2.10.0-dosfstools_4.2-reread_part.patch create mode 100644 udisks-2.10.0-dosfstools_4.2.patch create mode 100644 udisks-2.10.0-module-names.patch diff --git a/ignore-apple-boot-part.patch b/ignore-apple-boot-part.patch new file mode 100644 index 0000000..0c57303 --- /dev/null +++ b/ignore-apple-boot-part.patch @@ -0,0 +1,25 @@ +From b9863c11601e199420a375e13505e2b795de77c5 Mon Sep 17 00:00:00 2001 +From: Frederick Grose <4335897+FGrose@users.noreply.github.com> +Date: Tue, 9 Feb 2021 19:02:01 -0500 +Subject: [PATCH] 80-udisks2.rules: Ignore Apple boot partition from + livecd-tools + +https://github.com/livecd-tools/livecd-tools/pull/176 creates a new boot +partition with livecd-iso-to-disk from Fedora Live .iso files that UDISKS +should ignore. +--- + data/80-udisks2.rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules +index fb50f48a0..d6fa072fd 100644 +--- a/data/80-udisks2.rules ++++ b/data/80-udisks2.rules +@@ -122,6 +122,7 @@ ENV{ID_PART_ENTRY_SCHEME}=="mac", ENV{ID_PART_ENTRY_TYPE}=="Apple_Bootstrap", EN + + # Apple Boot partitions + ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="426f6f74-0000-11aa-aa11-00306543ecac", ENV{UDISKS_IGNORE}="1" ++ENV{ID_FS_LABEL}=="ANACONDA", ENV{ID_PART_ENTRY_TYPE}=="48465300-0000-11aa-aa11-00306543ecac|0xaf", ENV{UDISKS_IGNORE}="1" + + # special DOS partition types (EFI, hidden, etc.) and RAID/LVM + # see http://www.win.tue.nl/~aeb/partitions/partition_types-1.html diff --git a/udisks-2.10.0-ata_conf_apply_GTask.patch b/udisks-2.10.0-ata_conf_apply_GTask.patch new file mode 100644 index 0000000..077fada --- /dev/null +++ b/udisks-2.10.0-ata_conf_apply_GTask.patch @@ -0,0 +1,60 @@ +commit 6ff556afabd490feb6c4b29f9e91e81d64e2c0ed +Author: Tomas Bzatek +Date: Tue Mar 23 12:56:40 2021 +0100 + + udiskslinuxdriveata: Use GTask to apply configuration in a thread + + Should fix a leaking GThread without a need to join or track it anyhow. + +diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c +index 5ebdcd76..2de138cd 100644 +--- a/src/udiskslinuxdriveata.c ++++ b/src/udiskslinuxdriveata.c +@@ -1625,10 +1625,13 @@ apply_conf_data_free (ApplyConfData *data) + g_free (data); + } + +-static gpointer +-apply_configuration_thread_func (gpointer user_data) ++static void ++apply_configuration_thread_func (GTask *task, ++ gpointer source_object, ++ gpointer task_data, ++ GCancellable *cancellable) + { +- ApplyConfData *data = user_data; ++ ApplyConfData *data = task_data; + UDisksDaemon *daemon; + const gchar *device_file = NULL; + gint fd = -1; +@@ -1799,8 +1802,6 @@ apply_configuration_thread_func (gpointer user_data) + out: + if (fd != -1) + close (fd); +- apply_conf_data_free (data); +- return NULL; + } + + /** +@@ -1819,6 +1820,7 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, + { + gboolean has_conf = FALSE; + ApplyConfData *data = NULL; ++ GTask *task; + + data = g_new0 (ApplyConfData, 1); + data->ata_pm_standby = -1; +@@ -1862,9 +1864,10 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, + /* this can easily take a long time and thus block (the drive may be in standby mode + * and needs to spin up) - so run it in a thread + */ +- g_thread_new ("apply-conf-thread", +- apply_configuration_thread_func, +- data); ++ task = g_task_new (data->object, NULL, NULL, NULL); ++ g_task_set_task_data (task, data, (GDestroyNotify) apply_conf_data_free); ++ g_task_run_in_thread (task, apply_configuration_thread_func); ++ g_object_unref (task); + + data = NULL; /* don't free data below */ + diff --git a/udisks-2.10.0-dosfstools_4.2-reread_part.patch b/udisks-2.10.0-dosfstools_4.2-reread_part.patch new file mode 100644 index 0000000..414c830 --- /dev/null +++ b/udisks-2.10.0-dosfstools_4.2-reread_part.patch @@ -0,0 +1,24 @@ +commit d58ebcc32b583371dd73ab7f4c7be5191674ca62 +Author: Tomas Bzatek +Date: Wed Mar 17 18:52:22 2021 +0100 + + udiskslinuxblock: Re-read partition table after creating FAT filesystem + + Might not be needed after reverting mkfs.vfat behaviour back + to the legacy way, added just as a precautionary measure. + +diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c +index 901426ad..69161b61 100644 +--- a/src/udiskslinuxblock.c ++++ b/src/udiskslinuxblock.c +@@ -2913,7 +2913,9 @@ static inline gboolean + need_partprobe_after_mkfs (const gchar *fs_type) + { + /* udftools makes fake MBR since the 2.0 release */ +- return (g_strcmp0 (fs_type, "udf") == 0); ++ /* dosfstools makes fake MBR since the 4.2 release */ ++ return (g_strcmp0 (fs_type, "udf") == 0 || ++ g_strcmp0 (fs_type, "vfat") == 0); + } + + void diff --git a/udisks-2.10.0-dosfstools_4.2.patch b/udisks-2.10.0-dosfstools_4.2.patch new file mode 100644 index 0000000..2764315 --- /dev/null +++ b/udisks-2.10.0-dosfstools_4.2.patch @@ -0,0 +1,75 @@ +commit ef1979d8cbfb8ad976de0af21a70f8c0f98fbbe9 +Author: Tomas Bzatek +Date: Wed Mar 17 18:50:19 2021 +0100 + + udiskslinuxfsinfo: Add dosfstools >= 4.2 quirks + + Reverting back the legacy behaviour with no protective (fake) MBR + created while making new FAT filesystem on an unpartitioned block device. + + Added a label clear functionality as well. + +diff --git a/src/udiskslinuxfsinfo.c b/src/udiskslinuxfsinfo.c +index 15af26c8..f18b9b80 100644 +--- a/src/udiskslinuxfsinfo.c ++++ b/src/udiskslinuxfsinfo.c +@@ -21,6 +21,8 @@ + #include + #include + ++#include ++ + #include "config.h" + #include "udiskslinuxfsinfo.h" + #include "udisksconfigmanager.h" +@@ -236,6 +238,19 @@ const FSInfo _fs_info[] = + }, + }; + ++/* workaround for dosfstools >= 4.2 */ ++static const FSInfo vfat_dosfstools_42 = ++ { ++ FS_VFAT, ++ "fatlabel $DEVICE $LABEL", ++ "fatlabel --reset $DEVICE", ++ FALSE, /* supports_online_label_rename */ ++ FALSE, /* supports_owners */ ++ "mkfs.vfat -I -n $LABEL --mbr=n $DEVICE", ++ NULL, ++ NULL, /* option_no_discard */ ++ }; ++ + /** + * get_fs_info: + * +@@ -248,6 +263,7 @@ const FSInfo _fs_info[] = + const FSInfo * + get_fs_info (const gchar *fstype) + { ++ const FSInfo *info = NULL; + guint n; + + g_return_val_if_fail (fstype != NULL, NULL); +@@ -255,10 +271,20 @@ get_fs_info (const gchar *fstype) + for (n = 0; n < sizeof(_fs_info)/sizeof(FSInfo); n++) + { + if (strcmp (_fs_info[n].fstype, fstype) == 0) +- return &_fs_info[n]; ++ { ++ info = &_fs_info[n]; ++ break; ++ } ++ } ++ ++ /* dosfstools >= 4.2 workaround */ ++ if (g_str_equal (fstype, FS_VFAT) && ++ bd_utils_check_util_version ("mkfs.vfat", "4.2", "--help", "mkfs.fat\\s+([\\d\\.]+).+", NULL)) ++ { ++ info = &vfat_dosfstools_42; + } + +- return NULL; ++ return info; + } + + /** diff --git a/udisks-2.10.0-module-names.patch b/udisks-2.10.0-module-names.patch new file mode 100644 index 0000000..a1a6619 --- /dev/null +++ b/udisks-2.10.0-module-names.patch @@ -0,0 +1,136 @@ +commit e062c17e3829f3c04c25b5f6fc17ccc4491befa8 +Author: Tomas Bzatek +Date: Tue Mar 23 16:48:08 2021 +0100 + + modules: Limit module name to alphanumeric characters and -_ separators + + A hardening feature as long as the module name is directly involved + in filename creation. + +diff --git a/doc/udisks2-sections.txt.daemon.sections.in b/doc/udisks2-sections.txt.daemon.sections.in +index 16eaf74e..204ca897 100644 +--- a/doc/udisks2-sections.txt.daemon.sections.in ++++ b/doc/udisks2-sections.txt.daemon.sections.in +@@ -312,6 +312,7 @@ udisks_daemon_util_get_free_mdraid_device + udisks_ata_identify_get_word + udisks_daemon_util_trigger_uevent + udisks_daemon_util_trigger_uevent_sync ++udisks_module_validate_name + + +
+diff --git a/src/udisksconfigmanager.c b/src/udisksconfigmanager.c +index 9558e276..5868e864 100644 +--- a/src/udisksconfigmanager.c ++++ b/src/udisksconfigmanager.c +@@ -26,6 +26,7 @@ + #include "udiskslogging.h" + #include "udisksdaemontypes.h" + #include "udisksconfigmanager.h" ++#include "udisksdaemonutil.h" + + struct _UDisksConfigManager { + GObject parent_instance; +@@ -60,6 +61,8 @@ enum + #define DEFAULTS_GROUP_NAME "defaults" + #define DEFAULTS_ENCRYPTION_KEY "encryption" + ++#define MODULES_ALL_ARG "*" ++ + static void + udisks_config_manager_get_property (GObject *object, + guint property_id, +@@ -170,7 +173,16 @@ parse_config_file (UDisksConfigManager *manager, + { + modules_tmp = modules; + for (module_i = *modules_tmp; module_i; module_i = *++modules_tmp) +- *out_modules = g_list_append (*out_modules, g_strdup (g_strstrip (module_i))); ++ { ++ g_strstrip (module_i); ++ if (! udisks_module_validate_name (module_i) && !g_str_equal (module_i, MODULES_ALL_ARG)) ++ { ++ g_warning ("Invalid module name '%s' specified in the %s config file.", ++ module_i, conf_filename); ++ continue; ++ } ++ *out_modules = g_list_append (*out_modules, g_strdup (module_i)); ++ } + g_strfreev (modules); + } + } +@@ -397,7 +409,7 @@ udisks_config_manager_get_modules_all (UDisksConfigManager *manager) + + parse_config_file (manager, NULL, NULL, &modules); + +- ret = !modules || (g_strcmp0 (modules->data, "*") == 0 && g_list_length (modules) == 1); ++ ret = !modules || (g_strcmp0 (modules->data, MODULES_ALL_ARG) == 0 && g_list_length (modules) == 1); + + g_list_free_full (modules, (GDestroyNotify) g_free); + +diff --git a/src/udisksdaemonutil.c b/src/udisksdaemonutil.c +index 60134765..1695b524 100644 +--- a/src/udisksdaemonutil.c ++++ b/src/udisksdaemonutil.c +@@ -1880,3 +1880,29 @@ udisks_daemon_util_trigger_uevent_sync (UDisksDaemon *daemon, + } + + /* ---------------------------------------------------------------------------------------------------- */ ++ ++/** ++ * udisks_module_validate_name: ++ * @module_name: A udisks2 module name. ++ * ++ * Checks the string for a valid udisks2 module name. Only alphanumeric characters ++ * along with the '-' and '_' separators are permitted. ++ * ++ * Returns: %TRUE if the string is a valid udisks2 module name, %FALSE otherwise. ++ */ ++gboolean ++udisks_module_validate_name (const gchar *module_name) ++{ ++ int i; ++ ++ for (i = 0; module_name[i] != '\0'; i++) ++ /* going ASCII, will disqualify any UTF-* string */ ++ if (! g_ascii_isalnum (module_name[i]) && ++ module_name[i] != '-' && ++ module_name[i] != '_') ++ return FALSE; ++ ++ return TRUE; ++} ++ ++/* ---------------------------------------------------------------------------------------------------- */ +diff --git a/src/udisksdaemonutil.h b/src/udisksdaemonutil.h +index 2d7ac981..df584de4 100644 +--- a/src/udisksdaemonutil.h ++++ b/src/udisksdaemonutil.h +@@ -129,6 +129,8 @@ gchar *udisks_daemon_util_get_free_mdraid_device (void); + + guint16 udisks_ata_identify_get_word (const guchar *identify_data, guint word_number); + ++gboolean udisks_module_validate_name (const gchar *module_name); ++ + /* Utility macro for policy verification. */ + #define UDISKS_DAEMON_CHECK_AUTHORIZATION(daemon, \ + object, \ +diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c +index 8af65d97..26d8a5d7 100644 +--- a/src/udiskslinuxmanager.c ++++ b/src/udiskslinuxmanager.c +@@ -956,6 +956,15 @@ handle_enable_module (UDisksManager *object, + UDisksLinuxManager *manager = UDISKS_LINUX_MANAGER (object); + EnableModulesData *data; + ++ if (! udisks_module_validate_name (arg_name)) ++ { ++ g_dbus_method_invocation_return_error (invocation, ++ G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, ++ "Requested module name '%s' is not a valid udisks2 module name.", ++ arg_name); ++ return TRUE; ++ } ++ + if (! arg_enable) + { + /* TODO: implement proper module unloading */ diff --git a/udisks2.spec b/udisks2.spec index 3d0064d..aa007b2 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -48,10 +48,16 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 +Patch0: udisks-2.10.0-dosfstools_4.2.patch +Patch1: udisks-2.10.0-dosfstools_4.2-reread_part.patch +Patch2: udisks-2.10.0-module-names.patch +Patch3: udisks-2.10.0-ata_conf_apply_GTask.patch +# https://github.com/storaged-project/udisks/pull/847 +Patch4: ignore-apple-boot-part.patch BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} @@ -240,8 +246,9 @@ This package contains module for ZRAM configuration. %endif %prep -%setup -q -n udisks-%{version} +%autosetup -p1 -n udisks-%{version} sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" +rm -f src/tests/dbus-tests/config_h.py %build autoreconf -ivf @@ -426,6 +433,12 @@ fi %endif %changelog +* Fri Mar 26 2021 Tomas Bzatek - 2.9.2-2 +- Fix FAT mkfs with dosfstools >= 4.2 +- udiskslinuxdriveata: Use GTask to apply configuration in a thread +- Limit allowed module names +- 80-udisks2.rules: Ignore Apple boot partition from livecd-tools + * Thu Feb 04 2021 Tomas Bzatek - 2.9.2-1 - Version 2.9.2 From 41209e51126c53b10a91a6f3b07482d27afd83d6 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 26 Mar 2021 18:09:54 +0100 Subject: [PATCH 03/36] * Fri Mar 26 2021 Tomas Bzatek - 2.9.2-2 - Fix FAT mkfs with dosfstools >= 4.2 - udiskslinuxdriveata: Use GTask to apply configuration in a thread - Limit allowed module names - 80-udisks2.rules: Ignore Apple boot partition from livecd-tools --- ignore-apple-boot-part.patch | 25 ++++ udisks-2.10.0-ata_conf_apply_GTask.patch | 60 ++++++++ ...ks-2.10.0-dosfstools_4.2-reread_part.patch | 24 ++++ udisks-2.10.0-dosfstools_4.2.patch | 75 ++++++++++ udisks-2.10.0-module-names.patch | 136 ++++++++++++++++++ udisks2.spec | 17 ++- 6 files changed, 335 insertions(+), 2 deletions(-) create mode 100644 ignore-apple-boot-part.patch create mode 100644 udisks-2.10.0-ata_conf_apply_GTask.patch create mode 100644 udisks-2.10.0-dosfstools_4.2-reread_part.patch create mode 100644 udisks-2.10.0-dosfstools_4.2.patch create mode 100644 udisks-2.10.0-module-names.patch diff --git a/ignore-apple-boot-part.patch b/ignore-apple-boot-part.patch new file mode 100644 index 0000000..0c57303 --- /dev/null +++ b/ignore-apple-boot-part.patch @@ -0,0 +1,25 @@ +From b9863c11601e199420a375e13505e2b795de77c5 Mon Sep 17 00:00:00 2001 +From: Frederick Grose <4335897+FGrose@users.noreply.github.com> +Date: Tue, 9 Feb 2021 19:02:01 -0500 +Subject: [PATCH] 80-udisks2.rules: Ignore Apple boot partition from + livecd-tools + +https://github.com/livecd-tools/livecd-tools/pull/176 creates a new boot +partition with livecd-iso-to-disk from Fedora Live .iso files that UDISKS +should ignore. +--- + data/80-udisks2.rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules +index fb50f48a0..d6fa072fd 100644 +--- a/data/80-udisks2.rules ++++ b/data/80-udisks2.rules +@@ -122,6 +122,7 @@ ENV{ID_PART_ENTRY_SCHEME}=="mac", ENV{ID_PART_ENTRY_TYPE}=="Apple_Bootstrap", EN + + # Apple Boot partitions + ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="426f6f74-0000-11aa-aa11-00306543ecac", ENV{UDISKS_IGNORE}="1" ++ENV{ID_FS_LABEL}=="ANACONDA", ENV{ID_PART_ENTRY_TYPE}=="48465300-0000-11aa-aa11-00306543ecac|0xaf", ENV{UDISKS_IGNORE}="1" + + # special DOS partition types (EFI, hidden, etc.) and RAID/LVM + # see http://www.win.tue.nl/~aeb/partitions/partition_types-1.html diff --git a/udisks-2.10.0-ata_conf_apply_GTask.patch b/udisks-2.10.0-ata_conf_apply_GTask.patch new file mode 100644 index 0000000..077fada --- /dev/null +++ b/udisks-2.10.0-ata_conf_apply_GTask.patch @@ -0,0 +1,60 @@ +commit 6ff556afabd490feb6c4b29f9e91e81d64e2c0ed +Author: Tomas Bzatek +Date: Tue Mar 23 12:56:40 2021 +0100 + + udiskslinuxdriveata: Use GTask to apply configuration in a thread + + Should fix a leaking GThread without a need to join or track it anyhow. + +diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c +index 5ebdcd76..2de138cd 100644 +--- a/src/udiskslinuxdriveata.c ++++ b/src/udiskslinuxdriveata.c +@@ -1625,10 +1625,13 @@ apply_conf_data_free (ApplyConfData *data) + g_free (data); + } + +-static gpointer +-apply_configuration_thread_func (gpointer user_data) ++static void ++apply_configuration_thread_func (GTask *task, ++ gpointer source_object, ++ gpointer task_data, ++ GCancellable *cancellable) + { +- ApplyConfData *data = user_data; ++ ApplyConfData *data = task_data; + UDisksDaemon *daemon; + const gchar *device_file = NULL; + gint fd = -1; +@@ -1799,8 +1802,6 @@ apply_configuration_thread_func (gpointer user_data) + out: + if (fd != -1) + close (fd); +- apply_conf_data_free (data); +- return NULL; + } + + /** +@@ -1819,6 +1820,7 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, + { + gboolean has_conf = FALSE; + ApplyConfData *data = NULL; ++ GTask *task; + + data = g_new0 (ApplyConfData, 1); + data->ata_pm_standby = -1; +@@ -1862,9 +1864,10 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, + /* this can easily take a long time and thus block (the drive may be in standby mode + * and needs to spin up) - so run it in a thread + */ +- g_thread_new ("apply-conf-thread", +- apply_configuration_thread_func, +- data); ++ task = g_task_new (data->object, NULL, NULL, NULL); ++ g_task_set_task_data (task, data, (GDestroyNotify) apply_conf_data_free); ++ g_task_run_in_thread (task, apply_configuration_thread_func); ++ g_object_unref (task); + + data = NULL; /* don't free data below */ + diff --git a/udisks-2.10.0-dosfstools_4.2-reread_part.patch b/udisks-2.10.0-dosfstools_4.2-reread_part.patch new file mode 100644 index 0000000..414c830 --- /dev/null +++ b/udisks-2.10.0-dosfstools_4.2-reread_part.patch @@ -0,0 +1,24 @@ +commit d58ebcc32b583371dd73ab7f4c7be5191674ca62 +Author: Tomas Bzatek +Date: Wed Mar 17 18:52:22 2021 +0100 + + udiskslinuxblock: Re-read partition table after creating FAT filesystem + + Might not be needed after reverting mkfs.vfat behaviour back + to the legacy way, added just as a precautionary measure. + +diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c +index 901426ad..69161b61 100644 +--- a/src/udiskslinuxblock.c ++++ b/src/udiskslinuxblock.c +@@ -2913,7 +2913,9 @@ static inline gboolean + need_partprobe_after_mkfs (const gchar *fs_type) + { + /* udftools makes fake MBR since the 2.0 release */ +- return (g_strcmp0 (fs_type, "udf") == 0); ++ /* dosfstools makes fake MBR since the 4.2 release */ ++ return (g_strcmp0 (fs_type, "udf") == 0 || ++ g_strcmp0 (fs_type, "vfat") == 0); + } + + void diff --git a/udisks-2.10.0-dosfstools_4.2.patch b/udisks-2.10.0-dosfstools_4.2.patch new file mode 100644 index 0000000..2764315 --- /dev/null +++ b/udisks-2.10.0-dosfstools_4.2.patch @@ -0,0 +1,75 @@ +commit ef1979d8cbfb8ad976de0af21a70f8c0f98fbbe9 +Author: Tomas Bzatek +Date: Wed Mar 17 18:50:19 2021 +0100 + + udiskslinuxfsinfo: Add dosfstools >= 4.2 quirks + + Reverting back the legacy behaviour with no protective (fake) MBR + created while making new FAT filesystem on an unpartitioned block device. + + Added a label clear functionality as well. + +diff --git a/src/udiskslinuxfsinfo.c b/src/udiskslinuxfsinfo.c +index 15af26c8..f18b9b80 100644 +--- a/src/udiskslinuxfsinfo.c ++++ b/src/udiskslinuxfsinfo.c +@@ -21,6 +21,8 @@ + #include + #include + ++#include ++ + #include "config.h" + #include "udiskslinuxfsinfo.h" + #include "udisksconfigmanager.h" +@@ -236,6 +238,19 @@ const FSInfo _fs_info[] = + }, + }; + ++/* workaround for dosfstools >= 4.2 */ ++static const FSInfo vfat_dosfstools_42 = ++ { ++ FS_VFAT, ++ "fatlabel $DEVICE $LABEL", ++ "fatlabel --reset $DEVICE", ++ FALSE, /* supports_online_label_rename */ ++ FALSE, /* supports_owners */ ++ "mkfs.vfat -I -n $LABEL --mbr=n $DEVICE", ++ NULL, ++ NULL, /* option_no_discard */ ++ }; ++ + /** + * get_fs_info: + * +@@ -248,6 +263,7 @@ const FSInfo _fs_info[] = + const FSInfo * + get_fs_info (const gchar *fstype) + { ++ const FSInfo *info = NULL; + guint n; + + g_return_val_if_fail (fstype != NULL, NULL); +@@ -255,10 +271,20 @@ get_fs_info (const gchar *fstype) + for (n = 0; n < sizeof(_fs_info)/sizeof(FSInfo); n++) + { + if (strcmp (_fs_info[n].fstype, fstype) == 0) +- return &_fs_info[n]; ++ { ++ info = &_fs_info[n]; ++ break; ++ } ++ } ++ ++ /* dosfstools >= 4.2 workaround */ ++ if (g_str_equal (fstype, FS_VFAT) && ++ bd_utils_check_util_version ("mkfs.vfat", "4.2", "--help", "mkfs.fat\\s+([\\d\\.]+).+", NULL)) ++ { ++ info = &vfat_dosfstools_42; + } + +- return NULL; ++ return info; + } + + /** diff --git a/udisks-2.10.0-module-names.patch b/udisks-2.10.0-module-names.patch new file mode 100644 index 0000000..a1a6619 --- /dev/null +++ b/udisks-2.10.0-module-names.patch @@ -0,0 +1,136 @@ +commit e062c17e3829f3c04c25b5f6fc17ccc4491befa8 +Author: Tomas Bzatek +Date: Tue Mar 23 16:48:08 2021 +0100 + + modules: Limit module name to alphanumeric characters and -_ separators + + A hardening feature as long as the module name is directly involved + in filename creation. + +diff --git a/doc/udisks2-sections.txt.daemon.sections.in b/doc/udisks2-sections.txt.daemon.sections.in +index 16eaf74e..204ca897 100644 +--- a/doc/udisks2-sections.txt.daemon.sections.in ++++ b/doc/udisks2-sections.txt.daemon.sections.in +@@ -312,6 +312,7 @@ udisks_daemon_util_get_free_mdraid_device + udisks_ata_identify_get_word + udisks_daemon_util_trigger_uevent + udisks_daemon_util_trigger_uevent_sync ++udisks_module_validate_name +
+ +
+diff --git a/src/udisksconfigmanager.c b/src/udisksconfigmanager.c +index 9558e276..5868e864 100644 +--- a/src/udisksconfigmanager.c ++++ b/src/udisksconfigmanager.c +@@ -26,6 +26,7 @@ + #include "udiskslogging.h" + #include "udisksdaemontypes.h" + #include "udisksconfigmanager.h" ++#include "udisksdaemonutil.h" + + struct _UDisksConfigManager { + GObject parent_instance; +@@ -60,6 +61,8 @@ enum + #define DEFAULTS_GROUP_NAME "defaults" + #define DEFAULTS_ENCRYPTION_KEY "encryption" + ++#define MODULES_ALL_ARG "*" ++ + static void + udisks_config_manager_get_property (GObject *object, + guint property_id, +@@ -170,7 +173,16 @@ parse_config_file (UDisksConfigManager *manager, + { + modules_tmp = modules; + for (module_i = *modules_tmp; module_i; module_i = *++modules_tmp) +- *out_modules = g_list_append (*out_modules, g_strdup (g_strstrip (module_i))); ++ { ++ g_strstrip (module_i); ++ if (! udisks_module_validate_name (module_i) && !g_str_equal (module_i, MODULES_ALL_ARG)) ++ { ++ g_warning ("Invalid module name '%s' specified in the %s config file.", ++ module_i, conf_filename); ++ continue; ++ } ++ *out_modules = g_list_append (*out_modules, g_strdup (module_i)); ++ } + g_strfreev (modules); + } + } +@@ -397,7 +409,7 @@ udisks_config_manager_get_modules_all (UDisksConfigManager *manager) + + parse_config_file (manager, NULL, NULL, &modules); + +- ret = !modules || (g_strcmp0 (modules->data, "*") == 0 && g_list_length (modules) == 1); ++ ret = !modules || (g_strcmp0 (modules->data, MODULES_ALL_ARG) == 0 && g_list_length (modules) == 1); + + g_list_free_full (modules, (GDestroyNotify) g_free); + +diff --git a/src/udisksdaemonutil.c b/src/udisksdaemonutil.c +index 60134765..1695b524 100644 +--- a/src/udisksdaemonutil.c ++++ b/src/udisksdaemonutil.c +@@ -1880,3 +1880,29 @@ udisks_daemon_util_trigger_uevent_sync (UDisksDaemon *daemon, + } + + /* ---------------------------------------------------------------------------------------------------- */ ++ ++/** ++ * udisks_module_validate_name: ++ * @module_name: A udisks2 module name. ++ * ++ * Checks the string for a valid udisks2 module name. Only alphanumeric characters ++ * along with the '-' and '_' separators are permitted. ++ * ++ * Returns: %TRUE if the string is a valid udisks2 module name, %FALSE otherwise. ++ */ ++gboolean ++udisks_module_validate_name (const gchar *module_name) ++{ ++ int i; ++ ++ for (i = 0; module_name[i] != '\0'; i++) ++ /* going ASCII, will disqualify any UTF-* string */ ++ if (! g_ascii_isalnum (module_name[i]) && ++ module_name[i] != '-' && ++ module_name[i] != '_') ++ return FALSE; ++ ++ return TRUE; ++} ++ ++/* ---------------------------------------------------------------------------------------------------- */ +diff --git a/src/udisksdaemonutil.h b/src/udisksdaemonutil.h +index 2d7ac981..df584de4 100644 +--- a/src/udisksdaemonutil.h ++++ b/src/udisksdaemonutil.h +@@ -129,6 +129,8 @@ gchar *udisks_daemon_util_get_free_mdraid_device (void); + + guint16 udisks_ata_identify_get_word (const guchar *identify_data, guint word_number); + ++gboolean udisks_module_validate_name (const gchar *module_name); ++ + /* Utility macro for policy verification. */ + #define UDISKS_DAEMON_CHECK_AUTHORIZATION(daemon, \ + object, \ +diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c +index 8af65d97..26d8a5d7 100644 +--- a/src/udiskslinuxmanager.c ++++ b/src/udiskslinuxmanager.c +@@ -956,6 +956,15 @@ handle_enable_module (UDisksManager *object, + UDisksLinuxManager *manager = UDISKS_LINUX_MANAGER (object); + EnableModulesData *data; + ++ if (! udisks_module_validate_name (arg_name)) ++ { ++ g_dbus_method_invocation_return_error (invocation, ++ G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, ++ "Requested module name '%s' is not a valid udisks2 module name.", ++ arg_name); ++ return TRUE; ++ } ++ + if (! arg_enable) + { + /* TODO: implement proper module unloading */ diff --git a/udisks2.spec b/udisks2.spec index 1a55969..21421ee 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -48,10 +48,16 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 +Patch0: udisks-2.10.0-dosfstools_4.2.patch +Patch1: udisks-2.10.0-dosfstools_4.2-reread_part.patch +Patch2: udisks-2.10.0-module-names.patch +Patch3: udisks-2.10.0-ata_conf_apply_GTask.patch +# https://github.com/storaged-project/udisks/pull/847 +Patch4: ignore-apple-boot-part.patch BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} @@ -240,8 +246,9 @@ This package contains module for ZRAM configuration. %endif %prep -%setup -q -n udisks-%{version} +%autosetup -p1 -n udisks-%{version} sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" +rm -f src/tests/dbus-tests/config_h.py %build autoreconf -ivf @@ -426,6 +433,12 @@ fi %endif %changelog +* Fri Mar 26 2021 Tomas Bzatek - 2.9.2-3 +- Fix FAT mkfs with dosfstools >= 4.2 +- udiskslinuxdriveata: Use GTask to apply configuration in a thread +- Limit allowed module names +- 80-udisks2.rules: Ignore Apple boot partition from livecd-tools + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.9.2-2 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From 5ea57b40c2b9c5cd1f3c4565fa73a72d668103e1 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 19 Apr 2021 16:41:25 +0200 Subject: [PATCH 04/36] * Mon Apr 19 2021 Tomas Bzatek - 2.9.2-4 - Fix a couple of issues found by Coverity - Ignore systemd "Extended Boot Loader" GPT partition --- ...e-Extended-Boot-Loader-GPT-partition.patch | 29 ++++++++++++ udisks-2.10.0-g_mkdtemp-leak.patch | 32 +++++++++++++ udisks-2.10.0-mdraid-g_source_attach.patch | 44 +++++++++++++++++ udisks-2.10.0-mdraid-iochannel-data.patch | 47 +++++++++++++++++++ udisks2.spec | 18 +++++-- 5 files changed, 165 insertions(+), 5 deletions(-) create mode 100644 udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch create mode 100644 udisks-2.10.0-g_mkdtemp-leak.patch create mode 100644 udisks-2.10.0-mdraid-g_source_attach.patch create mode 100644 udisks-2.10.0-mdraid-iochannel-data.patch diff --git a/udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch b/udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch new file mode 100644 index 0000000..1f98913 --- /dev/null +++ b/udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch @@ -0,0 +1,29 @@ +From 79eed9aa35fbf1c5131b44b50b407742f68e2f61 Mon Sep 17 00:00:00 2001 +From: Florian Ziegler +Date: Sat, 17 Apr 2021 13:31:31 +0200 +Subject: [PATCH 8/8] Ignore "Extended Boot Loader" GPT partition + +--- + data/80-udisks2.rules | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules +index fb50f48a..39bfa28b 100644 +--- a/data/80-udisks2.rules ++++ b/data/80-udisks2.rules +@@ -135,6 +135,12 @@ ENV{ID_PART_ENTRY_SCHEME}=="gpt", \ + ENV{ID_PART_ENTRY_TYPE}=="c12a7328-f81f-11d2-ba4b-00a0c93ec93b|21686148-6449-6e6f-744e-656564454649|a19d880f-05fc-4d3b-a006-743f0f84911e|e6d6d379-f507-44c2-a23c-238f2a3df928|e3c9e316-0b5c-4db8-817d-f92df00215ae|de94bba4-06d1-4d40-a16a-bfd50179d6ac", \ + ENV{UDISKS_IGNORE}="1" + ++# special Extended Boot Loader partition (XBOOTLDR) ++# see https://systemd.io/BOOT_LOADER_SPECIFICATION/ ++ENV{ID_PART_ENTRY_SCHEME}=="gpt", \ ++ ENV{ID_PART_ENTRY_TYPE}=="bc13c2ff-59e6-4262-a352-b275fd6f7172", \ ++ ENV{UDISKS_IGNORE}="1" ++ + # ZFS member partitions + ENV{ID_PART_ENTRY_SCHEME}=="gpt", \ + ENV{ID_FS_TYPE}=="zfs_member", ENV{ID_PART_ENTRY_TYPE}=="6a898cc3-1dd2-11b2-99a6-080020736631", \ +-- +2.30.2 + diff --git a/udisks-2.10.0-g_mkdtemp-leak.patch b/udisks-2.10.0-g_mkdtemp-leak.patch new file mode 100644 index 0000000..58d58cd --- /dev/null +++ b/udisks-2.10.0-g_mkdtemp-leak.patch @@ -0,0 +1,32 @@ +From fcdec5d58ba2bbe6d7ecf7168ab1a11282763041 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 16 Apr 2021 18:15:03 +0200 +Subject: [PATCH 5/8] udiskslinuxfilesystemhelpers: Fix leaking string in case + g_mkdtemp() fails + +--- + src/udiskslinuxfilesystemhelpers.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/udiskslinuxfilesystemhelpers.c b/src/udiskslinuxfilesystemhelpers.c +index 74d83152..7c5fc037 100644 +--- a/src/udiskslinuxfilesystemhelpers.c ++++ b/src/udiskslinuxfilesystemhelpers.c +@@ -142,11 +142,11 @@ take_filesystem_ownership (const gchar *device, + else + { + /* device is not mounted, we need to mount it */ +- mountpoint = g_mkdtemp (g_strdup ("/run/udisks2/temp-mount-XXXXXX")); +- if (mountpoint == NULL) ++ mountpoint = g_strdup ("/run/udisks2/temp-mount-XXXXXX"); ++ if (g_mkdtemp (mountpoint) == NULL) + { + g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, +- "Cannot create temporary mountpoint."); ++ "Cannot create temporary mountpoint: %m."); + success = FALSE; + goto out; + } +-- +2.30.2 + diff --git a/udisks-2.10.0-mdraid-g_source_attach.patch b/udisks-2.10.0-mdraid-g_source_attach.patch new file mode 100644 index 0000000..9fb9911 --- /dev/null +++ b/udisks-2.10.0-mdraid-g_source_attach.patch @@ -0,0 +1,44 @@ +From cd458666a93fe9d07f3718e88f3169f01a11a63e Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 16 Apr 2021 18:36:16 +0200 +Subject: [PATCH 7/8] udiskslinuxmdraidobject: Handle source attach failure + gracefully + +Only negligible theoretical chance to hit this, reported by Coverity. +--- + src/udiskslinuxmdraidobject.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/udiskslinuxmdraidobject.c b/src/udiskslinuxmdraidobject.c +index 20ca89c5..828c7058 100644 +--- a/src/udiskslinuxmdraidobject.c ++++ b/src/udiskslinuxmdraidobject.c +@@ -468,7 +468,8 @@ watch_attr (UDisksLinuxDevice *device, + GError *error = NULL; + gchar *path = NULL; + GIOChannel *channel = NULL; +- GSource *ret = NULL;; ++ GSource *ret = NULL; ++ guint source_id; + + g_return_val_if_fail (UDISKS_IS_LINUX_DEVICE (device), NULL); + +@@ -478,9 +479,14 @@ watch_attr (UDisksLinuxDevice *device, + { + ret = g_io_create_watch (channel, G_IO_ERR); + g_source_set_callback (ret, callback, user_data, NULL); +- g_source_attach (ret, g_main_context_get_thread_default ()); ++ source_id = g_source_attach (ret, g_main_context_get_thread_default ()); + g_source_unref (ret); + g_io_channel_unref (channel); /* the keeps a reference to this object */ ++ if (source_id == 0) ++ { ++ /* something bad happened while attaching the source */ ++ ret = NULL; ++ } + } + else + { +-- +2.30.2 + diff --git a/udisks-2.10.0-mdraid-iochannel-data.patch b/udisks-2.10.0-mdraid-iochannel-data.patch new file mode 100644 index 0000000..51daf79 --- /dev/null +++ b/udisks-2.10.0-mdraid-iochannel-data.patch @@ -0,0 +1,47 @@ +From 0353b5f2f9c586d872750423259b6ef6cc375625 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 16 Apr 2021 18:22:46 +0200 +Subject: [PATCH 6/8] udiskslinuxmdraidobject: Optimize unused data out from + the g_io_channel_read_to_end() call + +Looking into glib sources the g_io_channel_read_to_end() function +can handle NULL output pointers just fine and since the data is thrown +right away it's pointless to have them assigned. +--- + src/udiskslinuxmdraidobject.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/udiskslinuxmdraidobject.c b/src/udiskslinuxmdraidobject.c +index 759ff5f4..20ca89c5 100644 +--- a/src/udiskslinuxmdraidobject.c ++++ b/src/udiskslinuxmdraidobject.c +@@ -503,8 +503,6 @@ attr_changed (GIOChannel *channel, + UDisksLinuxMDRaidObject *object = UDISKS_LINUX_MDRAID_OBJECT (user_data); + gboolean bail = FALSE; + GError *error = NULL; +- gchar *str = NULL; +- gsize len = 0; + + if (cond & ~G_IO_ERR) + goto out; +@@ -518,7 +516,7 @@ attr_changed (GIOChannel *channel, + goto out; + } + +- if (g_io_channel_read_to_end (channel, &str, &len, &error) != G_IO_STATUS_NORMAL) ++ if (g_io_channel_read_to_end (channel, NULL, NULL, &error) != G_IO_STATUS_NORMAL) + { + udisks_debug ("Error reading (uuid %s): %s (%s, %d)", + object->uuid, error->message, g_quark_to_string (error->domain), error->code); +@@ -527,8 +525,6 @@ attr_changed (GIOChannel *channel, + goto out; + } + +- g_free (str); +- + /* synthesize uevent */ + if (object->raid_device != NULL) + udisks_linux_mdraid_object_uevent (object, "change", object->raid_device, FALSE); +-- +2.30.2 + diff --git a/udisks2.spec b/udisks2.spec index 21421ee..6c77fd8 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -22,20 +22,20 @@ %define build_date %(date '+%Y%m%d') -# bcache is not available on RHEL -%if (0%{?rhel}) || %{with_bcache} == 0 +# bcache and zram are not available on RHEL +%if (0%{?rhel}) %define with_bcache 0 +%define with_zram 0 %endif # btrfs is not available on RHEL > 7 -%if 0%{?rhel} > 7 || %{with_btrfs} == 0 +%if 0%{?rhel} > 7 %define with_btrfs 0 %endif # feature parity with existing RHEL 7 packages %if (0%{?rhel}) && (0%{?rhel} <= 7) %define with_lsm 0 -%define with_zram 0 %define with_lvmcache 0 %endif @@ -48,7 +48,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 @@ -58,6 +58,10 @@ Patch2: udisks-2.10.0-module-names.patch Patch3: udisks-2.10.0-ata_conf_apply_GTask.patch # https://github.com/storaged-project/udisks/pull/847 Patch4: ignore-apple-boot-part.patch +Patch5: udisks-2.10.0-g_mkdtemp-leak.patch +Patch6: udisks-2.10.0-mdraid-iochannel-data.patch +Patch7: udisks-2.10.0-mdraid-g_source_attach.patch +Patch8: udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} @@ -433,6 +437,10 @@ fi %endif %changelog +* Mon Apr 19 2021 Tomas Bzatek - 2.9.2-4 +- Fix a couple of issues found by Coverity +- Ignore systemd "Extended Boot Loader" GPT partition + * Fri Mar 26 2021 Tomas Bzatek - 2.9.2-3 - Fix FAT mkfs with dosfstools >= 4.2 - udiskslinuxdriveata: Use GTask to apply configuration in a thread From e8fa33443080f874d88649bb59dff2565771149b Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Fri, 18 Jun 2021 15:19:58 +0200 Subject: [PATCH 05/36] * Fri Jun 18 2021 Tomas Bzatek - 2.9.2-5 - Switch the default encryption to LUKS2 --- udisks2.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/udisks2.spec b/udisks2.spec index 6c77fd8..62d8ead 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -14,7 +14,7 @@ %define with_lvmcache 1 # valid options are 'luks1' or 'luks2' -%define default_luks_encryption luks1 +%define default_luks_encryption luks2 %define is_fedora 0%{?rhel} == 0 %define is_git %(git show > /dev/null 2>&1 && echo 1 || echo 0) @@ -39,16 +39,11 @@ %define with_lvmcache 0 %endif -# default to LUKS2 for RHEL > 7 -%if 0%{?rhel} > 7 -%define default_luks_encryption luks2 -%endif - Name: udisks2 Summary: Disk Manager Version: 2.9.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 @@ -437,6 +432,9 @@ fi %endif %changelog +* Fri Jun 18 2021 Tomas Bzatek - 2.9.2-5 +- Switch the default encryption to LUKS2 + * Mon Apr 19 2021 Tomas Bzatek - 2.9.2-4 - Fix a couple of issues found by Coverity - Ignore systemd "Extended Boot Loader" GPT partition From 9eaa6ba622e3a09606f2868e64b7ade4bb8d9578 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 19:55:52 +0000 Subject: [PATCH 06/36] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- udisks2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udisks2.spec b/udisks2.spec index 62d8ead..9bf7167 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -43,7 +43,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 @@ -432,6 +432,9 @@ fi %endif %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.9.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 18 2021 Tomas Bzatek - 2.9.2-5 - Switch the default encryption to LUKS2 From 32406c2c3611d80f05dc336303a8ffc7a1c78241 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 5 Aug 2021 12:21:23 +0200 Subject: [PATCH 07/36] * Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 - Version 2.9.3 --- .gitignore | 1 + sources | 2 +- ...e-Extended-Boot-Loader-GPT-partition.patch | 29 ---- udisks-2.10.0-ata_conf_apply_GTask.patch | 60 -------- ...ks-2.10.0-dosfstools_4.2-reread_part.patch | 24 ---- udisks-2.10.0-dosfstools_4.2.patch | 75 ---------- udisks-2.10.0-g_mkdtemp-leak.patch | 32 ----- udisks-2.10.0-mdraid-g_source_attach.patch | 44 ------ udisks-2.10.0-mdraid-iochannel-data.patch | 47 ------ udisks-2.10.0-module-names.patch | 136 ------------------ udisks2.spec | 21 +-- 11 files changed, 8 insertions(+), 463 deletions(-) delete mode 100644 udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch delete mode 100644 udisks-2.10.0-ata_conf_apply_GTask.patch delete mode 100644 udisks-2.10.0-dosfstools_4.2-reread_part.patch delete mode 100644 udisks-2.10.0-dosfstools_4.2.patch delete mode 100644 udisks-2.10.0-g_mkdtemp-leak.patch delete mode 100644 udisks-2.10.0-mdraid-g_source_attach.patch delete mode 100644 udisks-2.10.0-mdraid-iochannel-data.patch delete mode 100644 udisks-2.10.0-module-names.patch diff --git a/.gitignore b/.gitignore index 4e6d3b5..ead2e15 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /udisks-2.9.0.tar.bz2 /udisks-2.9.1.tar.bz2 /udisks-2.9.2.tar.bz2 +/udisks-2.9.3.tar.bz2 diff --git a/sources b/sources index 5d50d1c..35442d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.9.2.tar.bz2) = 73a162bbb0fd6ec1e6a79af2a01185672712d7e94eacdc1a913f559a87fc620a095fe4c8b4dacbaa12bc816f565fc966d28c2f9299104da18581d4879321aee9 +SHA512 (udisks-2.9.3.tar.bz2) = 1ee6e982e599c6872183068dd64f9259a522dea7a91ddc3119f9bc436c9c6bf2911e61f7ae339d67d4851cb6f55ec05b6d9a4cc8c1a9f7c5d35c66b80d5ada42 diff --git a/udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch b/udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch deleted file mode 100644 index 1f98913..0000000 --- a/udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 79eed9aa35fbf1c5131b44b50b407742f68e2f61 Mon Sep 17 00:00:00 2001 -From: Florian Ziegler -Date: Sat, 17 Apr 2021 13:31:31 +0200 -Subject: [PATCH 8/8] Ignore "Extended Boot Loader" GPT partition - ---- - data/80-udisks2.rules | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules -index fb50f48a..39bfa28b 100644 ---- a/data/80-udisks2.rules -+++ b/data/80-udisks2.rules -@@ -135,6 +135,12 @@ ENV{ID_PART_ENTRY_SCHEME}=="gpt", \ - ENV{ID_PART_ENTRY_TYPE}=="c12a7328-f81f-11d2-ba4b-00a0c93ec93b|21686148-6449-6e6f-744e-656564454649|a19d880f-05fc-4d3b-a006-743f0f84911e|e6d6d379-f507-44c2-a23c-238f2a3df928|e3c9e316-0b5c-4db8-817d-f92df00215ae|de94bba4-06d1-4d40-a16a-bfd50179d6ac", \ - ENV{UDISKS_IGNORE}="1" - -+# special Extended Boot Loader partition (XBOOTLDR) -+# see https://systemd.io/BOOT_LOADER_SPECIFICATION/ -+ENV{ID_PART_ENTRY_SCHEME}=="gpt", \ -+ ENV{ID_PART_ENTRY_TYPE}=="bc13c2ff-59e6-4262-a352-b275fd6f7172", \ -+ ENV{UDISKS_IGNORE}="1" -+ - # ZFS member partitions - ENV{ID_PART_ENTRY_SCHEME}=="gpt", \ - ENV{ID_FS_TYPE}=="zfs_member", ENV{ID_PART_ENTRY_TYPE}=="6a898cc3-1dd2-11b2-99a6-080020736631", \ --- -2.30.2 - diff --git a/udisks-2.10.0-ata_conf_apply_GTask.patch b/udisks-2.10.0-ata_conf_apply_GTask.patch deleted file mode 100644 index 077fada..0000000 --- a/udisks-2.10.0-ata_conf_apply_GTask.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 6ff556afabd490feb6c4b29f9e91e81d64e2c0ed -Author: Tomas Bzatek -Date: Tue Mar 23 12:56:40 2021 +0100 - - udiskslinuxdriveata: Use GTask to apply configuration in a thread - - Should fix a leaking GThread without a need to join or track it anyhow. - -diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c -index 5ebdcd76..2de138cd 100644 ---- a/src/udiskslinuxdriveata.c -+++ b/src/udiskslinuxdriveata.c -@@ -1625,10 +1625,13 @@ apply_conf_data_free (ApplyConfData *data) - g_free (data); - } - --static gpointer --apply_configuration_thread_func (gpointer user_data) -+static void -+apply_configuration_thread_func (GTask *task, -+ gpointer source_object, -+ gpointer task_data, -+ GCancellable *cancellable) - { -- ApplyConfData *data = user_data; -+ ApplyConfData *data = task_data; - UDisksDaemon *daemon; - const gchar *device_file = NULL; - gint fd = -1; -@@ -1799,8 +1802,6 @@ apply_configuration_thread_func (gpointer user_data) - out: - if (fd != -1) - close (fd); -- apply_conf_data_free (data); -- return NULL; - } - - /** -@@ -1819,6 +1820,7 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, - { - gboolean has_conf = FALSE; - ApplyConfData *data = NULL; -+ GTask *task; - - data = g_new0 (ApplyConfData, 1); - data->ata_pm_standby = -1; -@@ -1862,9 +1864,10 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, - /* this can easily take a long time and thus block (the drive may be in standby mode - * and needs to spin up) - so run it in a thread - */ -- g_thread_new ("apply-conf-thread", -- apply_configuration_thread_func, -- data); -+ task = g_task_new (data->object, NULL, NULL, NULL); -+ g_task_set_task_data (task, data, (GDestroyNotify) apply_conf_data_free); -+ g_task_run_in_thread (task, apply_configuration_thread_func); -+ g_object_unref (task); - - data = NULL; /* don't free data below */ - diff --git a/udisks-2.10.0-dosfstools_4.2-reread_part.patch b/udisks-2.10.0-dosfstools_4.2-reread_part.patch deleted file mode 100644 index 414c830..0000000 --- a/udisks-2.10.0-dosfstools_4.2-reread_part.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit d58ebcc32b583371dd73ab7f4c7be5191674ca62 -Author: Tomas Bzatek -Date: Wed Mar 17 18:52:22 2021 +0100 - - udiskslinuxblock: Re-read partition table after creating FAT filesystem - - Might not be needed after reverting mkfs.vfat behaviour back - to the legacy way, added just as a precautionary measure. - -diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c -index 901426ad..69161b61 100644 ---- a/src/udiskslinuxblock.c -+++ b/src/udiskslinuxblock.c -@@ -2913,7 +2913,9 @@ static inline gboolean - need_partprobe_after_mkfs (const gchar *fs_type) - { - /* udftools makes fake MBR since the 2.0 release */ -- return (g_strcmp0 (fs_type, "udf") == 0); -+ /* dosfstools makes fake MBR since the 4.2 release */ -+ return (g_strcmp0 (fs_type, "udf") == 0 || -+ g_strcmp0 (fs_type, "vfat") == 0); - } - - void diff --git a/udisks-2.10.0-dosfstools_4.2.patch b/udisks-2.10.0-dosfstools_4.2.patch deleted file mode 100644 index 2764315..0000000 --- a/udisks-2.10.0-dosfstools_4.2.patch +++ /dev/null @@ -1,75 +0,0 @@ -commit ef1979d8cbfb8ad976de0af21a70f8c0f98fbbe9 -Author: Tomas Bzatek -Date: Wed Mar 17 18:50:19 2021 +0100 - - udiskslinuxfsinfo: Add dosfstools >= 4.2 quirks - - Reverting back the legacy behaviour with no protective (fake) MBR - created while making new FAT filesystem on an unpartitioned block device. - - Added a label clear functionality as well. - -diff --git a/src/udiskslinuxfsinfo.c b/src/udiskslinuxfsinfo.c -index 15af26c8..f18b9b80 100644 ---- a/src/udiskslinuxfsinfo.c -+++ b/src/udiskslinuxfsinfo.c -@@ -21,6 +21,8 @@ - #include - #include - -+#include -+ - #include "config.h" - #include "udiskslinuxfsinfo.h" - #include "udisksconfigmanager.h" -@@ -236,6 +238,19 @@ const FSInfo _fs_info[] = - }, - }; - -+/* workaround for dosfstools >= 4.2 */ -+static const FSInfo vfat_dosfstools_42 = -+ { -+ FS_VFAT, -+ "fatlabel $DEVICE $LABEL", -+ "fatlabel --reset $DEVICE", -+ FALSE, /* supports_online_label_rename */ -+ FALSE, /* supports_owners */ -+ "mkfs.vfat -I -n $LABEL --mbr=n $DEVICE", -+ NULL, -+ NULL, /* option_no_discard */ -+ }; -+ - /** - * get_fs_info: - * -@@ -248,6 +263,7 @@ const FSInfo _fs_info[] = - const FSInfo * - get_fs_info (const gchar *fstype) - { -+ const FSInfo *info = NULL; - guint n; - - g_return_val_if_fail (fstype != NULL, NULL); -@@ -255,10 +271,20 @@ get_fs_info (const gchar *fstype) - for (n = 0; n < sizeof(_fs_info)/sizeof(FSInfo); n++) - { - if (strcmp (_fs_info[n].fstype, fstype) == 0) -- return &_fs_info[n]; -+ { -+ info = &_fs_info[n]; -+ break; -+ } -+ } -+ -+ /* dosfstools >= 4.2 workaround */ -+ if (g_str_equal (fstype, FS_VFAT) && -+ bd_utils_check_util_version ("mkfs.vfat", "4.2", "--help", "mkfs.fat\\s+([\\d\\.]+).+", NULL)) -+ { -+ info = &vfat_dosfstools_42; - } - -- return NULL; -+ return info; - } - - /** diff --git a/udisks-2.10.0-g_mkdtemp-leak.patch b/udisks-2.10.0-g_mkdtemp-leak.patch deleted file mode 100644 index 58d58cd..0000000 --- a/udisks-2.10.0-g_mkdtemp-leak.patch +++ /dev/null @@ -1,32 +0,0 @@ -From fcdec5d58ba2bbe6d7ecf7168ab1a11282763041 Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Fri, 16 Apr 2021 18:15:03 +0200 -Subject: [PATCH 5/8] udiskslinuxfilesystemhelpers: Fix leaking string in case - g_mkdtemp() fails - ---- - src/udiskslinuxfilesystemhelpers.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/udiskslinuxfilesystemhelpers.c b/src/udiskslinuxfilesystemhelpers.c -index 74d83152..7c5fc037 100644 ---- a/src/udiskslinuxfilesystemhelpers.c -+++ b/src/udiskslinuxfilesystemhelpers.c -@@ -142,11 +142,11 @@ take_filesystem_ownership (const gchar *device, - else - { - /* device is not mounted, we need to mount it */ -- mountpoint = g_mkdtemp (g_strdup ("/run/udisks2/temp-mount-XXXXXX")); -- if (mountpoint == NULL) -+ mountpoint = g_strdup ("/run/udisks2/temp-mount-XXXXXX"); -+ if (g_mkdtemp (mountpoint) == NULL) - { - g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, -- "Cannot create temporary mountpoint."); -+ "Cannot create temporary mountpoint: %m."); - success = FALSE; - goto out; - } --- -2.30.2 - diff --git a/udisks-2.10.0-mdraid-g_source_attach.patch b/udisks-2.10.0-mdraid-g_source_attach.patch deleted file mode 100644 index 9fb9911..0000000 --- a/udisks-2.10.0-mdraid-g_source_attach.patch +++ /dev/null @@ -1,44 +0,0 @@ -From cd458666a93fe9d07f3718e88f3169f01a11a63e Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Fri, 16 Apr 2021 18:36:16 +0200 -Subject: [PATCH 7/8] udiskslinuxmdraidobject: Handle source attach failure - gracefully - -Only negligible theoretical chance to hit this, reported by Coverity. ---- - src/udiskslinuxmdraidobject.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/udiskslinuxmdraidobject.c b/src/udiskslinuxmdraidobject.c -index 20ca89c5..828c7058 100644 ---- a/src/udiskslinuxmdraidobject.c -+++ b/src/udiskslinuxmdraidobject.c -@@ -468,7 +468,8 @@ watch_attr (UDisksLinuxDevice *device, - GError *error = NULL; - gchar *path = NULL; - GIOChannel *channel = NULL; -- GSource *ret = NULL;; -+ GSource *ret = NULL; -+ guint source_id; - - g_return_val_if_fail (UDISKS_IS_LINUX_DEVICE (device), NULL); - -@@ -478,9 +479,14 @@ watch_attr (UDisksLinuxDevice *device, - { - ret = g_io_create_watch (channel, G_IO_ERR); - g_source_set_callback (ret, callback, user_data, NULL); -- g_source_attach (ret, g_main_context_get_thread_default ()); -+ source_id = g_source_attach (ret, g_main_context_get_thread_default ()); - g_source_unref (ret); - g_io_channel_unref (channel); /* the keeps a reference to this object */ -+ if (source_id == 0) -+ { -+ /* something bad happened while attaching the source */ -+ ret = NULL; -+ } - } - else - { --- -2.30.2 - diff --git a/udisks-2.10.0-mdraid-iochannel-data.patch b/udisks-2.10.0-mdraid-iochannel-data.patch deleted file mode 100644 index 51daf79..0000000 --- a/udisks-2.10.0-mdraid-iochannel-data.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0353b5f2f9c586d872750423259b6ef6cc375625 Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Fri, 16 Apr 2021 18:22:46 +0200 -Subject: [PATCH 6/8] udiskslinuxmdraidobject: Optimize unused data out from - the g_io_channel_read_to_end() call - -Looking into glib sources the g_io_channel_read_to_end() function -can handle NULL output pointers just fine and since the data is thrown -right away it's pointless to have them assigned. ---- - src/udiskslinuxmdraidobject.c | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/src/udiskslinuxmdraidobject.c b/src/udiskslinuxmdraidobject.c -index 759ff5f4..20ca89c5 100644 ---- a/src/udiskslinuxmdraidobject.c -+++ b/src/udiskslinuxmdraidobject.c -@@ -503,8 +503,6 @@ attr_changed (GIOChannel *channel, - UDisksLinuxMDRaidObject *object = UDISKS_LINUX_MDRAID_OBJECT (user_data); - gboolean bail = FALSE; - GError *error = NULL; -- gchar *str = NULL; -- gsize len = 0; - - if (cond & ~G_IO_ERR) - goto out; -@@ -518,7 +516,7 @@ attr_changed (GIOChannel *channel, - goto out; - } - -- if (g_io_channel_read_to_end (channel, &str, &len, &error) != G_IO_STATUS_NORMAL) -+ if (g_io_channel_read_to_end (channel, NULL, NULL, &error) != G_IO_STATUS_NORMAL) - { - udisks_debug ("Error reading (uuid %s): %s (%s, %d)", - object->uuid, error->message, g_quark_to_string (error->domain), error->code); -@@ -527,8 +525,6 @@ attr_changed (GIOChannel *channel, - goto out; - } - -- g_free (str); -- - /* synthesize uevent */ - if (object->raid_device != NULL) - udisks_linux_mdraid_object_uevent (object, "change", object->raid_device, FALSE); --- -2.30.2 - diff --git a/udisks-2.10.0-module-names.patch b/udisks-2.10.0-module-names.patch deleted file mode 100644 index a1a6619..0000000 --- a/udisks-2.10.0-module-names.patch +++ /dev/null @@ -1,136 +0,0 @@ -commit e062c17e3829f3c04c25b5f6fc17ccc4491befa8 -Author: Tomas Bzatek -Date: Tue Mar 23 16:48:08 2021 +0100 - - modules: Limit module name to alphanumeric characters and -_ separators - - A hardening feature as long as the module name is directly involved - in filename creation. - -diff --git a/doc/udisks2-sections.txt.daemon.sections.in b/doc/udisks2-sections.txt.daemon.sections.in -index 16eaf74e..204ca897 100644 ---- a/doc/udisks2-sections.txt.daemon.sections.in -+++ b/doc/udisks2-sections.txt.daemon.sections.in -@@ -312,6 +312,7 @@ udisks_daemon_util_get_free_mdraid_device - udisks_ata_identify_get_word - udisks_daemon_util_trigger_uevent - udisks_daemon_util_trigger_uevent_sync -+udisks_module_validate_name -
- -
-diff --git a/src/udisksconfigmanager.c b/src/udisksconfigmanager.c -index 9558e276..5868e864 100644 ---- a/src/udisksconfigmanager.c -+++ b/src/udisksconfigmanager.c -@@ -26,6 +26,7 @@ - #include "udiskslogging.h" - #include "udisksdaemontypes.h" - #include "udisksconfigmanager.h" -+#include "udisksdaemonutil.h" - - struct _UDisksConfigManager { - GObject parent_instance; -@@ -60,6 +61,8 @@ enum - #define DEFAULTS_GROUP_NAME "defaults" - #define DEFAULTS_ENCRYPTION_KEY "encryption" - -+#define MODULES_ALL_ARG "*" -+ - static void - udisks_config_manager_get_property (GObject *object, - guint property_id, -@@ -170,7 +173,16 @@ parse_config_file (UDisksConfigManager *manager, - { - modules_tmp = modules; - for (module_i = *modules_tmp; module_i; module_i = *++modules_tmp) -- *out_modules = g_list_append (*out_modules, g_strdup (g_strstrip (module_i))); -+ { -+ g_strstrip (module_i); -+ if (! udisks_module_validate_name (module_i) && !g_str_equal (module_i, MODULES_ALL_ARG)) -+ { -+ g_warning ("Invalid module name '%s' specified in the %s config file.", -+ module_i, conf_filename); -+ continue; -+ } -+ *out_modules = g_list_append (*out_modules, g_strdup (module_i)); -+ } - g_strfreev (modules); - } - } -@@ -397,7 +409,7 @@ udisks_config_manager_get_modules_all (UDisksConfigManager *manager) - - parse_config_file (manager, NULL, NULL, &modules); - -- ret = !modules || (g_strcmp0 (modules->data, "*") == 0 && g_list_length (modules) == 1); -+ ret = !modules || (g_strcmp0 (modules->data, MODULES_ALL_ARG) == 0 && g_list_length (modules) == 1); - - g_list_free_full (modules, (GDestroyNotify) g_free); - -diff --git a/src/udisksdaemonutil.c b/src/udisksdaemonutil.c -index 60134765..1695b524 100644 ---- a/src/udisksdaemonutil.c -+++ b/src/udisksdaemonutil.c -@@ -1880,3 +1880,29 @@ udisks_daemon_util_trigger_uevent_sync (UDisksDaemon *daemon, - } - - /* ---------------------------------------------------------------------------------------------------- */ -+ -+/** -+ * udisks_module_validate_name: -+ * @module_name: A udisks2 module name. -+ * -+ * Checks the string for a valid udisks2 module name. Only alphanumeric characters -+ * along with the '-' and '_' separators are permitted. -+ * -+ * Returns: %TRUE if the string is a valid udisks2 module name, %FALSE otherwise. -+ */ -+gboolean -+udisks_module_validate_name (const gchar *module_name) -+{ -+ int i; -+ -+ for (i = 0; module_name[i] != '\0'; i++) -+ /* going ASCII, will disqualify any UTF-* string */ -+ if (! g_ascii_isalnum (module_name[i]) && -+ module_name[i] != '-' && -+ module_name[i] != '_') -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -diff --git a/src/udisksdaemonutil.h b/src/udisksdaemonutil.h -index 2d7ac981..df584de4 100644 ---- a/src/udisksdaemonutil.h -+++ b/src/udisksdaemonutil.h -@@ -129,6 +129,8 @@ gchar *udisks_daemon_util_get_free_mdraid_device (void); - - guint16 udisks_ata_identify_get_word (const guchar *identify_data, guint word_number); - -+gboolean udisks_module_validate_name (const gchar *module_name); -+ - /* Utility macro for policy verification. */ - #define UDISKS_DAEMON_CHECK_AUTHORIZATION(daemon, \ - object, \ -diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c -index 8af65d97..26d8a5d7 100644 ---- a/src/udiskslinuxmanager.c -+++ b/src/udiskslinuxmanager.c -@@ -956,6 +956,15 @@ handle_enable_module (UDisksManager *object, - UDisksLinuxManager *manager = UDISKS_LINUX_MANAGER (object); - EnableModulesData *data; - -+ if (! udisks_module_validate_name (arg_name)) -+ { -+ g_dbus_method_invocation_return_error (invocation, -+ G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, -+ "Requested module name '%s' is not a valid udisks2 module name.", -+ arg_name); -+ return TRUE; -+ } -+ - if (! arg_enable) - { - /* TODO: implement proper module unloading */ diff --git a/udisks2.spec b/udisks2.spec index 9bf7167..df16593 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -42,21 +42,12 @@ Name: udisks2 Summary: Disk Manager -Version: 2.9.2 -Release: 6%{?dist} +Version: 2.9.3 +Release: 1%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 -Patch0: udisks-2.10.0-dosfstools_4.2.patch -Patch1: udisks-2.10.0-dosfstools_4.2-reread_part.patch -Patch2: udisks-2.10.0-module-names.patch -Patch3: udisks-2.10.0-ata_conf_apply_GTask.patch -# https://github.com/storaged-project/udisks/pull/847 -Patch4: ignore-apple-boot-part.patch -Patch5: udisks-2.10.0-g_mkdtemp-leak.patch -Patch6: udisks-2.10.0-mdraid-iochannel-data.patch -Patch7: udisks-2.10.0-mdraid-g_source_attach.patch -Patch8: udisks-2.10.0-Ignore-Extended-Boot-Loader-GPT-partition.patch +Patch0: ignore-apple-boot-part.patch BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} @@ -128,9 +119,6 @@ Requires: ntfsprogs %endif %endif -# For /proc/self/mountinfo, only available in 2.6.26 or higher -Conflicts: kernel < 2.6.26 - Provides: storaged = %{version}-%{release} Obsoletes: storaged @@ -432,6 +420,9 @@ fi %endif %changelog +* Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 +- Version 2.9.3 + * Fri Jul 23 2021 Fedora Release Engineering - 2.9.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From ef533f2dfb0b031a03247caf8e5146f6a894254a Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 5 Aug 2021 12:43:39 +0200 Subject: [PATCH 08/36] * Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 - Version 2.9.3 --- sources | 2 +- udisks-2.10.0-ata_conf_apply_GTask.patch | 60 -------- ...ks-2.10.0-dosfstools_4.2-reread_part.patch | 24 ---- udisks-2.10.0-dosfstools_4.2.patch | 75 ---------- udisks-2.10.0-module-names.patch | 136 ------------------ udisks2.spec | 13 +- 6 files changed, 7 insertions(+), 303 deletions(-) delete mode 100644 udisks-2.10.0-ata_conf_apply_GTask.patch delete mode 100644 udisks-2.10.0-dosfstools_4.2-reread_part.patch delete mode 100644 udisks-2.10.0-dosfstools_4.2.patch delete mode 100644 udisks-2.10.0-module-names.patch diff --git a/sources b/sources index 5d50d1c..35442d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.9.2.tar.bz2) = 73a162bbb0fd6ec1e6a79af2a01185672712d7e94eacdc1a913f559a87fc620a095fe4c8b4dacbaa12bc816f565fc966d28c2f9299104da18581d4879321aee9 +SHA512 (udisks-2.9.3.tar.bz2) = 1ee6e982e599c6872183068dd64f9259a522dea7a91ddc3119f9bc436c9c6bf2911e61f7ae339d67d4851cb6f55ec05b6d9a4cc8c1a9f7c5d35c66b80d5ada42 diff --git a/udisks-2.10.0-ata_conf_apply_GTask.patch b/udisks-2.10.0-ata_conf_apply_GTask.patch deleted file mode 100644 index 077fada..0000000 --- a/udisks-2.10.0-ata_conf_apply_GTask.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 6ff556afabd490feb6c4b29f9e91e81d64e2c0ed -Author: Tomas Bzatek -Date: Tue Mar 23 12:56:40 2021 +0100 - - udiskslinuxdriveata: Use GTask to apply configuration in a thread - - Should fix a leaking GThread without a need to join or track it anyhow. - -diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c -index 5ebdcd76..2de138cd 100644 ---- a/src/udiskslinuxdriveata.c -+++ b/src/udiskslinuxdriveata.c -@@ -1625,10 +1625,13 @@ apply_conf_data_free (ApplyConfData *data) - g_free (data); - } - --static gpointer --apply_configuration_thread_func (gpointer user_data) -+static void -+apply_configuration_thread_func (GTask *task, -+ gpointer source_object, -+ gpointer task_data, -+ GCancellable *cancellable) - { -- ApplyConfData *data = user_data; -+ ApplyConfData *data = task_data; - UDisksDaemon *daemon; - const gchar *device_file = NULL; - gint fd = -1; -@@ -1799,8 +1802,6 @@ apply_configuration_thread_func (gpointer user_data) - out: - if (fd != -1) - close (fd); -- apply_conf_data_free (data); -- return NULL; - } - - /** -@@ -1819,6 +1820,7 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, - { - gboolean has_conf = FALSE; - ApplyConfData *data = NULL; -+ GTask *task; - - data = g_new0 (ApplyConfData, 1); - data->ata_pm_standby = -1; -@@ -1862,9 +1864,10 @@ udisks_linux_drive_ata_apply_configuration (UDisksLinuxDriveAta *drive, - /* this can easily take a long time and thus block (the drive may be in standby mode - * and needs to spin up) - so run it in a thread - */ -- g_thread_new ("apply-conf-thread", -- apply_configuration_thread_func, -- data); -+ task = g_task_new (data->object, NULL, NULL, NULL); -+ g_task_set_task_data (task, data, (GDestroyNotify) apply_conf_data_free); -+ g_task_run_in_thread (task, apply_configuration_thread_func); -+ g_object_unref (task); - - data = NULL; /* don't free data below */ - diff --git a/udisks-2.10.0-dosfstools_4.2-reread_part.patch b/udisks-2.10.0-dosfstools_4.2-reread_part.patch deleted file mode 100644 index 414c830..0000000 --- a/udisks-2.10.0-dosfstools_4.2-reread_part.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit d58ebcc32b583371dd73ab7f4c7be5191674ca62 -Author: Tomas Bzatek -Date: Wed Mar 17 18:52:22 2021 +0100 - - udiskslinuxblock: Re-read partition table after creating FAT filesystem - - Might not be needed after reverting mkfs.vfat behaviour back - to the legacy way, added just as a precautionary measure. - -diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c -index 901426ad..69161b61 100644 ---- a/src/udiskslinuxblock.c -+++ b/src/udiskslinuxblock.c -@@ -2913,7 +2913,9 @@ static inline gboolean - need_partprobe_after_mkfs (const gchar *fs_type) - { - /* udftools makes fake MBR since the 2.0 release */ -- return (g_strcmp0 (fs_type, "udf") == 0); -+ /* dosfstools makes fake MBR since the 4.2 release */ -+ return (g_strcmp0 (fs_type, "udf") == 0 || -+ g_strcmp0 (fs_type, "vfat") == 0); - } - - void diff --git a/udisks-2.10.0-dosfstools_4.2.patch b/udisks-2.10.0-dosfstools_4.2.patch deleted file mode 100644 index 2764315..0000000 --- a/udisks-2.10.0-dosfstools_4.2.patch +++ /dev/null @@ -1,75 +0,0 @@ -commit ef1979d8cbfb8ad976de0af21a70f8c0f98fbbe9 -Author: Tomas Bzatek -Date: Wed Mar 17 18:50:19 2021 +0100 - - udiskslinuxfsinfo: Add dosfstools >= 4.2 quirks - - Reverting back the legacy behaviour with no protective (fake) MBR - created while making new FAT filesystem on an unpartitioned block device. - - Added a label clear functionality as well. - -diff --git a/src/udiskslinuxfsinfo.c b/src/udiskslinuxfsinfo.c -index 15af26c8..f18b9b80 100644 ---- a/src/udiskslinuxfsinfo.c -+++ b/src/udiskslinuxfsinfo.c -@@ -21,6 +21,8 @@ - #include - #include - -+#include -+ - #include "config.h" - #include "udiskslinuxfsinfo.h" - #include "udisksconfigmanager.h" -@@ -236,6 +238,19 @@ const FSInfo _fs_info[] = - }, - }; - -+/* workaround for dosfstools >= 4.2 */ -+static const FSInfo vfat_dosfstools_42 = -+ { -+ FS_VFAT, -+ "fatlabel $DEVICE $LABEL", -+ "fatlabel --reset $DEVICE", -+ FALSE, /* supports_online_label_rename */ -+ FALSE, /* supports_owners */ -+ "mkfs.vfat -I -n $LABEL --mbr=n $DEVICE", -+ NULL, -+ NULL, /* option_no_discard */ -+ }; -+ - /** - * get_fs_info: - * -@@ -248,6 +263,7 @@ const FSInfo _fs_info[] = - const FSInfo * - get_fs_info (const gchar *fstype) - { -+ const FSInfo *info = NULL; - guint n; - - g_return_val_if_fail (fstype != NULL, NULL); -@@ -255,10 +271,20 @@ get_fs_info (const gchar *fstype) - for (n = 0; n < sizeof(_fs_info)/sizeof(FSInfo); n++) - { - if (strcmp (_fs_info[n].fstype, fstype) == 0) -- return &_fs_info[n]; -+ { -+ info = &_fs_info[n]; -+ break; -+ } -+ } -+ -+ /* dosfstools >= 4.2 workaround */ -+ if (g_str_equal (fstype, FS_VFAT) && -+ bd_utils_check_util_version ("mkfs.vfat", "4.2", "--help", "mkfs.fat\\s+([\\d\\.]+).+", NULL)) -+ { -+ info = &vfat_dosfstools_42; - } - -- return NULL; -+ return info; - } - - /** diff --git a/udisks-2.10.0-module-names.patch b/udisks-2.10.0-module-names.patch deleted file mode 100644 index a1a6619..0000000 --- a/udisks-2.10.0-module-names.patch +++ /dev/null @@ -1,136 +0,0 @@ -commit e062c17e3829f3c04c25b5f6fc17ccc4491befa8 -Author: Tomas Bzatek -Date: Tue Mar 23 16:48:08 2021 +0100 - - modules: Limit module name to alphanumeric characters and -_ separators - - A hardening feature as long as the module name is directly involved - in filename creation. - -diff --git a/doc/udisks2-sections.txt.daemon.sections.in b/doc/udisks2-sections.txt.daemon.sections.in -index 16eaf74e..204ca897 100644 ---- a/doc/udisks2-sections.txt.daemon.sections.in -+++ b/doc/udisks2-sections.txt.daemon.sections.in -@@ -312,6 +312,7 @@ udisks_daemon_util_get_free_mdraid_device - udisks_ata_identify_get_word - udisks_daemon_util_trigger_uevent - udisks_daemon_util_trigger_uevent_sync -+udisks_module_validate_name -
- -
-diff --git a/src/udisksconfigmanager.c b/src/udisksconfigmanager.c -index 9558e276..5868e864 100644 ---- a/src/udisksconfigmanager.c -+++ b/src/udisksconfigmanager.c -@@ -26,6 +26,7 @@ - #include "udiskslogging.h" - #include "udisksdaemontypes.h" - #include "udisksconfigmanager.h" -+#include "udisksdaemonutil.h" - - struct _UDisksConfigManager { - GObject parent_instance; -@@ -60,6 +61,8 @@ enum - #define DEFAULTS_GROUP_NAME "defaults" - #define DEFAULTS_ENCRYPTION_KEY "encryption" - -+#define MODULES_ALL_ARG "*" -+ - static void - udisks_config_manager_get_property (GObject *object, - guint property_id, -@@ -170,7 +173,16 @@ parse_config_file (UDisksConfigManager *manager, - { - modules_tmp = modules; - for (module_i = *modules_tmp; module_i; module_i = *++modules_tmp) -- *out_modules = g_list_append (*out_modules, g_strdup (g_strstrip (module_i))); -+ { -+ g_strstrip (module_i); -+ if (! udisks_module_validate_name (module_i) && !g_str_equal (module_i, MODULES_ALL_ARG)) -+ { -+ g_warning ("Invalid module name '%s' specified in the %s config file.", -+ module_i, conf_filename); -+ continue; -+ } -+ *out_modules = g_list_append (*out_modules, g_strdup (module_i)); -+ } - g_strfreev (modules); - } - } -@@ -397,7 +409,7 @@ udisks_config_manager_get_modules_all (UDisksConfigManager *manager) - - parse_config_file (manager, NULL, NULL, &modules); - -- ret = !modules || (g_strcmp0 (modules->data, "*") == 0 && g_list_length (modules) == 1); -+ ret = !modules || (g_strcmp0 (modules->data, MODULES_ALL_ARG) == 0 && g_list_length (modules) == 1); - - g_list_free_full (modules, (GDestroyNotify) g_free); - -diff --git a/src/udisksdaemonutil.c b/src/udisksdaemonutil.c -index 60134765..1695b524 100644 ---- a/src/udisksdaemonutil.c -+++ b/src/udisksdaemonutil.c -@@ -1880,3 +1880,29 @@ udisks_daemon_util_trigger_uevent_sync (UDisksDaemon *daemon, - } - - /* ---------------------------------------------------------------------------------------------------- */ -+ -+/** -+ * udisks_module_validate_name: -+ * @module_name: A udisks2 module name. -+ * -+ * Checks the string for a valid udisks2 module name. Only alphanumeric characters -+ * along with the '-' and '_' separators are permitted. -+ * -+ * Returns: %TRUE if the string is a valid udisks2 module name, %FALSE otherwise. -+ */ -+gboolean -+udisks_module_validate_name (const gchar *module_name) -+{ -+ int i; -+ -+ for (i = 0; module_name[i] != '\0'; i++) -+ /* going ASCII, will disqualify any UTF-* string */ -+ if (! g_ascii_isalnum (module_name[i]) && -+ module_name[i] != '-' && -+ module_name[i] != '_') -+ return FALSE; -+ -+ return TRUE; -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -diff --git a/src/udisksdaemonutil.h b/src/udisksdaemonutil.h -index 2d7ac981..df584de4 100644 ---- a/src/udisksdaemonutil.h -+++ b/src/udisksdaemonutil.h -@@ -129,6 +129,8 @@ gchar *udisks_daemon_util_get_free_mdraid_device (void); - - guint16 udisks_ata_identify_get_word (const guchar *identify_data, guint word_number); - -+gboolean udisks_module_validate_name (const gchar *module_name); -+ - /* Utility macro for policy verification. */ - #define UDISKS_DAEMON_CHECK_AUTHORIZATION(daemon, \ - object, \ -diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c -index 8af65d97..26d8a5d7 100644 ---- a/src/udiskslinuxmanager.c -+++ b/src/udiskslinuxmanager.c -@@ -956,6 +956,15 @@ handle_enable_module (UDisksManager *object, - UDisksLinuxManager *manager = UDISKS_LINUX_MANAGER (object); - EnableModulesData *data; - -+ if (! udisks_module_validate_name (arg_name)) -+ { -+ g_dbus_method_invocation_return_error (invocation, -+ G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, -+ "Requested module name '%s' is not a valid udisks2 module name.", -+ arg_name); -+ return TRUE; -+ } -+ - if (! arg_enable) - { - /* TODO: implement proper module unloading */ diff --git a/udisks2.spec b/udisks2.spec index aa007b2..6170d58 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -47,17 +47,13 @@ Name: udisks2 Summary: Disk Manager -Version: 2.9.2 -Release: 2%{?dist} +Version: 2.9.3 +Release: 1%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 -Patch0: udisks-2.10.0-dosfstools_4.2.patch -Patch1: udisks-2.10.0-dosfstools_4.2-reread_part.patch -Patch2: udisks-2.10.0-module-names.patch -Patch3: udisks-2.10.0-ata_conf_apply_GTask.patch # https://github.com/storaged-project/udisks/pull/847 -Patch4: ignore-apple-boot-part.patch +Patch0: ignore-apple-boot-part.patch BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} @@ -433,6 +429,9 @@ fi %endif %changelog +* Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 +- Version 2.9.3 + * Fri Mar 26 2021 Tomas Bzatek - 2.9.2-2 - Fix FAT mkfs with dosfstools >= 4.2 - udiskslinuxdriveata: Use GTask to apply configuration in a thread From acb069045be694e2939a230402b689ae3abd144c Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 4 Oct 2021 16:51:36 +0200 Subject: [PATCH 09/36] * Mon Oct 04 2021 Tomas Bzatek - 2.9.4-1 - Version 2.9.4 - Fixes CVE-2021-3802 (#2003650) (cherry picked from commit 4e64d4ebfe21686b8653bd8572689f01e43c5643) --- .gitignore | 1 + sources | 2 +- udisks2.spec | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ead2e15..2befe26 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /udisks-2.9.1.tar.bz2 /udisks-2.9.2.tar.bz2 /udisks-2.9.3.tar.bz2 +/udisks-2.9.4.tar.bz2 diff --git a/sources b/sources index 35442d5..d2ecd4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.9.3.tar.bz2) = 1ee6e982e599c6872183068dd64f9259a522dea7a91ddc3119f9bc436c9c6bf2911e61f7ae339d67d4851cb6f55ec05b6d9a4cc8c1a9f7c5d35c66b80d5ada42 +SHA512 (udisks-2.9.4.tar.bz2) = 35f5429bc2a7092aa659cba9296837d127e2b17c23ab23111d0d9b230d15ef5a6965e112b1f3829748a69a52fb5b09722153f86f1ef70977b3ad7b7a4ec40ec5 diff --git a/udisks2.spec b/udisks2.spec index df16593..21bc3b1 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -42,7 +42,7 @@ Name: udisks2 Summary: Disk Manager -Version: 2.9.3 +Version: 2.9.4 Release: 1%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks @@ -420,6 +420,10 @@ fi %endif %changelog +* Mon Oct 04 2021 Tomas Bzatek - 2.9.4-1 +- Version 2.9.4 +- Fixes CVE-2021-3802 (#2003650) + * Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 - Version 2.9.3 From 2561d84bab50d210ecbe0385bec365ea04a482b4 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 4 Oct 2021 16:51:36 +0200 Subject: [PATCH 10/36] * Mon Oct 04 2021 Tomas Bzatek - 2.9.4-1 - Version 2.9.4 - Fixes CVE-2021-3802 (#2003650) (cherry picked from commit 4e64d4ebfe21686b8653bd8572689f01e43c5643) --- .gitignore | 2 ++ sources | 2 +- udisks2.spec | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4e6d3b5..2befe26 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ /udisks-2.9.0.tar.bz2 /udisks-2.9.1.tar.bz2 /udisks-2.9.2.tar.bz2 +/udisks-2.9.3.tar.bz2 +/udisks-2.9.4.tar.bz2 diff --git a/sources b/sources index 35442d5..d2ecd4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.9.3.tar.bz2) = 1ee6e982e599c6872183068dd64f9259a522dea7a91ddc3119f9bc436c9c6bf2911e61f7ae339d67d4851cb6f55ec05b6d9a4cc8c1a9f7c5d35c66b80d5ada42 +SHA512 (udisks-2.9.4.tar.bz2) = 35f5429bc2a7092aa659cba9296837d127e2b17c23ab23111d0d9b230d15ef5a6965e112b1f3829748a69a52fb5b09722153f86f1ef70977b3ad7b7a4ec40ec5 diff --git a/udisks2.spec b/udisks2.spec index 6170d58..1bc2e91 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -47,7 +47,7 @@ Name: udisks2 Summary: Disk Manager -Version: 2.9.3 +Version: 2.9.4 Release: 1%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks @@ -429,6 +429,10 @@ fi %endif %changelog +* Mon Oct 04 2021 Tomas Bzatek - 2.9.4-1 +- Version 2.9.4 +- Fixes CVE-2021-3802 (#2003650) + * Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 - Version 2.9.3 From 0655c07ec99a6e4771f7044b873110cc9625bdc4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:24:50 +0000 Subject: [PATCH 11/36] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- udisks2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udisks2.spec b/udisks2.spec index 21bc3b1..4332af8 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -43,7 +43,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 @@ -420,6 +420,9 @@ fi %endif %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 2.9.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Oct 04 2021 Tomas Bzatek - 2.9.4-1 - Version 2.9.4 - Fixes CVE-2021-3802 (#2003650) From 48f9326f04c9b303a2253605b587485be4862a70 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 3 Mar 2022 12:39:14 +0100 Subject: [PATCH 12/36] * Thu Mar 03 2022 Tomas Bzatek - 2.9.4-3 - Require ntfs-3g (#2058506) --- udisks2.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/udisks2.spec b/udisks2.spec index 4332af8..a48b066 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -43,7 +43,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 @@ -114,9 +114,8 @@ Requires: lib%{name}%{?_isa} = %{version}-%{release} # For mkntfs (not available on rhel or on ppc/ppc64) %if ! 0%{?rhel} -%ifnarch ppc ppc64 Requires: ntfsprogs -%endif +Requires: ntfs-3g %endif Provides: storaged = %{version}-%{release} @@ -420,6 +419,9 @@ fi %endif %changelog +* Thu Mar 03 2022 Tomas Bzatek - 2.9.4-3 +- Require ntfs-3g (#2058506) + * Sat Jan 22 2022 Fedora Release Engineering - 2.9.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 235d323d233015d360b7ca8a20a634692f9d741f Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 3 Mar 2022 16:31:00 +0100 Subject: [PATCH 13/36] * Thu Mar 03 2022 Tomas Bzatek - 2.9.4-4 - Fix gtk-doc annotations --- udisks-2.10.0-doc_annotations.patch | 39 +++++++++++++++++++++++++++++ udisks2.spec | 6 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 udisks-2.10.0-doc_annotations.patch diff --git a/udisks-2.10.0-doc_annotations.patch b/udisks-2.10.0-doc_annotations.patch new file mode 100644 index 0000000..30f85fc --- /dev/null +++ b/udisks-2.10.0-doc_annotations.patch @@ -0,0 +1,39 @@ +From 1ef9ab02af5c10a0fc7611c5579c4bc2344e83d0 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Tue, 15 Feb 2022 13:25:22 +0100 +Subject: [PATCH] doc: Fix @since: annotations + +Recent changes in gdbus-codegen (2.71.1) have introduced parser +issues on malformed annotations. + +https://gitlab.gnome.org/GNOME/glib/-/issues/2601 +--- + data/org.freedesktop.UDisks2.xml | 2 +- + modules/lvm2/data/org.freedesktop.UDisks2.lvm2.xml | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/data/org.freedesktop.UDisks2.xml b/data/org.freedesktop.UDisks2.xml +index 23f18746f..d9045a7f3 100644 +--- a/data/org.freedesktop.UDisks2.xml ++++ b/data/org.freedesktop.UDisks2.xml +@@ -1802,7 +1802,7 @@ +