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

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