dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame libmount-don-t-use-symfollow-for-helpers-on-user-mou.patch

DistroBaker 8c971d
From 76bb9b30cfcf54b59591a57a3d2a747e514469b2 Mon Sep 17 00:00:00 2001
DistroBaker 8c971d
From: Karel Zak <kzak@redhat.com>
DistroBaker 8c971d
Date: Thu, 19 Nov 2020 09:49:16 +0100
DistroBaker 8c971d
Subject: [PATCH] libmount: don't use "symfollow" for helpers on user mounts
DistroBaker 8c971d
DistroBaker 8c971d
Addresses: https://github.com/karelzak/util-linux/issues/1193
DistroBaker 8c971d
Signed-off-by: Karel Zak <kzak@redhat.com>
DistroBaker 8c971d
---
DistroBaker 8c971d
 libmount/src/context_mount.c | 6 +++---
DistroBaker 8c971d
 1 file changed, 3 insertions(+), 3 deletions(-)
DistroBaker 8c971d
DistroBaker 8c971d
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
DistroBaker 8c971d
index 8c394c1ff..dd1786176 100644
DistroBaker 8c971d
--- a/libmount/src/context_mount.c
DistroBaker 8c971d
+++ b/libmount/src/context_mount.c
DistroBaker 8c971d
@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr)
DistroBaker 8c971d
 		 * string, because there is nothing like MS_EXEC (we only have
DistroBaker 8c971d
 		 * MS_NOEXEC in mount flags and we don't care about the original
DistroBaker 8c971d
 		 * mount string in libmount for VFS options).
DistroBaker 8c971d
+		 *
DistroBaker 8c971d
+		 * This use-case makes sense for MS_SECURE flags only (see
DistroBaker 8c971d
+		 * mnt_optstr_get_flags() and mnt_context_merge_mflags()).
DistroBaker 8c971d
 		 */
DistroBaker 8c971d
 		if (!(cxt->mountflags & MS_NOEXEC))
DistroBaker 8c971d
 			mnt_optstr_append_option(optstr, "exec", NULL);
DistroBaker 8c971d
@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr)
DistroBaker 8c971d
 			mnt_optstr_append_option(optstr, "suid", NULL);
DistroBaker 8c971d
 		if (!(cxt->mountflags & MS_NODEV))
DistroBaker 8c971d
 			mnt_optstr_append_option(optstr, "dev", NULL);
DistroBaker 8c971d
-		if (!(cxt->mountflags & MS_NOSYMFOLLOW))
DistroBaker 8c971d
-			mnt_optstr_append_option(optstr, "symfollow", NULL);
DistroBaker 8c971d
 	}
DistroBaker 8c971d
 
DistroBaker 8c971d
-
DistroBaker 8c971d
 	if (cxt->flags & MNT_FL_SAVED_USER)
DistroBaker 8c971d
 		rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user);
DistroBaker 8c971d
 	if (rc)
DistroBaker 8c971d
-- 
DistroBaker 8c971d
2.25.4
DistroBaker 8c971d