diff --git a/CHANGELOG b/CHANGELOG
index c29d577..c486a7b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -52,6 +52,7 @@
 - fix LDAP_URI server selection.
 - add authentication option for using an external credential cache.
 - expand support for the "%" hack.
+- fix to quoting for exports gathered by hosts map.
 
 18/06/2007 autofs-5.0.2
 -----------------------
diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c
index 1ef420e..70b13a7 100644
--- a/modules/lookup_hosts.c
+++ b/modules/lookup_hosts.c
@@ -179,9 +179,14 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
 	if (*name == '/') {
 		pthread_cleanup_push(cache_lock_cleanup, mc);
 		mapent_len = strlen(me->mapent);
-		mapent = alloca(mapent_len + 1);
-		if (mapent)
-			strcpy(mapent, me->mapent);
+		mapent = alloca(mapent_len + 3);
+		if (mapent) {
+			/* Add quotes to keep the parser happy */
+			mapent[0] = '"';
+			strcpy(mapent + 1, me->mapent);
+			mapent[mapent_len + 1] = '"';
+			mapent[mapent_len + 2] = '\0';
+		}
 		pthread_cleanup_pop(0);
 	}
 	cache_unlock(mc);