[arch-commits] Commit in util-linux/trunk (2 files)

Christian Hesse eworm at archlinux.org
Wed Nov 18 13:05:58 UTC 2020


    Date: Wednesday, November 18, 2020 @ 13:05:58
  Author: eworm
Revision: 401335

upgpkg: util-linux 2.36.1-3: revert: mount: Add support for "nosymfollow" mount option. (FS#68660)

Added:
  util-linux/trunk/0001-mount-Add-support-for-nosymfollow-mount-option.patch
Modified:
  util-linux/trunk/PKGBUILD

-----------------------------------------------------------+
 0001-mount-Add-support-for-nosymfollow-mount-option.patch |   77 ++++++++++++
 PKGBUILD                                                  |   10 +
 2 files changed, 86 insertions(+), 1 deletion(-)

Added: 0001-mount-Add-support-for-nosymfollow-mount-option.patch
===================================================================
--- 0001-mount-Add-support-for-nosymfollow-mount-option.patch	                        (rev 0)
+++ 0001-mount-Add-support-for-nosymfollow-mount-option.patch	2020-11-18 13:05:58 UTC (rev 401335)
@@ -0,0 +1,77 @@
+commit 73b193f8da0437d1b399903cf0f8e4c827adc03c
+Author: Mattias Nissler <mnissler at chromium.org>
+Date:   Thu Nov 17 14:47:51 2016 +0100
+
+    mount: Add support for "nosymfollow" mount option.
+    
+    This adds support for the "nosymfollow" mount option, which indicates
+    that symlinks should not be traversed on the mount this option is
+    applied to.  Also update the mount(8) man page with information about
+    this option.
+    
+    Signed-off-by: Mattias Nissler <mnissler at chromium.org>
+    Signed-off-by: Ross Zwisler <zwisler at google.com>
+
+diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
+index e0ef550b0..8c394c1ff 100644
+--- a/libmount/src/context_mount.c
++++ b/libmount/src/context_mount.c
+@@ -422,6 +422,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);
+ 	}
+ 
+ 
+diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
+index 321c0540b..e6710ae01 100644
+--- a/libmount/src/libmount.h.in
++++ b/libmount/src/libmount.h.in
+@@ -941,6 +941,9 @@ extern int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status
+ #ifndef MS_DIRSYNC
+ #define MS_DIRSYNC	128	/* Directory modifications are synchronous */
+ #endif
++#ifndef MS_NOSYMFOLLOW
++#define MS_NOSYMFOLLOW	256	/* Don't follow symlinks */
++#endif
+ #ifndef MS_NOATIME
+ #define MS_NOATIME	0x400	/* 1024: Do not update access times. */
+ #endif
+diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c
+index a080d8df6..49e8113d2 100644
+--- a/libmount/src/optmap.c
++++ b/libmount/src/optmap.c
+@@ -131,6 +131,10 @@ static const struct libmnt_optmap linux_flags_map[] =
+    { "rslave",      MS_SLAVE | MS_REC,      MNT_NOHLPS | MNT_NOMTAB },
+    { "shared",      MS_SHARED,              MNT_NOHLPS | MNT_NOMTAB }, /* Shared */
+    { "rshared",     MS_SHARED | MS_REC,     MNT_NOHLPS | MNT_NOMTAB },
++#endif
++#ifdef MS_NOSYMFOLLOW
++   { "symfollow", MS_NOSYMFOLLOW, MNT_INVERT }, /* Don't follow symlinks */
++   { "nosymfollow", MS_NOSYMFOLLOW },
+ #endif
+    { NULL, 0, 0 }
+ };
+diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
+index d633d25a4..d5fa55f43 100644
+--- a/sys-utils/mount.8
++++ b/sys-utils/mount.8
+@@ -1472,6 +1472,16 @@ specifies the filesystem access mode used for
+ in octal notation.  The default mode is 0755.  This functionality is supported
+ only for root users or when mount executed without suid permissions.  The option
+ is also supported as x-mount.mkdir, this notation is deprecated since v2.30.
++.TP
++.B nosymfollow
++Do not follow symlinks when resolving paths.  Symlinks can still be created,
++and
++.BR readlink (1),
++.BR readlink (2),
++.BR realpath (1)
++and
++.BR realpath (3)
++all still work properly.
+ 
+ .SH FILESYSTEM-SPECIFIC MOUNT OPTIONS
+ This section lists options that are specific to particular filesystems.

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-18 09:15:45 UTC (rev 401334)
+++ PKGBUILD	2020-11-18 13:05:58 UTC (rev 401335)
@@ -6,7 +6,7 @@
 pkgname=(util-linux util-linux-libs)
 _pkgmajor=2.36
 pkgver=${_pkgmajor}.1
-pkgrel=2
+pkgrel=3
 pkgdesc='Miscellaneous system utilities for Linux'
 url='https://github.com/karelzak/util-linux'
 arch=('x86_64')
@@ -15,6 +15,7 @@
 options=('strip')
 validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284')  # Karel Zak
 source=("https://www.kernel.org/pub/linux/utils/util-linux/v$_pkgmajor/$pkgbase-$pkgver.tar."{xz,sign}
+        '0001-mount-Add-support-for-nosymfollow-mount-option.patch'
         pam-{login,common,runuser,su}
         'util-linux.sysusers'
         '60-rfkill.rules'
@@ -22,6 +23,7 @@
         'rfkill-block_.service')
 sha256sums=('09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed'
             'SKIP'
+            'cafa7fa04c97e88929644ecacf30b29b54bb7a647fee8f909c4f98f3e692afb0'
             '993a3096c2b113e6800f2abbd5d4233ebf1a97eef423990d3187d665d3490b92'
             'fc6807842f92e9d3f792d6b64a0d5aad87995a279153ab228b1b2a64d9f32f20'
             '95b7cdc4cba17494d7b87f37f8d0937ec54c55de0e3ce9d9ab05ad5cc76bf935'
@@ -31,6 +33,12 @@
             '8ccec10a22523f6b9d55e0d6cbf91905a39881446710aa083e935e8073323376'
             'a22e0a037e702170c7d88460cc9c9c2ab1d3e5c54a6985cd4a164ea7beff1b36')
 
+prepare() {
+  cd "$pkgbase-$pkgver"
+
+  patch -Np1 -R < ../0001-mount-Add-support-for-nosymfollow-mount-option.patch
+}
+
 build() {
   cd "$pkgbase-$pkgver"
 



More information about the arch-commits mailing list