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

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