[PATCH] Use consistent timezone in logs

John Wright john.wright at hp.com
Thu Apr 8 00:47:17 UTC 2010


Before chroot()ing, if the TZ environment variable isn't set, proftpd
will set it to the first element of the tzname global variable, which
represents the non-DST timezone.  So during DST, all logs after the
variable change will be have incorrect timestamps.  Unfortunately, while
it's easy to determine whether DST is in effect, and to get the name of
that timezone, glibc doesn't actually recognize it as a valid timezone.
But on Debian systems, we can just set the TZ environment variable to
:/etc/localtime to solve the problem.
---
 debian/templates/proftpd.conf |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/debian/templates/proftpd.conf b/debian/templates/proftpd.conf
index 12137f5..2cd0989 100644
--- a/debian/templates/proftpd.conf
+++ b/debian/templates/proftpd.conf
@@ -85,6 +85,12 @@ AllowOverwrite			on
 #
 # UseSendFile			off
 
+# In order to keep log file dates consistent after chroot, use timezone info
+# from /etc/localtime.  If this is not set, and proftpd is configured to
+# chroot (e.g. DefaultRoot or <Anonymous>), it will use the non-daylight
+# savings timezone regardless of whether DST is in effect.
+SetEnv TZ :/etc/localtime
+
 TransferLog /var/log/proftpd/xferlog
 SystemLog   /var/log/proftpd/proftpd.log
 
-- 
1.6.6


--5mCyUwZo2JvN/JJP--



------------=_1297769947-31352-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 576888-close) by bugs.debian.org; 15 Feb 2011 11:36:07 +0000
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on busoni.debian.org
X-Spam-Level: 
X-Spam-Bayes: score:0.0000 Tokens: new, 11; hammy, 151; neutral, 225; spammy,
	0. spammytokens: hammytokens:0.000-+--HX-Debian:DAK,
	0.000-+--H*rp:D*ftp-master.debian.org, 0.000-+--HX-DAK:process-upload,
	0.000-+--H*MI:franck, 0.000-+--H*RU:128.148.34.3
X-Spam-Status: No, score=-13.3 required=4.0 tests=AWL,BAYES_00,FOURLA,
	FROMDEVELOPER,FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,IMPRONONCABLE_2,MDO_DATING2,
	MURPHY_DRUGS_REL8,MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,PGPSIGNATURE
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Return-path: <envelope at ftp-master.debian.org>
Received: from franck.debian.org ([128.148.34.3])
	from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=franck.debian.org,EMAIL=hostmaster at franck.debian.org (verified)
	by busoni.debian.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1PpJCR-0007zy-GL
	for 576888-close at bugs.debian.org; Tue, 15 Feb 2011 11:36:07 +0000
