|
|
e1fdca |
autofs-5.1.6 - fix trailing dollar sun entry expansion
|
|
|
e1fdca |
|
|
|
e1fdca |
From: Ian Kent <raven@themaw.net>
|
|
|
e1fdca |
|
|
|
e1fdca |
In modules/parse_sun.c:expandsunent() if we see "$ " or "$<NULL>" in a
|
|
|
e1fdca |
the entry it can't be a macro, and the value can't be quoted since '\'
|
|
|
e1fdca |
and '"' cases are handled seperately in the swicth, so treat the
|
|
|
e1fdca |
character as a valid entry character.
|
|
|
e1fdca |
|
|
|
e1fdca |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
e1fdca |
---
|
|
|
e1fdca |
CHANGELOG | 1 +
|
|
|
e1fdca |
modules/parse_sun.c | 12 ++++++++++++
|
|
|
e1fdca |
2 files changed, 13 insertions(+)
|
|
|
e1fdca |
|
|
|
e1fdca |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
e1fdca |
+++ autofs-5.0.7/CHANGELOG
|
|
|
e1fdca |
@@ -351,6 +351,7 @@
|
|
|
e1fdca |
- use local getmntent_r() in tree_make_mnt_list().
|
|
|
e1fdca |
- fix missing initialization of autofs_point flags.
|
|
|
e1fdca |
- also use strictexpire for offsets.
|
|
|
e1fdca |
+- fix trailing dollar sun entry expansion.
|
|
|
e1fdca |
|
|
|
e1fdca |
25/07/2012 autofs-5.0.7
|
|
|
e1fdca |
=======================
|
|
|
e1fdca |
--- autofs-5.0.7.orig/modules/parse_sun.c
|
|
|
e1fdca |
+++ autofs-5.0.7/modules/parse_sun.c
|
|
|
e1fdca |
@@ -161,6 +161,18 @@ int expandsunent(const char *src, char *
|
|
|
e1fdca |
}
|
|
|
e1fdca |
src = p + 1;
|
|
|
e1fdca |
} else {
|
|
|
e1fdca |
+ /* If the '$' is folloed by a space or NULL it
|
|
|
e1fdca |
+ * can't be a macro, and the value can't be
|
|
|
e1fdca |
+ * quoted since '\' and '"' cases are handled
|
|
|
e1fdca |
+ * in other cases, so treat the $ as a valid
|
|
|
e1fdca |
+ * map entry character.
|
|
|
e1fdca |
+ */
|
|
|
e1fdca |
+ if (*src == ' ' || !*src) {
|
|
|
e1fdca |
+ if (dst)
|
|
|
e1fdca |
+ *dst++ = ch;
|
|
|
e1fdca |
+ len++;
|
|
|
e1fdca |
+ break;
|
|
|
e1fdca |
+ }
|
|
|
e1fdca |
p = src;
|
|
|
e1fdca |
while (isalnum(*p) || *p == '_')
|
|
|
e1fdca |
p++;
|