1 diff --git a/CHANGELOG b/CHANGELOG
2 index 2ce58b4..903e619 100644
6 - change random multiple server selection option name to be consistent
7 with existing downstream version 4 naming.
8 - fix mount point directory creation for bind mounts.
9 +- add quoting for exports gathered by hosts map.
11 18/06/2007 autofs-5.0.2
12 -----------------------
13 diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c
14 index a9a4c75..1f8fa15 100644
15 --- a/modules/lookup_hosts.c
16 +++ b/modules/lookup_hosts.c
17 @@ -215,7 +215,7 @@ done:
19 int len = strlen(mapent) + 1;
21 - len += strlen(name) + 2*strlen(exp->ex_dir) + 3;
22 + len += strlen(name) + 2*(strlen(exp->ex_dir) + 2) + 3;
23 mapent = realloc(mapent, len);
26 @@ -224,10 +224,11 @@ done:
27 rpc_exports_free(exp);
28 return NSS_STATUS_UNAVAIL;
30 - strcat(mapent, " ");
31 + strcat(mapent, " \"");
32 strcat(mapent, exp->ex_dir);
33 + strcat(mapent, "\"");
35 - int len = 2*strlen(exp->ex_dir) + strlen(name) + 3;
36 + int len = 2*(strlen(exp->ex_dir) + 2) + strlen(name) + 3;
40 @@ -237,12 +238,15 @@ done:
41 rpc_exports_free(exp);
42 return NSS_STATUS_UNAVAIL;
44 - strcpy(mapent, exp->ex_dir);
45 + strcpy(mapent, "\"");
46 + strcat(mapent, exp->ex_dir);
47 + strcat(mapent, "\"");
49 - strcat(mapent, " ");
50 + strcat(mapent, " \"");
53 strcat(mapent, exp->ex_dir);
54 + strcat(mapent, "\"");
58 @@ -260,13 +264,9 @@ done:
59 cache_update(mc, source, name, mapent, now);
62 - debug(LOGOPT_ANY, "source wait");
64 master_source_current_wait(ap->entry);
65 ap->entry->current = source;
67 - debug(LOGOPT_ANY, "do parse_mount");
69 ret = ctxt->parse->parse_mount(ap, name, name_len,
70 mapent, ctxt->parse->context);