1
autofs-5.0.5 - fix isspace() wild card substition
3
From: Ian Kent <raven@themaw.net>
5
If there are characters that match isspace() (such as \t, \n, etc.) in a
6
passed map entry key and there is no space in the key these characters
7
won't be properly preserved, leading to failed or incorrect mounts.
9
This is caused by an incorrect attempt at optimization, using a check
10
to see if a space is present in the passed key and only then processing
11
each character of the key individually, escaping any isspace() characters.
15
modules/parse_sun.c | 40 +++++++++++++++++-----------------------
16
2 files changed, 18 insertions(+), 23 deletions(-)
19
diff --git a/CHANGELOG b/CHANGELOG
20
index c98204d..72590f7 100644
24
- fix add simple bind auth.
25
- add option to dump configured automount maps.
26
- use weight only for server selection.
27
+- fix isspace() wild card substition.
29
03/09/2009 autofs-5.0.5
30
-----------------------
31
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
32
index 4bddcc9..3242e3b 100644
33
--- a/modules/parse_sun.c
34
+++ b/modules/parse_sun.c
35
@@ -161,30 +161,24 @@ int expandsunent(const char *src, char *dst, const char *key,
39
- * In order to ensure that any spaces in the key
40
- * re preserved, we need to escape them here.
41
+ * In order to ensure that any isspace() characters
42
+ * in the key are preserved, we need to escape them
45
- if (strchr(key, ' ')) {
46
- const char *keyp = key;
48
- if (isspace(*keyp)) {
66
+ const char *keyp = key;
68
+ if (isspace(*keyp)) {