[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron has gone to UTC time?



On 30-Jan-99, 06:54 (GMT), "Mark W. Eichin" <eichin@thok.org> wrote: 
> I haven't seen the problem yet myself, but throw in an "env"
> too... I've noted (in a bug report in regard to inetd) that doing
> "apt-get upgrade" with sudo or su with a full *user* environment often
> means that you end up with an incorrect environment for daemons that
> get upgraded -- cron is vulnerable to the same bug, and probably
> amenable to a similar fix: use 
> 	env - TZ=$(cat /etc/timezone) PATH=/sbin start-stop-daemon ... cron
> instead of just using start-stop-daemon...

After looking at the source code, and playing around a little, I suspect
that this is the root of the problem. I hesitate to throw Mark's
proposed fix in at this point in slink, and it's more of a fragility
thing than a bug, and it's easily fixed (restart cron), but only if it's
noticed.

> One could argue that the sysadmin should know better; however, it's
> a mistake that people have been making since the 4.2BSD days (I've
> seen this with sendmail and $USER on charon.mit.edu when it was a VAX
> 11/750, and more recently on an otherwise well-managed Solaris box)
> that I think we should really (1) prevent the problem in the postinst
> scripts (2) document such...

It's a fairly weird mistake, as requires (on Debian, at least) that
sysadmin actively has TZ set incorrectly; merely having no TZ isn't a
problem, right?

Steve


Reply to: