Your message dated Sun, 27 Nov 2022 20:35:23 +0000
with message-id <[email protected]>
and subject line Bug#1019716: fixed in cron 3.0pl1-152
has caused the Debian Bug report #1019716,
regarding cron: does not check for timezone changes except during DST events or
init
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1019716: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019716
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cron
Version: 3.0pl1-137
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]
Dear Maintainer,
Please see the writeup for this bug at:
https://gist.github.com/stephanGarland/b7cdd963e0ac53ea42f8ed15e35b193d
In short, if the timezone for a system is changed while cron is running,
and the timezone change is _not_ due to a DST event, cron is unaware of
the change and will continue using the old `GMToff` value until it is
restarted.
While this seems like a bizarre edge case, and it is, it happened to me
via moving, booting up my server rack, realizing the timezone needed to
be modified, and then not restarting the server. I noticed afterwards
that a daily cronjob I have ran one hour late.
The supplied patch fixes this, although I am cognizant of the fact that
this may be intended behavior. I'm willing to modify it to include an
optional flag (default: false) to set this behavior.
-- Package-specific info:
--- EDITOR:
--- /usr/bin/editor:
/usr/bin/nvim
--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 43568 Feb 22 2021 /usr/bin/crontab
--- /var/spool/cron:
drwxr-xr-x 3 root root 4096 Dec 23 2021 /var/spool/cron
--- /var/spool/cron/crontabs:
drwx-wx--T 2 root crontab 4096 Sep 11 15:53 /var/spool/cron/crontabs
--- /etc/cron.d:
drwxr-xr-x 2 root root 4096 Sep 11 21:13 /etc/cron.d
--- /etc/cron.daily:
drwxr-xr-x 2 root root 4096 Sep 11 06:34 /etc/cron.daily
--- /etc/cron.hourly:
drwxr-xr-x 2 root root 4096 Dec 23 2021 /etc/cron.hourly
--- /etc/cron.monthly:
drwxr-xr-x 2 root root 4096 Dec 23 2021 /etc/cron.monthly
--- /etc/cron.weekly:
drwxr-xr-x 2 root root 4096 Dec 23 2021 /etc/cron.weekly
-- System Information:
Debian Release: 11.5
APT prefers stable
APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable'), (500,
'stable-updates'), (500, 'stable-security')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-16-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages cron depends on:
ii adduser 3.118
ii debianutils 4.11.2
ii init-system-helpers 1.60
ii libc6 2.31-13+deb11u4
ii libpam-runtime 1.4.0-9+deb11u1
ii libpam0g 1.4.0-9+deb11u1
ii libselinux1 3.1-3
ii lsb-base 11.1.0
ii sensible-utils 0.0.14
Versions of packages cron recommends:
pn default-mta | mail-transport-agent <none>
Versions of packages cron suggests:
pn anacron <none>
pn checksecurity <none>
ii logrotate 3.18.0-2+deb11u1
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
diff --git a/cron.c b/cron.c
index 613e7bf..7b0b69c 100644
--- a/cron.c
+++ b/cron.c
@@ -372,9 +372,9 @@ set_time(int initialize)
/* We adjust the time to GMT so we can catch DST changes. */
tm = *localtime(&StartTime);
+ GMToff = get_gmtoff(&StartTime, &tm);
if (initialize || tm.tm_isdst != isdst) {
isdst = tm.tm_isdst;
- GMToff = get_gmtoff(&StartTime, &tm);
Debug(DSCH, ("[%d] GMToff=%ld\n",
getpid(), (long)GMToff))
}
--- End Message ---
--- Begin Message ---
Source: cron
Source-Version: 3.0pl1-152
Done: Georges Khaznadar <[email protected]>
We believe that the bug you reported is fixed in the latest version of
cron, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Georges Khaznadar <[email protected]> (supplier of updated cron package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 27 Nov 2022 20:41:35 +0100
Source: cron
Architecture: source
Version: 3.0pl1-152
Distribution: unstable
Urgency: medium
Maintainer: Javier Fernández-Sanguino Peña <[email protected]>
Changed-By: Georges Khaznadar <[email protected]>
Closes: 1019716
Changes:
cron (3.0pl1-152) unstable; urgency=medium
.
* new patch debian/patches/fixes/Check_for_timezone_changes.patch:
check the timezone inconditionnaly. Closes: #1019716
Checksums-Sha1:
43876f69ad1baf47c2e22a0dca008362fc39cbbd 2100 cron_3.0pl1-152.dsc
037cbf1adcb5e3ba67e00173441c75477d1cf9d7 112540 cron_3.0pl1-152.debian.tar.xz
c9b6b88abe85d1d7357cc2f43dee0ffe3b480b43 6635 cron_3.0pl1-152_amd64.buildinfo
Checksums-Sha256:
8748c37f455c147223783f4391de358c92c1a49cdb608317db8cff88aa264e3a 2100
cron_3.0pl1-152.dsc
eec5f790c8afc10908b7dff47fe8d0d4f84e454400937612c0c6e3a7ddb7b3ca 112540
cron_3.0pl1-152.debian.tar.xz
5c6d091a650a6de02cac2aa629c59b345ef622e6e721111cbe48dc86b78b43ad 6635
cron_3.0pl1-152_amd64.buildinfo
Files:
9b093c40e837661471e6d4bb7f746e2b 2100 admin important cron_3.0pl1-152.dsc
fb6ce6ba4b168a4eeb1ae070338b79f7 112540 admin important
cron_3.0pl1-152.debian.tar.xz
dcbdf66dd0cb1980c47e9f7248ed966e 6635 admin important
cron_3.0pl1-152_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEM0CzZP9nFT+3zK6FHCgWkHE2rjkFAmODvigACgkQHCgWkHE2
rjlamA/+NPScUTe12BOSbK/Of+wJ2rbDvJ4jEYnkg7E60VOm6Xr7Dlfgb40GqlSI
8yZXoLpLmttJcCqAai+ht8cMYlR0l6DBfFcUxD8eIg8v0lPNPOAyh36VG8dQXAYt
zHbzdsPM9Hw75n6xupsp/mM4BW5GtgGWymwBtcApYDRNkljUAsGSyowK2b3csmB4
SE0tXic4yW6reC2eLZt3wQhLl5olD90tgV3kDFwf0dzBQ+KBECBH/0c/6blbHSA+
3HKanCygud1rcW+eT4owSXe2HLLBxtqXdECIMsF2yEpO/2ba9LOEDsh5yu8DWUyD
IZq7hNcy5qL9h4bjemLfO+t0EjEVbWfAnYB7Nd7sQYdzsxugpvkeB7q7y/XMCuTl
XXMGvnz0Rvt0KCmMBL+/1eyN3odi1NDfuEBJnVztUwIdg3aiok6VKIOuQtg6SZIn
pgwfmpu4zBBDxg846bqh2RH0qI9AKK4rzd9JWXTqj2IOFBMNA/StJmmpwyENHdHq
O5za1dCXj+tASDNc+keys6+KGtWXJqlRlbL5L8ffUg8sWxhwwSIErBw8nyqFzEaJ
MwKd78YVopIR0+rrqEMBhCGfJnUkd7egTdGz3Sl8ouoyVXTsmlxZOgjVqYwTqLtX
HFCJC84jnB/WTcxd0SQ6AGaD7fCr3bKWAPioeJQVleusHEDWHkM=
=Xo6u
-----END PGP SIGNATURE-----
--- End Message ---