Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 139

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

diff --git a/daemon/direct.c b/daemon/direct.c
index 070e614..aa1a501 100644
--- a/daemon/direct.c
+++ b/daemon/direct.c
@@ -930,6 +930,7 @@ void *expire_proc_direct(void *arg)
 
 		if (!strcmp(next->fs_type, "autofs")) {
 			struct stat st;
+			struct statfs fs;
 			int ioctlfd;
 
 			cache_unlock(me->mc);
@@ -950,7 +951,14 @@ void *expire_proc_direct(void *arg)
 				continue;
 			}
 
-			if (tree_is_mounted(mnts, next->path, MNTS_REAL)) {
+			if (statfs(next->path, &fs) == -1) {
+				pthread_setcancelstate(cur_state, NULL);
+				warn(ap->logopt,
+				    "fstatfs failed for %s", next->path);
+				continue;
+			}
+
+			if (fs.f_type != AUTOFS_SUPER_MAGIC) {
 				pthread_setcancelstate(cur_state, NULL);
 				continue;
 			}