y2k problem with trn 3.6 + inn 2.2.1

Charles Karney karney at pppl.gov
Mon Jan 3 21:21:43 UTC 2000

There's a y2k bug in trn 3.6 interoperating with inn 2.2.1.  If .rnlast
contains a date in the previous century, then trn sends a string like

    newgroups 991223 203014 GMT

to innd, and inn responds with

    501 Usage: NEWGROUPS yymmdd hhmmss ["GMT"] [<distributions>]

(I suppose because inn thinks that this is a date in the future.)

The workaround is simple: just delete ~/.rnlast.  (You only have to do this
once per century.)

A preferable solution would be to have trn include the century (in nntp.c)

    sprintf(ser_line, "NEWGROUPS %04d%02d%02d %02d%02d%02d GMT",
	ts->tm_year % 10000, ts->tm_mon+1, ts->tm_mday,
	ts->tm_hour, ts->tm_min, ts->tm_sec);

In addition, inn should print the error with the century

    501 Usage: NEWGROUPS yyyymmdd hhmmss ["GMT"] [<distributions>]

Unfortunately there will still be a problem when the year requires a 5th

Charles Karney
Plasma Physics Laboratory	  E-mail:  Karney at Princeton.EDU
Princeton University		  Phone:   +1 609 243 2607
Princeton, NJ 08543-0451	  FAX:	   +1 609 243 3438

More information about the inn-bugs mailing list