Subject: pkg/5758: qpopper2.52 die after sending password
To: None <gnats-bugs@gnats.netbsd.org>
From: None <taca@kyoto.jepro.co.jp>
List: netbsd-bugs
Date: 07/15/1998 16:46:25
>Number:         5758
>Category:       pkg
>Synopsis:       qpopper2.52 segmentation halt after sending password
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 15 00:50:00 1998
>Last-Modified:
>Originator:     Takahiro Kambe
>Organization:
	JEPRO Co., Ltd.
>Release:        qpopper2.52
>Environment:
System: NetBSD edge.sky.yamashina.kyoto.jp 1.3E NetBSD 1.3E (ALN4.IPv4) #1: Fri Jun 5 11:40:44 JST 1998 taca@edge.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/ALN4.IPv4 i386


>Description:
	Qpopper2.52 segmentation halt after a client send password.
>How-To-Repeat:
	Install qpopper2.52 from package and telnet pop3 port.
	After sending password, server will die showing "Segmentation halt."
	I've checked this behavior on FreeBSD 2.2.6, but the same problem
	should exist on NetBSD.
>Fix:
	Apply the patch bellow.

*** pop_dropcopy.c.orig	Wed Jul 15 11:23:40 1998
--- pop_dropcopy.c	Wed Jul 15 12:21:51 1998
***************
*** 1024,1034 ****
  	(void)ftruncate(dfd, (OFF_T)offset);
      }
  #ifdef BULLDB
  #ifdef GDBM
!         gdbm_close(p->bull_db);
  #else
!         dbm_close(p->bull_db);
  #endif
  #endif
      (void)fseek(p->drop, 0L, SEEK_END);
      p->spool_end = ftell(p->drop);
--- 1024,1036 ----
  	(void)ftruncate(dfd, (OFF_T)offset);
      }
  #ifdef BULLDB
+     if (p->bulldir) {
  #ifdef GDBM
! 	    gdbm_close(p->bull_db);
  #else
! 	    dbm_close(p->bull_db);
  #endif
+     }
  #endif
      (void)fseek(p->drop, 0L, SEEK_END);
      p->spool_end = ftell(p->drop);
>Audit-Trail:
>Unformatted: