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

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