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

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