From owner-freebsd-stable Fri Nov 7 23:40:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA21666 for stable-outgoing; Fri, 7 Nov 1997 23:40:45 -0800 (PST) (envelope-from owner-freebsd-stable) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA21660; Fri, 7 Nov 1997 23:40:43 -0800 (PST) (envelope-from joerg@FreeBSD.org) From: Joerg Wunsch Received: (from joerg@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id XAA29381; Fri, 7 Nov 1997 23:39:01 -0800 (PST) Date: Fri, 7 Nov 1997 23:39:01 -0800 (PST) Message-Id: <199711080739.XAA29381@freefall.freebsd.org> To: announce@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Fatal bug in 2.2.5R's lpd Sender: owner-freebsd-stable@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk When merging the new `ct' printcap functionality into 2.2-stable right before 2.2.5-RELEASE was due, it's now apparent that I didn't test it enough before. :-( I've introduced a fatal bug that causes all the lpd children sending jobs to remote printers to be killed after the `ct' timeout, even in case the connection came up properly. For small jobs, you won't notice this immediately (the default timeout is 120 seconds, and modern printers can print a lot within this time), but large jobs will ultimately be aborted then. Sorry for the inconvenience. For those of you who do need to operate on remote printers, please either do upgrade to the latest 2.2-stable, or apply the patch below, rebuild and reinstall your lpd. Sorry again, Joerg Index: src/usr.sbin/lpr/common_source/displayq.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/lpr/common_source/displayq.c,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.6 diff -u -u -r1.4.2.5 -r1.4.2.6 --- displayq.c 1997/10/15 12:25:35 1.4.2.5 +++ displayq.c 1997/11/07 13:20:29 1.4.2.6 @@ -242,6 +242,7 @@ savealrm = signal(SIGALRM, alarmhandler); alarm(CT); fd = getport(RM, 0); + alarm(0); (void)signal(SIGALRM, savealrm); if (fd < 0) { if (from != host) Index: src/usr.sbin/lpr/lpd/printjob.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/lpr/lpd/printjob.c,v retrieving revision 1.11.2.3 retrieving revision 1.11.2.4 diff -u -u -r1.11.2.3 -r1.11.2.4 --- printjob.c 1997/10/15 09:56:00 1.11.2.3 +++ printjob.c 1997/11/07 13:20:37 1.11.2.4 @@ -1474,6 +1474,7 @@ savealrm = signal(SIGALRM, alarmhandler); alarm(CT); pfd = getport(cp, port); + alarm(0); (void)signal(SIGALRM, savealrm); if (pfd < 0 && errno == ECONNREFUSED) resp = 1; @@ -1541,6 +1542,7 @@ savealrm = signal(SIGALRM, alarmhandler); alarm(CT); pfd = getport(RM, 0); + alarm(0); (void)signal(SIGALRM, savealrm); if (pfd >= 0) { (void) snprintf(line, sizeof(line), "\2%s\n", RP);