Package: cron
Version: 3.0pl1-127+deb8u1
Severity: normal

Dear Maintainer,

Cron has a very old bug about the way it processes asterisks in dom and dow
fields. The bug is confimed by Paul Vixie and should not be fixed. However,
it needs to be documented in crontab (5). A patch is attached.

Details: https://treats.wdt.io/cron-bug.html


-- Package-specific info:
--- EDITOR:


--- /usr/bin/editor:
/bin/nano

--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 36008 Jun 11  2015 /usr/bin/crontab

--- /var/spool/cron:
drwxr-xr-x 5 root root 4096 Oct  5 15:17 /var/spool/cron

--- /var/spool/cron/crontabs:
drwx-wx--T 2 root crontab 4096 Jun 11  2015 /var/spool/cron/crontabs

--- /etc/cron.d:
drwxr-xr-x 2 root root 4096 Oct  5 15:14 /etc/cron.d

--- /etc/cron.daily:
drwxr-xr-x 2 root root 4096 Oct  5 15:18 /etc/cron.daily

--- /etc/cron.hourly:
drwxr-xr-x 2 root root 4096 Oct  5 15:14 /etc/cron.hourly

--- /etc/cron.monthly:
drwxr-xr-x 2 root root 4096 Oct  5 15:14 /etc/cron.monthly

--- /etc/cron.weekly:
drwxr-xr-x 2 root root 4096 Oct  5 15:14 /etc/cron.weekly



*** /tmp/crontab.5.patch
--- crontab.5.orig      2016-10-12 23:15:33.000000000 -0600
+++ crontab.5   2016-10-12 23:20:06.000000000 -0600
@@ -200,7 +200,7 @@
 .PP
 Note: The day of a command's execution can be specified by two
 fields \(em day of month, and day of week.  If both fields are
-restricted (i.e., aren't *), the command will be run when
+restricted (i.e., don't start with *), the command will be run when
 .I either
 field matches the current time.  For example,
 .br
@@ -259,7 +259,9 @@
 # run at 10 pm on weekdays, annoy Joe
 0 22 * * 1-5    mail \-s "It's 10pm" joe%Joe,%%Where are your kids?%
 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
-5 4 * * sun     echo "run at 5 after 4 every sunday"
+5 4 * * sun     echo "run at 5 after 4 every Sunday"
+0 */4 1 * mon   echo "run every 4th hour on the 1st and on every Monday"
+0 0 */2 * sun   echo "run at midn on every Sunday that's an uneven date"
 # Run on every second Saturday of the month
 0 4 8-14 * *    test $(date +\\%u) \-eq 6 && echo "2nd Saturday"
 .fi
@@ -320,6 +322,15 @@
 this will affect only the commands executed in the crontab, not the execution
 of the crontab tasks themselves.
 
+POSIX specifies that the day of month and the day of week fields both need to
+match the current time if either of them
+.I is
+a *. However, this implementation only checks if the
+.I first character
+is a *. This is why "0 0 */2 * sun" runs every Sunday that's an
+uneven date while the POSIX standard would have it run every Sunday and on
+every uneven date.
+
 The 
 .I crontab
 syntax does not make it possible to define all possible periods one could 
@@ -354,4 +365,5 @@
 Paul Vixie <p...@vix.com> is the author of 
 .I cron
 and original creator of this manual page. This page has also been modified for
-Debian by Steve Greenland, Javier Fernandez-Sanguino and Christian Kastner.
\ No newline at end of file
+Debian by Steve Greenland, Javier Fernandez-Sanguino, Christian Kastner and
+Christian Pekeler.
\ No newline at end of file


-- System Information:
Debian Release: 8.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cron depends on:
ii  adduser              3.113+nmu3
ii  debianutils          4.4+b1
ii  dpkg                 1.17.27
ii  init-system-helpers  1.22
ii  libc6                2.19-18+deb8u6
ii  libpam-runtime       1.1.8-3.1+deb8u1
ii  libpam0g             1.1.8-3.1+deb8u1+b1
ii  libselinux1          2.3-2
ii  lsb-base             4.1+Debian13+nmu1

Versions of packages cron recommends:
ii  exim4                                      4.84.2-2+deb8u1
ii  exim4-daemon-light [mail-transport-agent]  4.84.2-2+deb8u1

Versions of packages cron suggests:
pn  anacron        <none>
pn  checksecurity  <none>
ii  logrotate      3.8.7-1+b1

Versions of packages cron is related to:
pn  libnss-ldap   <none>
pn  libnss-ldapd  <none>
pn  libpam-ldap   <none>
pn  libpam-mount  <none>
pn  nis           <none>
pn  nscd          <none>

-- no debconf information

Reply via email to