~ubuntu-branches/ubuntu/precise/logrotate/precise

« back to all changes in this revision

Viewing changes to debian/patches/parser571033.patch

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-07-14 19:34:54 UTC
  • mfrom: (4.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100714193454-ihz13w539ca2jz18
Tags: 3.7.8-6ubuntu1
* Merge from debian unstable (LP: #554823), remaining changes:
  - debian/control: Drop mailx to Suggests for Ubuntu; it's only used
    on request, and we don'c configure an MTA by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: logrotate-3.7.8/config.c
 
2
===================================================================
 
3
--- logrotate-3.7.8.orig/config.c       2010-03-16 09:34:08.254007417 +0000
 
4
+++ logrotate-3.7.8/config.c    2010-03-16 09:42:32.434009264 +0000
 
5
@@ -574,9 +574,34 @@
 
6
                            configFile, lineNum);
 
7
                    return 1;
 
8
                } else if (*start == '\n') {
 
9
-                   lineNum++;
 
10
+                   while (isspace(*start) && (*start)) {
 
11
+                       if (*start == '\n')
 
12
+                           lineNum++;
 
13
+                       start++;
 
14
+                   }
 
15
+               } else if (
 
16
+                   (strncmp(start, "postrotate", 10) == 0) ||
 
17
+                   (strncmp(start, "prerotate", 9) == 0) ||
 
18
+                   (strncmp(start, "firstrotate", 11) == 0) ||
 
19
+                   (strncmp(start, "lastrotate", 10) == 0)
 
20
+                   )
 
21
+               {
 
22
+                   while (*start) {
 
23
+                       while ((*start != '\n') && (*start))
 
24
+                           start++;
 
25
+                       while (isspace(*start) && (*start)) {
 
26
+                           if (*start == '\n')
 
27
+                               lineNum++;
 
28
+                           start++;
 
29
+                       }
 
30
+                       if (strncmp(start, "endscript", 9) == 0) {
 
31
+                           start += 9;
 
32
+                           break;
 
33
+                       }
 
34
+                   }
 
35
+               } else {
 
36
+                   start++;
 
37
                }
 
38
-               start++;
 
39
            }
 
40
            start++;
 
41