autofs/autofs-5.0.4-fix-map-type-info-parse-error.patch
Ian Kent 5d76ad9186 - fix incorrect dclist free.
- srv lookup handle endianness.
- fix bug introduced by library reload changes which causes autofs to not
    release mount thread resources when using submounts.
- fix notify mount message path.
- try harder to work out if we created mount point at remount.
- fix double free in do_sasl_bind().
- manual umount recovery fixes.
- fix map type info parse error.
2009-06-12 09:06:15 +00:00

52 lines
1.2 KiB
Diff

autofs-5.0.4 - fix map type info parse error
From: Ian Kent <raven@themaw.net>
Fix a mistake in map type info parsing introduced by the IPv6 parse
changes.
---
CHANGELOG | 1 +
lib/parse_subs.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 05e0206..3fd97d3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -55,6 +55,7 @@
- remount we created mount point fix.
- fix double free in sasl_bind().
- mannual umount recovery fixes.
+- fix map type info parse error.
4/11/2008 autofs-5.0.4
-----------------------
diff --git a/lib/parse_subs.c b/lib/parse_subs.c
index 0cba95a..0608cb7 100644
--- a/lib/parse_subs.c
+++ b/lib/parse_subs.c
@@ -315,6 +315,7 @@ struct map_type_info *parse_map_type_info(const char *str)
{
struct map_type_info *info;
char *buf, *type, *fmt, *map, *tmp;
+ int seen_colon = 0;
buf = strdup(str);
if (!buf)
@@ -335,11 +336,12 @@ struct map_type_info *parse_map_type_info(const char *str)
if (*tmp == ' ') {
*tmp = '\0';
break;
- } else if (*tmp == ',') {
+ } else if (!seen_colon && *tmp == ',') {
type = buf;
*tmp++ = '\0';
fmt = tmp;
} else if (*tmp == ':') {
+ seen_colon = 1;
if (!fmt)
type = buf;
*tmp++ = '\0';