Blame SOURCES/autofs-5.0.7-fix-fix-map-entry-duplicate-offset-detection.patch

304803
autofs-5.0.7 - fix fix map entry duplicate offset detection
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
Map entry duplicate detection was still broken.
304803
This hopefully will fix it, at least the Conectathon duplicate offset entry
304803
tests pass now.
304803
---
304803
 CHANGELOG   |    1 +
304803
 lib/cache.c |    2 +-
304803
 2 files changed, 2 insertions(+), 1 deletion(-)
304803
304803
diff --git a/CHANGELOG b/CHANGELOG
304803
index e15aa1f..39d7889 100644
304803
--- a/CHANGELOG
304803
+++ b/CHANGELOG
304803
@@ -47,6 +47,7 @@
304803
 - dont probe rdma mounts.
304803
 - fix master map mount options matching.
304803
 - fix master map bogus keywork match.
304803
+- fix fix map entry duplicate offset detection.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
diff --git a/lib/cache.c b/lib/cache.c
304803
index 1e05a99..ecace4a 100644
304803
--- a/lib/cache.c
304803
+++ b/lib/cache.c
304803
@@ -659,7 +659,7 @@ int cache_update_offset(struct mapent_cache *mc, const char *mkey, const char *k
304803
 
304803
 	me = cache_lookup_distinct(mc, key);
304803
 	if (me && me->age == age) {
304803
-		if (me->multi == owner)
304803
+		if (me == owner || strcmp(me->key, key) == 0)
304803
 			return CHE_DUPLICATE;
304803
 	}
304803