Blame SOURCES/autofs-5.0.7-dont-use-dirent-d_type-to-filter-out-files-in-scandir.patch

ab3a3d
autofs-5.0.7 - don't use dirent d_type to filter out files in scandir()
ab3a3d
ab3a3d
From: Leonardo Chiquitto <leonardo.lists@gmail.com>
ab3a3d
ab3a3d
The "d_type" field of a dirent structure is not filled in by all
ab3a3d
file systems (XFS being one example), so we can't rely on it to
ab3a3d
check file types.
ab3a3d
---
ab3a3d
ab3a3d
 CHANGELOG            |    1 +
ab3a3d
 modules/lookup_dir.c |    4 ----
ab3a3d
 2 files changed, 1 insertions(+), 4 deletions(-)
ab3a3d
ab3a3d
ab3a3d
diff --git a/CHANGELOG b/CHANGELOG
ab3a3d
index 460bd27..c9be73e 100644
ab3a3d
--- a/CHANGELOG
ab3a3d
+++ b/CHANGELOG
ab3a3d
@@ -21,6 +21,7 @@
ab3a3d
 - fix submount offset delete.
ab3a3d
 - fix init script status return.
ab3a3d
 - fix use get_proximity() without libtirpc.
ab3a3d
+- don't use dirent d_type to filter out files in scandir()
ab3a3d
 
ab3a3d
 25/07/2012 autofs-5.0.7
ab3a3d
 =======================
ab3a3d
diff --git a/modules/lookup_dir.c b/modules/lookup_dir.c
ab3a3d
index 658cc29..33901c0 100644
ab3a3d
--- a/modules/lookup_dir.c
ab3a3d
+++ b/modules/lookup_dir.c
ab3a3d
@@ -103,10 +103,6 @@ static int acceptable_dirent_p(const struct dirent *e)
ab3a3d
 {
ab3a3d
   size_t namesz;
ab3a3d
 
ab3a3d
-
ab3a3d
-  if (!(e->d_type == DT_REG || e->d_type == DT_LNK))
ab3a3d
-	  return 0;
ab3a3d
-
ab3a3d
   namesz = strlen(e->d_name);
ab3a3d
   if (!namesz)
ab3a3d
 	  return 0;