metropolis/rpc: fix race condition

This hands off a copy of the curator map across a channel instead of the
mutable map itself.

Change-Id: Ib7f4ed795648517ae19938c52a6cb193f293ac8b
Reviewed-on: https://review.monogon.dev/c/monogon/+/1827
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/node/core/rpc/resolver/processor.go b/metropolis/node/core/rpc/resolver/processor.go
index cc95896..c281e57 100644
--- a/metropolis/node/core/rpc/resolver/processor.go
+++ b/metropolis/node/core/rpc/resolver/processor.go
@@ -131,7 +131,7 @@
 		switch {
 		case req.cmg != nil:
 			// Curator Map Get
-			req.cmg.resC <- curMap
+			req.cmg.resC <- curMap.copy()
 		case req.nu != nil:
 			// Nodes Update
 			for nid, status := range req.nu.nodes {