~ubuntu-branches/ubuntu/raring/autofs5/raring

« back to all changes in this revision

Viewing changes to debian/patches/01UPSTREAM_autofs-5.0.4-fix-map-type-info-parse-error.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Jan Christoph Nordholz
  • Date: 2009-08-28 21:24:14 UTC
  • mfrom: (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090828212414-z9xvmo5kdpm26vxv
Tags: 5.0.4-3
* Fix LSB initscript header to use keywords that
  insserv knows about. Closes: #541841.
* Bump Standards version to 3.8.3.
  * Add README.source.

* Upload sponsored by Petter Reinholdtsen.

Show diffs side-by-side

added added

removed removed

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