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

From 6c937d4f11c5d43e4a3787fd337bf2455c93c941 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
---
 src/udiskslinuxfilesystem.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
index f243046e..2ea2386a 100644
--- a/src/udiskslinuxfilesystem.c
+++ b/src/udiskslinuxfilesystem.c
@@ -309,6 +309,21 @@ static const gchar *exfat_allow[] = { "dmask=", "errors=", "fmask=", "iocharset=
 static const gchar *exfat_allow_uid_self[] = { "uid=", NULL };
 static const gchar *exfat_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= */
 
@@ -321,6 +336,9 @@ static const FSMountOptions fs_mount_options[] =
     { "iso9660", iso9660_defaults, iso9660_allow, iso9660_allow_uid_self, iso9660_allow_gid_self },
     { "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 },
+    { "ext2", ext2_defaults, ext2_allow },
+    { "ext3", ext3_defaults, ext3_allow },
+    { "ext4", ext4_defaults, ext4_allow },
   };
 
 /* ------------------------------------------------ */
-- 
2.37.2

openSUSE Build Service is sponsored by