From 694030d843dc2307c7ffdced1c607bc07b353235 Mon Sep 17 00:00:00 2001 From: Franz-Josef Haider Date: Mon, 15 Mar 2021 13:33:52 +0000 Subject: [PATCH] [udisks2] Always mount filesystems using the UUID instead of label. Contributes to JB#53330 --- ...esystems-using-the-UUID-instead-of-l.patch | 38 +++++++++++++++++++ rpm/udisks2.spec | 1 + 2 files changed, 39 insertions(+) create mode 100644 rpm/0014-Always-mount-filesystems-using-the-UUID-instead-of-l.patch diff --git a/rpm/0014-Always-mount-filesystems-using-the-UUID-instead-of-l.patch b/rpm/0014-Always-mount-filesystems-using-the-UUID-instead-of-l.patch new file mode 100644 index 0000000..98d0cfa --- /dev/null +++ b/rpm/0014-Always-mount-filesystems-using-the-UUID-instead-of-l.patch @@ -0,0 +1,38 @@ +From 691a56727565cc5425df86d995cd740e89cc3aa6 Mon Sep 17 00:00:00 2001 +From: Franz-Josef Haider +Date: Mon, 15 Mar 2021 13:29:59 +0000 +Subject: [PATCH 14/14] Always mount filesystems using the UUID instead of + label. + +--- + src/udiskslinuxfilesystem.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c +index 9ceec385..453bd528 100644 +--- a/src/udiskslinuxfilesystem.c ++++ b/src/udiskslinuxfilesystem.c +@@ -1086,6 +1086,9 @@ calculate_mount_point (UDisksDaemon *daemon, + * + * See http://en.wikipedia.org/wiki/UTF-8 for details. + */ ++#if 1 ++ (void)label; ++#else + if (label != NULL && strlen (label) > 0) + { + str = g_string_new (NULL); +@@ -1102,7 +1105,9 @@ calculate_mount_point (UDisksDaemon *daemon, + mount_point = g_string_free (str, FALSE); + g_free (s); + } +- else if (uuid != NULL && strlen (uuid) > 0) ++ else ++#endif ++ if (uuid != NULL && strlen (uuid) > 0) + { + str = g_string_new (NULL); + g_string_append_printf (str, "%s/", mount_dir); +-- +2.26.2 + diff --git a/rpm/udisks2.spec b/rpm/udisks2.spec index d9e9916..f8109aa 100644 --- a/rpm/udisks2.spec +++ b/rpm/udisks2.spec @@ -29,6 +29,7 @@ Patch10: 0010-Allow-rescan-for-inactive.patch Patch11: 0011-Allow-whitelisting-filesystems-that-can-be-mounted.patch Patch12: 0012-Add-option-to-set-group-permissions.patch Patch13: 0013-Pass-extra-mount-options-to-mount-sd-service.patch +Patch14: 0014-Always-mount-filesystems-using-the-UUID-instead-of-l.patch BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gobject-introspection-1.0)