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

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