From f1fcc4cb92a60572a8e81ab7333b03e2b629697e Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Thu, 11 Feb 2021 10:57:51 +0100 Subject: [PATCH] util-linux-libs: Fix nofollow option for helpers This is a temporary patch until upstream makes a new release, as this blocks mount usage for users. --- srcpkgs/util-linux-libs/template | 2 +- ...se-symfollow-for-helpers-on-user-mou.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/util-linux/patches/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch diff --git a/srcpkgs/util-linux-libs/template b/srcpkgs/util-linux-libs/template index 4be19d8ccf5..ebca35ccb74 100644 --- a/srcpkgs/util-linux-libs/template +++ b/srcpkgs/util-linux-libs/template @@ -2,7 +2,7 @@ # Keep this package sync with util-linux pkgname=util-linux-libs version=2.36.1 -revision=1 +revision=2 wrksrc="util-linux-$version" build_style=meta hostmakedepends="automake bison gettext gettext-devel libtool pkg-config xz" diff --git a/srcpkgs/util-linux/patches/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch b/srcpkgs/util-linux/patches/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch new file mode 100644 index 00000000000..d0c0ca4047d --- /dev/null +++ b/srcpkgs/util-linux/patches/0001-libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch @@ -0,0 +1,40 @@ +From 52f730e47869ce630fafb24fd46f755dc7ffc691 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 19 Nov 2020 09:49:16 +0100 +Subject: [PATCH] libmount: don't use "symfollow" for helpers on user mounts + +Addresses: https://github.com/karelzak/util-linux/issues/1193 +Signed-off-by: Karel Zak +--- + libmount/src/context_mount.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index 8c394c1ff..dd1786176 100644 +--- libmount/src/context_mount.c ++++ libmount/src/context_mount.c +@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) + * string, because there is nothing like MS_EXEC (we only have + * MS_NOEXEC in mount flags and we don't care about the original + * mount string in libmount for VFS options). ++ * ++ * This use-case makes sense for MS_SECURE flags only (see ++ * mnt_optstr_get_flags() and mnt_context_merge_mflags()). + */ + if (!(cxt->mountflags & MS_NOEXEC)) + mnt_optstr_append_option(optstr, "exec", NULL); +@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr) + mnt_optstr_append_option(optstr, "suid", NULL); + if (!(cxt->mountflags & MS_NODEV)) + mnt_optstr_append_option(optstr, "dev", NULL); +- if (!(cxt->mountflags & MS_NOSYMFOLLOW)) +- mnt_optstr_append_option(optstr, "symfollow", NULL); + } + +- + if (cxt->flags & MNT_FL_SAVED_USER) + rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user); + if (rc) +-- +2.30.1 +