]> git.pld-linux.org Git - packages/autofs.git/blame - autofs-5.0.2-quote-exports-fix.patch
- rel.1, lets try
[packages/autofs.git] / autofs-5.0.2-quote-exports-fix.patch
CommitLineData
3d551623
PG
1diff --git a/CHANGELOG b/CHANGELOG
2index c29d577..c486a7b 100644
3--- a/CHANGELOG
4+++ b/CHANGELOG
5@@ -52,6 +52,7 @@
6 - fix LDAP_URI server selection.
7 - add authentication option for using an external credential cache.
8 - expand support for the "%" hack.
9+- fix to quoting for exports gathered by hosts map.
10
11 18/06/2007 autofs-5.0.2
12 -----------------------
13diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c
14index 1ef420e..70b13a7 100644
15--- a/modules/lookup_hosts.c
16+++ b/modules/lookup_hosts.c
17@@ -179,9 +179,14 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
18 if (*name == '/') {
19 pthread_cleanup_push(cache_lock_cleanup, mc);
20 mapent_len = strlen(me->mapent);
21- mapent = alloca(mapent_len + 1);
22- if (mapent)
23- strcpy(mapent, me->mapent);
24+ mapent = alloca(mapent_len + 3);
25+ if (mapent) {
26+ /* Add quotes to keep the parser happy */
27+ mapent[0] = '"';
28+ strcpy(mapent + 1, me->mapent);
29+ mapent[mapent_len + 1] = '"';
30+ mapent[mapent_len + 2] = '\0';
31+ }
32 pthread_cleanup_pop(0);
33 }
34 cache_unlock(mc);
This page took 0.157859 seconds and 4 git commands to generate.