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

« back to all changes in this revision

Viewing changes to debian/patches/01UPSTREAM_autofs-5.0.3-map-type-in-map-name.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jan Christoph Nordholz
  • Date: 2008-04-28 15:55:37 UTC
  • Revision ID: james.westby@ubuntu.com-20080428155537-6rr98jw7khwdeuqo
Tags: 5.0.3-1
* Upload to unstable.
* New upstream version 5.0.3 plus current patchset (as of 2008/04/27).
* Bump Standards to 3.7.3, debhelper to v6.
* Add build-dependency on libxml2-dev.

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.3-map-type-in-map-name.patch
 
3
## DP: Supplied by upstream.
 
4
 
 
5
@DPATCH@
 
6
 
 
7
diff --git a/CHANGELOG b/CHANGELOG
 
8
index af5a1b0..76f2477 100644
 
9
--- a/CHANGELOG
 
10
+++ b/CHANGELOG
 
11
@@ -12,6 +12,7 @@
 
12
 - update fix expire working harder than needed.
 
13
 - add missing check for zero length NIS key (Wengang Wang).
 
14
 - init SASL callbacks on every ldap lookup library load.
 
15
+- fix incorrect match of map type name when included in map name.
 
16
  
 
17
 14/01/2008 autofs-5.0.3
 
18
 -----------------------
 
19
diff --git a/lib/master_tok.l b/lib/master_tok.l
 
20
index b379940..4bbe033 100644
 
21
--- a/lib/master_tok.l
 
22
+++ b/lib/master_tok.l
 
23
@@ -77,6 +77,7 @@ int my_yyinput(char *, int);
 
24
 char buff[1024];
 
25
 char *bptr;
 
26
 char *optr = buff;
 
27
+unsigned int tlen;
 
28
 
 
29
 %}
 
30
 
 
31
@@ -190,13 +191,27 @@ OPTNTOUT  (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo
 
32
        {OPTWS}\\\n{OPTWS} {}
 
33
 
 
34
        {MULTI} {
 
35
-               strcpy(master_lval.strtype, master_text);
 
36
-               return(MULTITYPE);
 
37
+               tlen = master_leng - 1;
 
38
+               if (bptr != buff && isblank(master_text[tlen])) {
 
39
+                       strncat(buff, master_text, tlen);
 
40
+                       bptr += tlen;
 
41
+                       yyless(tlen);
 
42
+               } else {
 
43
+                       strcpy(master_lval.strtype, master_text);
 
44
+                       return(MULTITYPE);
 
45
+               }
 
46
        }
 
47
 
 
48
        {MTYPE} {
 
49
-               strcpy(master_lval.strtype, master_text);
 
50
-               return(MAPTYPE);
 
51
+               tlen = master_leng - 1;
 
52
+               if (bptr != buff && isblank(master_text[tlen])) {
 
53
+                       strncat(buff, master_text, tlen);
 
54
+                       bptr += tlen;
 
55
+                       yyless(tlen);
 
56
+               } else {
 
57
+                       strcpy(master_lval.strtype, master_text);
 
58
+                       return(MAPTYPE);
 
59
+               }
 
60
        }
 
61
 
 
62
        {MULTISEP} { return(DDASH); }
 
63
@@ -226,7 +241,7 @@ OPTNTOUT    (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo
 
64
                yyless(0);
 
65
        }
 
66
 
 
67
-       {DNSERVERSTR} {
 
68
+       {DNSERVERSTR}{DNATTRSTR} {
 
69
                BEGIN(DNSTR);
 
70
                yyless(0);
 
71
        }