autofs-5.0.4 - fix map type info parse error From: Ian Kent 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';