Blame SOURCES/autofs-5.0.9-check-for-non-existent-negative-entries-in-lookup_ghost.patch

4d476f
autofs-5.0.9 - check for non existent negative entries in lookup_ghost()
4d476f
4d476f
From: Ian Kent <raven@themaw.net>
4d476f
4d476f
Map entries that have been created in the cache due to a negative lookup
4d476f
but don't exist in the map source shouldn't have directories created.
4d476f
In fact map entries that are negative shouldn't have directories created
4d476f
at all since they should have neen created befor the entry became negative.
4d476f
---
4d476f
 CHANGELOG       |    1 +
4d476f
 daemon/lookup.c |    8 ++++++++
4d476f
 2 files changed, 9 insertions(+)
4d476f
4d476f
--- autofs-5.0.7.orig/CHANGELOG
4d476f
+++ autofs-5.0.7/CHANGELOG
4d476f
@@ -72,6 +72,7 @@
4d476f
 - fix protmap not trying proto v2.
4d476f
 - fix negative status being reset on map read.
4d476f
 - fix fix negative status being reset on map read.
4d476f
+- check for non existent negative entries in lookup_ghost().
4d476f
 
4d476f
 25/07/2012 autofs-5.0.7
4d476f
 =======================
4d476f
--- autofs-5.0.7.orig/daemon/lookup.c
4d476f
+++ autofs-5.0.7/daemon/lookup.c
4d476f
@@ -604,6 +604,14 @@ int lookup_ghost(struct autofs_point *ap
4d476f
 		cache_readlock(mc);
4d476f
 		me = cache_enumerate(mc, NULL);
4d476f
 		while (me) {
4d476f
+			/*
4d476f
+			 * Map entries that have been created in the cache
4d476f
+			 * due to a negative lookup shouldn't have directories
4d476f
+			 * created if they haven't already been created.
4d476f
+			 */
4d476f
+			if (!me->mapent)
4d476f
+				goto next;
4d476f
+
4d476f
 			if (!strcmp(me->key, "*"))
4d476f
 				goto next;
4d476f