Synopsis: Fixes race in SIGPIPE and SIGURG handling.
NetBSD versions: 1.0, 1.1, 1.2, and 1.2B upto 19970123.
Thanks to: David Greenman, FreeBSD Project; AUSCERT.
Reported in AUSCERT Advisory: AA-97.03

Index: ftpd.c
===================================================================
RCS file: /cvsroot/src/libexec/ftpd/ftpd.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -c -r1.15 -r1.16
*** ftpd.c	1995/06/03 22:46:47	1.15
--- ftpd.c	1997/01/23 05:57:55	1.16
***************
*** 1,4 ****
! /*	$NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $	*/
  
  /*
   * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
--- 1,4 ----
! /*	$NetBSD: ftpd.c,v 1.16 1997/01/23 05:57:55 mrg Exp $	*/
  
  /*
   * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
***************
*** 43,49 ****
  #if 0
  static char sccsid[] = "@(#)ftpd.c	8.4 (Berkeley) 4/16/94";
  #else
! static char rcsid[] = "$NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $";
  #endif
  #endif /* not lint */
  
--- 43,49 ----
  #if 0
  static char sccsid[] = "@(#)ftpd.c	8.4 (Berkeley) 4/16/94";
  #else
! static char rcsid[] = "$NetBSD: ftpd.c,v 1.16 1997/01/23 05:57:55 mrg Exp $";
  #endif
  #endif /* not lint */
  
***************
*** 1390,1395 ****
--- 1390,1400 ----
  dologout(status)
  	int status;
  {
+ 	/*
+ 	* Prevent reception of SIGURG from resulting in a resumption
+ 	* back to the main program loop.
+ 	*/
+ 	transflag = 0;
  
  	if (logged_in) {
  		(void) seteuid((uid_t)0);