]>
Commit | Line | Data |
---|---|---|
e5fd101c PS |
1 | autofs-5.0.4 - fix map type info parse error |
2 | ||
3 | From: Ian Kent <raven@themaw.net> | |
4 | ||
5 | Fix a mistake in map type info parsing introduced by the IPv6 parse | |
6 | changes. | |
7 | --- | |
8 | ||
9 | CHANGELOG | 1 + | |
10 | lib/parse_subs.c | 4 +++- | |
11 | 2 files changed, 4 insertions(+), 1 deletions(-) | |
12 | ||
13 | ||
14 | diff --git a/CHANGELOG b/CHANGELOG | |
15 | index 05e0206..3fd97d3 100644 | |
16 | --- a/CHANGELOG | |
17 | +++ b/CHANGELOG | |
18 | @@ -55,6 +55,7 @@ | |
19 | - remount we created mount point fix. | |
20 | - fix double free in sasl_bind(). | |
21 | - mannual umount recovery fixes. | |
22 | +- fix map type info parse error. | |
23 | ||
24 | 4/11/2008 autofs-5.0.4 | |
25 | ----------------------- | |
26 | diff --git a/lib/parse_subs.c b/lib/parse_subs.c | |
27 | index 0cba95a..0608cb7 100644 | |
28 | --- a/lib/parse_subs.c | |
29 | +++ b/lib/parse_subs.c | |
30 | @@ -315,6 +315,7 @@ struct map_type_info *parse_map_type_info(const char *str) | |
31 | { | |
32 | struct map_type_info *info; | |
33 | char *buf, *type, *fmt, *map, *tmp; | |
34 | + int seen_colon = 0; | |
35 | ||
36 | buf = strdup(str); | |
37 | if (!buf) | |
38 | @@ -335,11 +336,12 @@ struct map_type_info *parse_map_type_info(const char *str) | |
39 | if (*tmp == ' ') { | |
40 | *tmp = '\0'; | |
41 | break; | |
42 | - } else if (*tmp == ',') { | |
43 | + } else if (!seen_colon && *tmp == ',') { | |
44 | type = buf; | |
45 | *tmp++ = '\0'; | |
46 | fmt = tmp; | |
47 | } else if (*tmp == ':') { | |
48 | + seen_colon = 1; | |
49 | if (!fmt) | |
50 | type = buf; | |
51 | *tmp++ = '\0'; |