diff options
author | Jeroen Roovers <jer@gentoo.org> | 2016-05-23 07:11:58 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2016-05-23 07:15:40 +0200 |
commit | 5fbc6165565a91e6d51443f73eccacfafc4065ed (patch) | |
tree | 7c098aed6af06069372581b354b31df74d0e5195 /sys-apps/findutils/files | |
parent | profiles/package.mask: mask app-admin/lastpass for removal (diff) | |
download | gentoo-5fbc6165565a91e6d51443f73eccacfafc4065ed.tar.gz gentoo-5fbc6165565a91e6d51443f73eccacfafc4065ed.tar.bz2 gentoo-5fbc6165565a91e6d51443f73eccacfafc4065ed.zip |
sys-apps/findutils: Fix abort in searching NFS filesystems (bug #580032).
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'sys-apps/findutils/files')
-rw-r--r-- | sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch b/sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch new file mode 100644 index 000000000000..8d47800eeb5e --- /dev/null +++ b/sys-apps/findutils/files/findutils-4.6.0-gnulib-S_MAGIC_NFS.patch @@ -0,0 +1,52 @@ +From 85717b68b03bf85016c5079fbbf0c8aa2b182ba6 Mon Sep 17 00:00:00 2001 +From: Pádraig Brady <P@draigBrady.com> +Date: Mon, 18 Jan 2016 17:29:28 +0000 +Subject: fts: don't unconditionally use leaf optimization for NFS + +NFS st_nlink are not accurate on all implementations, +leading to aborts() if that assumption is made. +See <https://bugzilla.redhat.com/1299169> +* lib/fts.c (leaf_optimization_applies): Remove NFS from +the white list, and document the issue. +--- +(limited to 'lib/fts.c') + +diff --git a/lib/fts.c b/lib/fts.c +index 7e9aca6..2c9df2f 100644 +--- a/gl/lib/fts.c ++++ b/gl/lib/fts.c +@@ -718,22 +718,23 @@ leaf_optimization_applies (int dir_fd) + + switch (fs_buf.f_type) + { +- case S_MAGIC_NFS: +- /* NFS provides usable dirent.d_type but not necessarily for all entries +- of large directories. See <https://bugzilla.redhat.com/1252549>. */ +- return true; +- + /* List here the file system types that lack usable dirent.d_type + info, yet for which the optimization does apply. */ + case S_MAGIC_REISERFS: + case S_MAGIC_XFS: + return true; + ++ /* Explicitly list here any other file system type for which the ++ optimization is not applicable, but need documentation. */ ++ case S_MAGIC_NFS: ++ /* NFS provides usable dirent.d_type but not necessarily for all entries ++ of large directories, so as per <https://bugzilla.redhat.com/1252549> ++ NFS should return true. However st_nlink values are not accurate on ++ all implementations as per <https://bugzilla.redhat.com/1299169>. */ ++ /* fall through */ + case S_MAGIC_PROC: +- /* Explicitly listing this or any other file system type for which +- the optimization is not applicable is not necessary, but we leave +- it here to document the risk. Per http://bugs.debian.org/143111, +- /proc may have bogus stat.st_nlink values. */ ++ /* Per <http://bugs.debian.org/143111> /proc may have ++ bogus stat.st_nlink values. */ + /* fall through */ + default: + return false; +-- +cgit v0.9.0.2 |