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

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