Received: from dak by franck.debian.org with local (Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1PpJCN-0000mZ-5s; Tue, 15 Feb 2011 11:36:03 +0000
From: Francesco Paolo Lovergine <frankie at debian.org>
To: 576888-close at bugs.debian.org
X-DAK: dak process-upload
X-Debian: DAK
X-Debian-Package: proftpd-dfsg
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Subject: Bug#576888: fixed in proftpd-dfsg 1.3.3d-3
Message-Id: <E1PpJCN-0000mZ-5s at franck.debian.org>
Sender: Archive Administrator <dak at franck.debian.org>
Date: Tue, 15 Feb 2011 11:36:03 +0000
X-CrossAssassin-Score: 3

Source: proftpd-dfsg
Source-Version: 1.3.3d-3

We believe that the bug you reported is fixed in the latest version of
proftpd-dfsg, which is due to be installed in the Debian FTP archive:

proftpd-basic_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-basic_1.3.3d-3_i386.deb
proftpd-dev_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-dev_1.3.3d-3_i386.deb
proftpd-dfsg_1.3.3d-3.debian.tar.gz
  to main/p/proftpd-dfsg/proftpd-dfsg_1.3.3d-3.debian.tar.gz
proftpd-dfsg_1.3.3d-3.dsc
  to main/p/proftpd-dfsg/proftpd-dfsg_1.3.3d-3.dsc
proftpd-doc_1.3.3d-3_all.deb
  to main/p/proftpd-dfsg/proftpd-doc_1.3.3d-3_all.deb
proftpd-mod-ldap_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-mod-ldap_1.3.3d-3_i386.deb
proftpd-mod-mysql_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-mod-mysql_1.3.3d-3_i386.deb
proftpd-mod-odbc_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-mod-odbc_1.3.3d-3_i386.deb
proftpd-mod-pgsql_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-mod-pgsql_1.3.3d-3_i386.deb
proftpd-mod-sqlite_1.3.3d-3_i386.deb
  to main/p/proftpd-dfsg/proftpd-mod-sqlite_1.3.3d-3_i386.deb



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 576888 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Francesco Paolo Lovergine <frankie at debian.org> (supplier of updated proftpd-dfsg 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 ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 15 Feb 2011 12:16:48 +0100
Source: proftpd-dfsg
Binary: proftpd-basic proftpd-dev proftpd-doc proftpd-mod-mysql proftpd-mod-pgsql proftpd-mod-ldap proftpd-mod-odbc proftpd-mod-sqlite
Architecture: source i386 all
Version: 1.3.3d-3
Distribution: unstable
Urgency: low
Maintainer: ProFTPD Maintainance Team <pkg-proftpd-maintainers at lists.alioth.debian.org>
Changed-By: Francesco Paolo Lovergine <frankie at debian.org>
Description: 
 proftpd-basic - Versatile, virtual-hosting FTP daemon - binaries
 proftpd-dev - Versatile, virtual-hosting FTP daemon - development files
 proftpd-doc - Versatile, virtual-hosting FTP daemon - documentation
 proftpd-mod-ldap - Versatile, virtual-hosting FTP daemon - LDAP module
 proftpd-mod-mysql - Versatile, virtual-hosting FTP daemon - MySQL module
 proftpd-mod-odbc - Versatile, virtual-hosting FTP daemon - ODBC module
 proftpd-mod-pgsql - Versatile, virtual-hosting FTP daemon - PostgreSQL module
 proftpd-mod-sqlite - Versatile, virtual-hosting FTP daemon - SQLite3 module
Closes: 576888 599862 605781
Changes: 
 proftpd-dfsg (1.3.3d-3) unstable; urgency=low
 .
   * NOT YET RELEASED.
   * Updated danish template.
     (closes: #599862)
   * Now grep uses --silet to avoid warning at /etc/inetd.conf parsing.
     (closes: #605781)
   * Added commented TZ explicit set in proftpd.conf template. Thanks John Wright.
     (closes: #576888)
   * [PATCH] prxs.in fixed to avoid using the shell to call libtool, which
     prevents prxs working correctly with any shell.
Checksums-Sha1: 
 8c7942d09e02a6f783681ab49d1cd4fa5aafb7c1 1625 proftpd-dfsg_1.3.3d-3.dsc
 9c79b6ec4a11f083638f1b20438b578272a47df5 100239 proftpd-dfsg_1.3.3d-3.debian.tar.gz
 b9c5b88eff91256e6f3059dc42745f428e03abae 2347796 proftpd-basic_1.3.3d-3_i386.deb
 e38250ca9b0419eea5dbff24377c984b402a9306 846998 proftpd-dev_1.3.3d-3_i386.deb
 786691e583959090b670c891223d4dc463496ae8 361278 proftpd-mod-mysql_1.3.3d-3_i386.deb
 f8da14fd0a8164ce2e1bcf18777a7abd9a52606c 361074 proftpd-mod-pgsql_1.3.3d-3_i386.deb
 6bac5e5cda84d61b33efe500d8049cf38e289d37 369790 proftpd-mod-ldap_1.3.3d-3_i386.deb
 8678f80fed9d41ce58175a5d68ba5705274f8df7 362702 proftpd-mod-odbc_1.3.3d-3_i386.deb
 8a6079b62144dad6ff9a39e5493bc04f3d64e519 360470 proftpd-mod-sqlite_1.3.3d-3_i386.deb
 c824bca50d024cb8e4ecd6f1f039684bba49f462 1525152 proftpd-doc_1.3.3d-3_all.deb
Checksums-Sha256: 
 3dfb2cc9e4cdc4cfad09d4f54063bcc4da7870b66d69319d3ff5ff035d18086c 1625 proftpd-dfsg_1.3.3d-3.dsc
 ad50596bf465e72fdb75e8b88c8fa4de7c0b908dddb9e07b4926e12ec8178d07 100239 proftpd-dfsg_1.3.3d-3.debian.tar.gz
 86f1be24b970f7bfd66473048593fff65ead36366ccb4b15dba64d7091fb400f 2347796 proftpd-basic_1.3.3d-3_i386.deb
 2e294639210e36916bbf050a6b258d1f4d60feae78f8d1881a30b7856bafd526 846998 proftpd-dev_1.3.3d-3_i386.deb
 109b6b5c146a204aa01faf3419b726eea1277582aa96feb2a430e837330bf780 361278 proftpd-mod-mysql_1.3.3d-3_i386.deb
 072c97f82bffbb85fefeea1d188eeb0851ef51ffb07d1988eb683dc66fb1cd18 361074 proftpd-mod-pgsql_1.3.3d-3_i386.deb
 f40a66b623b0b38f64f89d6b7df954e5ad5839dcd25491c7236621481503565a 369790 proftpd-mod-ldap_1.3.3d-3_i386.deb
 ce6fc2bb96903f127a7b87455c7d64117ee475dfe7a9e87a73f8dd37cf14d1b7 362702 proftpd-mod-odbc_1.3.3d-3_i386.deb
 5637b91c4fd75b753ef7c1cbd32d9d2cdda963dc63298c8bfc045f8ca98137d3 360470 proftpd-mod-sqlite_1.3.3d-3_i386.deb
 31ce62602c0b5151dfea043dbee37be05d015d41420ed0c6e9ada891254c9853 1525152 proftpd-doc_1.3.3d-3_all.deb
Files: 
 0846fcc9bbf2aede66edb986b40a4914 1625 net optional proftpd-dfsg_1.3.3d-3.dsc
 327f6342b63fcead3d8521062e5c377f 100239 net optional proftpd-dfsg_1.3.3d-3.debian.tar.gz
 6a853d6ceb4c27b6d1ba67f8a15643cc 2347796 net optional proftpd-basic_1.3.3d-3_i386.deb
 159199a0e741427142c425680a74bbcb 846998 net optional proftpd-dev_1.3.3d-3_i386.deb
 afb09338ae6a0d3462557c98de3f3805 361278 net optional proftpd-mod-mysql_1.3.3d-3_i386.deb
 f65d0eec11662357185fab786d1980a7 361074 net optional proftpd-mod-pgsql_1.3.3d-3_i386.deb
 8030822a6baa14d725ad2aa5942a1851 369790 net optional proftpd-mod-ldap_1.3.3d-3_i386.deb
 82ba21063f8cabddc7c04ae2ea3e0687 362702 net optional proftpd-mod-odbc_1.3.3d-3_i386.deb
 634b4140c0f4847fd9f634bd086459e0 360470 net optional proftpd-mod-sqlite_1.3.3d-3_i386.deb
 ccdb1329b40244ebf3bf5bb6cca784d8 1525152 doc optional proftpd-doc_1.3.3d-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1aYr8ACgkQpFNRmenyx0cr/wCgnWl+DI/YRyHK0Y7mqqKz0O4/
jTUAn3xDuRK3TlPjSQbLhBmrFYw3atXh
=HX30
-----END PGP SIGNATURE-----



------------=_1297769947-31352-0--



More information about the Pkg-proftpd-maintainers mailing list