diff --git a/mount-fix-use-option-owner-mount-failed.patch b/mount-fix-use-option-owner-mount-failed.patch new file mode 100644 index 0000000000000000000000000000000000000000..26e4befa9c0ddc364c67e81c2fb27dfd89a8d69c --- /dev/null +++ b/mount-fix-use-option-owner-mount-failed.patch @@ -0,0 +1,39 @@ +From ebf1628e95659057e158228192569ba5b5f41269 Mon Sep 17 00:00:00 2001 +From: "He, Xinzhe" +Date: Thu, 20 Mar 2025 21:43:44 +0800 +Subject: [PATCH] mount-fix-use-option-owner-mount-failed + +Signed-off-by: He, Xinzhe +--- + libmount/src/context_mount.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index 09fa25b..2ecd04f 100644 +--- a/libmount/src/context_mount.c ++++ b/libmount/src/context_mount.c +@@ -202,10 +202,6 @@ static int evaluate_permissions(struct libmnt_context *cxt) + * + * The old deprecated way is to use mnt_optstr_get_flags(). + */ +- if (user_flags & (MNT_MS_OWNER | MNT_MS_GROUP)) +- rc = mnt_optlist_remove_flags(ol, +- MNT_MS_OWNER | MNT_MS_GROUP, cxt->map_userspace); +- + if (!rc && (user_flags & MNT_MS_OWNER)) + rc = mnt_optlist_insert_flags(ol, + MS_OWNERSECURE, cxt->map_linux, +@@ -226,6 +222,10 @@ static int evaluate_permissions(struct libmnt_context *cxt) + rc = mnt_optlist_insert_flags(ol, MS_SECURE, cxt->map_linux, + MNT_MS_USERS, cxt->map_userspace); + ++ if (user_flags & (MNT_MS_OWNER | MNT_MS_GROUP)) ++ rc = mnt_optlist_remove_flags(ol, ++ MNT_MS_OWNER | MNT_MS_GROUP, cxt->map_userspace); ++ + DBG(CXT, ul_debugobj(cxt, "perms: superuser [rc=%d]", rc)); + if (rc) + return rc; +-- +2.43.0 + diff --git a/util-linux.spec b/util-linux.spec index f31854874f8eefc9da02ac815ddf713be92cf1b7..91b2dabfa7faf5ec32db17a8add7a73b72b604dc 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Name: util-linux Version: 2.39.1 -Release: 3 +Release: 4 Summary: A random collection of Linux utilities License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git @@ -31,6 +31,7 @@ Patch9000: SKIPPED-no-root-permissions-test.patch %ifarch sw_64 Patch9001: util-linux-Add-sw64-architecture.patch %endif +Patch9002: mount-fix-use-option-owner-mount-failed.patch BuildRequires: audit-libs-devel >= 1.0.6 gettext-devel libselinux-devel ncurses-devel pam-devel zlib-devel popt-devel BuildRequires: libutempter-devel systemd-devel systemd libuser-devel libcap-ng-devel python3-devel gcc autoconf automake @@ -404,6 +405,12 @@ fi %{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*} %changelog +* Thu Mar 20 2025 He, Xinzhe - 2.39.1-4 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix use option "owner" mount failed + * Tue Aug 29 2023 zhangyao - 2.39.1-3 - Type:bugfix - CVE:NA