~ubuntu-branches/debian/sid/cron/sid

« back to all changes in this revision

Viewing changes to debian/patches/fixes/crontab-entry-parsing

  • Committer: Package Import Robot
  • Author(s): Javier Fernández-Sanguino Peña, Christian Kastner, brian m. carlson, Javier Fernández-Sanguino
  • Date: 2014-10-24 16:17:56 UTC
  • Revision ID: package-import@ubuntu.com-20141024161756-zrkzmim2z67a44u9
Tags: 3.0pl1-125
* Acknowledge NMUs. Thanks, Laurent Bigonville and Ansgar Burchardt.
  Closes: #749271

[ Christian Kastner ]
* debian/control:
  - Bump Standards-Version to 3.9.6 (no changes needed)
  - Canonicalize Vcs-* URLs
* debian/copyright:
  - Bump years
  - Don't use spaces in License short name
* debian/source/lintian-overrides:
  - Drop overrides from pre-UTF-8 debian/control era
* debian/rules:
  - Extend documentation
* debian/cron.init:
  - Include winbind in Should-Start/Stop. Closes: #732203
* crontab.5:
  - Don't use hyphen as a minus sign
* cron.8:
  - Drop stray words in cron.8. Thanks, Regid Ichira! Closes: #702091
  - Fix misspelled 'sytem'. Thanks, green! Closes: #753775
* cron.c,crontab.c:
  - Use basename of argv[0] as syslog tag. Closes: #752750
* cron.c:
   - Use case-insensitive comparison in charset selection. Thanks,
     Malcolm Scott! LP: #1169160
* entry.c:
  - Detect invalid entry: step specified without a range. Thanks,
    Justin T. Pryzby! Closes: #733478
  - Error out when a command field is too long instead of silently
    truncating it. Closes: #686223, LP: #826702
* do_command.c:
  - Fix initialization and increment of mailed bytes counter.
    Closes: #691488
* cron.c, do_command.c:
  - Add an option -n to include FQDN in mail subject. Closes: #570423

[ brian m. carlson ]
* config.h, do_command.c:
  - Send proper 8-bit emails by including an appropriate MIME-Version and
    adjusting the Content-Transfer-Encoding header accordingly.
    Closes: #694686

[ Javier Fernández-Sanguino ]
* Change systemd definition in order for the daemon to read an honor
  /etc/default/cron (Closes: #754279)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Subject: Fixes for crontab entry parsing
 
2
Last-Update: 2010-04-11
 
3
 
 
4
Handle bogues values, whitespace, ...
 
5
Index: patched/entry.c
 
6
===================================================================
 
7
--- patched.orig/entry.c        2010-05-06 18:18:25.803561007 +0200
 
8
+++ patched/entry.c     2010-05-06 18:18:26.422435960 +0200
 
9
@@ -218,6 +218,9 @@
 
10
                bit_set(e->dow, 7);
 
11
        }
 
12
 
 
13
+       /* If we used one of the @commands, we may be pointing at
 
14
+       blanks, and if we don't skip over them, we'll miss the user/command */  
 
15
+    Skip_Blanks(ch, file);
 
16
        /* ch is the first character of a command, or a username */
 
17
        unget_char(ch, file);
 
18
 
 
19
@@ -418,7 +421,7 @@
 
20
                 * sent as a 0 since there is no offset either.
 
21
                 */
 
22
                ch = get_number(&num3, 0, PPC_NULL, ch, file);
 
23
-               if (ch == EOF)
 
24
+               if (ch == EOF || num3 <= 0)
 
25
                        return EOF;
 
26
        } else {
 
27
                /* no step.  default==1.
 
28
@@ -468,6 +471,10 @@
 
29
        }
 
30
        *pc = '\0';
 
31
 
 
32
+        if (len == 0) {
 
33
+            return EOF;
 
34
+        }
 
35
+
 
36
        /* try to find the name in the name list
 
37
         */
 
38
        if (names) {