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

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