Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Tomas Bzatek
1c12af772b * Fri Mar 01 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10.1-5
- udiskslinuxblock: Survive a missing /etc/fstab (#2264922)
2024-03-01 16:10:23 +01:00
2 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,32 @@
From 8f62f7c6888659f3b66d5861d46fb9b3a34ff169 Mon Sep 17 00:00:00 2001
From: Marius Vollmer <mvollmer@redhat.com>
Date: Thu, 22 Feb 2024 16:49:24 +0200
Subject: [PATCH] udiskslinuxblock: Survive a missing /etc/fstab
This is similar to b79f6840ca82551e672156153b7e13328f0ba19d, which
solved the same problem for /etc/crypttab.
---
src/udiskslinuxblock.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
index 829dd5f78..a3fa183be 100644
--- a/src/udiskslinuxblock.c
+++ b/src/udiskslinuxblock.c
@@ -1541,7 +1541,15 @@ add_remove_fstab_entry (UDisksBlock *block,
&contents,
NULL,
error))
- goto out;
+ {
+ if (g_error_matches (*error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+ {
+ contents = g_strdup ("");
+ g_clear_error (error);
+ }
+ else
+ goto out;
+ }
lines = g_strsplit (contents, "\n", 0);

View file

@ -24,7 +24,7 @@
Name: udisks2 Name: udisks2
Summary: Disk Manager Summary: Disk Manager
Version: 2.10.1 Version: 2.10.1
Release: 4%{?dist} Release: 5%{?dist}
License: GPL-2.0-or-later License: GPL-2.0-or-later
URL: https://github.com/storaged-project/udisks URL: https://github.com/storaged-project/udisks
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
@ -32,6 +32,7 @@ Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{v
Patch0: udisks-2.11.0-BLKRRPART_harder.patch Patch0: udisks-2.11.0-BLKRRPART_harder.patch
Patch1: udisks-2.11.0-targetcli_config.json_netif_timeout.patch Patch1: udisks-2.11.0-targetcli_config.json_netif_timeout.patch
Patch2: udisks-2.11.0-udiskslinuxmanager_use_after_free.patch Patch2: udisks-2.11.0-udiskslinuxmanager_use_after_free.patch
Patch3: udisks-2.11.0-udiskslinuxblock_survive_missing_fstab.patch
BuildRequires: make BuildRequires: make
BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: glib2-devel >= %{glib2_version}
@ -336,6 +337,9 @@ fi
%endif %endif
%changelog %changelog
* Fri Mar 01 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10.1-5
- udiskslinuxblock: Survive a missing /etc/fstab (#2264922)
* Mon Feb 12 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10.1-4 * Mon Feb 12 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10.1-4
- Use SPDX license tags for subpackages - Use SPDX license tags for subpackages