summaryrefslogtreecommitdiff
path: root/libexec/ftpd/ftpcmd.y
diff options
context:
space:
mode:
authorDan Harnett <danh@cvs.openbsd.org>2002-06-17 19:33:38 +0000
committerDan Harnett <danh@cvs.openbsd.org>2002-06-17 19:33:38 +0000
commitbfae27c1c947f622bb9f1e1cc33987d0b3818169 (patch)
treeddfa9d41dbec8e7c542dc45154c86b1993d349f8 /libexec/ftpd/ftpcmd.y
parentd27320aa6ec1696185c414c78ff94550b5126a50 (diff)
Initialize SIGALRM handler once in main(), instead of in several
different locations. This fixes a problem where the SIGALRM handler was being set to an uninitialized pointer in receive_data(). Originally reported to the misc@ list by Colin Harford. ok millert@
Diffstat (limited to 'libexec/ftpd/ftpcmd.y')
-rw-r--r--libexec/ftpd/ftpcmd.y5
1 files changed, 2 insertions, 3 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index 1b596fc5594..690096505c7 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpcmd.y,v 1.39 2002/02/19 17:58:24 mpech Exp $ */
+/* $OpenBSD: ftpcmd.y,v 1.40 2002/06/17 19:33:37 danh Exp $ */
/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
@@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.39 2002/02/19 17:58:24 mpech Exp $";
+static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.40 2002/06/17 19:33:37 danh Exp $";
#endif
#endif /* not lint */
@@ -1187,7 +1187,6 @@ yylex()
switch (state) {
case CMD:
- (void) signal(SIGALRM, toolong);
(void) alarm((unsigned) timeout);
if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
reply(221, "You could at least say goodbye.");