From owner-freebsd-ports Wed Jan 5 14:50:10 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 00E731548E for ; Wed, 5 Jan 2000 14:50:08 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA63208; Wed, 5 Jan 2000 14:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from ns.itga.com.au (ns.itga.com.au [202.53.40.210]) by hub.freebsd.org (Postfix) with ESMTP id 8D3CB154A9 for ; Wed, 5 Jan 2000 14:42:55 -0800 (PST) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20]) by ns.itga.com.au (8.9.3/8.9.3) with ESMTP id JAA17185 for ; Thu, 6 Jan 2000 09:42:52 +1100 (EST) (envelope-from gnb@itga.com.au) Received: from hellcat.itga.com.au (hellcat.itga.com.au [192.168.71.163]) by lightning.itga.com.au (8.9.3/8.9.3) with ESMTP id JAA04608; Thu, 6 Jan 2000 09:42:52 +1100 (EST) Received: (from gnb@localhost) by hellcat.itga.com.au (8.9.3/8.9.3) id JAA31087; Thu, 6 Jan 2000 09:42:52 +1100 (EST) (envelope-from gnb@itga.com.au) Message-Id: <200001052242.JAA31087@hellcat.itga.com.au> Date: Thu, 6 Jan 2000 09:42:52 +1100 (EST) From: Gregory Bond To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/15926: [patch] y2k bug in leafnode+ causes lost news Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15926 >Category: ports >Synopsis: y2k bug in leafnode+ causes lost news >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 5 14:50:02 PST 2000 >Closed-Date: >Last-Modified: >Originator: Gregory Bond >Release: FreeBSD 3.4-STABLE i386 >Organization: ITG Australia Limited >Environment: FreeBSD 3.4-STABLE (or any FreeBSD version), leafnode+ 2.8 from the ports collection (also present in the latest 2.9 version) >Description: A y2k bug in leafnode+ 2.9 considers incoming news articles with the (arguably bogus) Date: header like Wed, 05 Jan 00 15:01:40 GMT to be too old, so these incoming articles are dropped. [They seem to account for about 5% of the articles received at this site.] >How-To-Repeat: Run fetchnews with -vv and note the lines on stderr like 102715 is posted more than 1003 days ago: Wed, 05 Jan 00 15:01:40 GMT >Fix: [This has been reported to the current maintainer of leafnode+ (jam@pobox.com) and appears here as a PR for the record...] [As an aside, the port is still on leafnode+ 2.8.] [As a further aside, this code is never going to work right for leapyears, being off by 1 day after Feb29, but that probably doesn't matter in this context ] --- artutil.c.orig Sat Oct 9 13:19:25 1999 +++ artutil.c Thu Jan 6 09:18:32 2000 @@ -287,7 +287,10 @@ if (sscanf(d, "%d %10s %d", &day, monthname, &year) < 3) { return 1003; - } else if (!((year > 95 && year < 100) || (year > 1995))) { + } + /* Accept broken posters who have "Wed, 05 Jan 00 10:08:53 GMT" */ + if (year >= 0 && year < 50) year += 2000; + if (!((year > 95 && year < 100) || (year > 1995))) { return 1004; #if DATESTRICT } else if (strlen(monthname) != 3) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message