File 0001-always-use-errors-remount-ro-for-ext-filesystems.patch of Package udisks2.40356

From b1c8439f9154e605179337761298a225e3cbc3ea Mon Sep 17 00:00:00 2001
From: Thomas Blume <Thomas.Blume@suse.com>
Date: Thu, 1 Sep 2022 15:34:15 +0200
Subject: [PATCH] always use errors=remount-ro for ext filesystems

backport of commit: 93f440c8409eec28739efb1598874543267b8d1e

(cherry picked from commit 193e92edb672a1d8853d33dfe5744a8066ceee62)
---
 src/udiskslinuxfilesystem.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
index dce739ae..84e54786 100644
--- a/src/udiskslinuxfilesystem.c
+++ b/src/udiskslinuxfilesystem.c
@@ -371,6 +371,21 @@ static const gchar *hfsplus_allow[] = { "creator", "type", "umask", "session", "
 static const gchar *hfsplus_allow_uid_self[] = { "uid", NULL };
 static const gchar *hfsplus_allow_gid_self[] = { "gid", NULL };
 
+/* ---------------------- ext2 -------------------- */
+
+static const gchar *ext2_defaults[] = { "errors=remount-ro", NULL };
+static const gchar *ext2_allow[] = { "errors", NULL };
+
+/* ---------------------- ext3 -------------------- */
+
+static const gchar *ext3_defaults[] = { "errors=remount-ro", NULL };
+static const gchar *ext3_allow[] = { "errors", NULL };
+
+/* ---------------------- ext4 -------------------- */
+
+static const gchar *ext4_defaults[] = { "errors=remount-ro", NULL };
+static const gchar *ext4_allow[] = { "errors", NULL };
+
 /* ------------------------------------------------ */
 /* TODO: support context= */
 
@@ -384,6 +399,9 @@ static const FSMountOptions fs_mount_options[] =
     { "udf", udf_defaults, udf_allow, udf_allow_uid_self, udf_allow_gid_self },
     { "exfat", exfat_defaults, exfat_allow, exfat_allow_uid_self, exfat_allow_gid_self },
     { "hfsplus", hfsplus_defaults, hfsplus_allow, hfsplus_allow_uid_self, hfsplus_allow_gid_self },
+    { "ext2", ext2_defaults, ext2_allow },
+    { "ext3", ext3_defaults, ext3_allow },
+    { "ext4", ext4_defaults, ext4_allow },
   };
 
 /* ------------------------------------------------ */
-- 
2.37.2

openSUSE Build Service is sponsored by