NetBSD Problem Report #19765

Received: (qmail 13775 invoked by uid 605); 9 Jan 2003 23:47:57 -0000
Message-Id: <200301092347.h09Nlro28866@guelah.shrubbery.net>
Date: Thu, 9 Jan 2003 23:47:53 GMT
From: john heasley <heas@shrubbery.net>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: heas@shrubbery.net
To: gnats-bugs@gnats.netbsd.org
Subject: security/pgp2 LP64 patch
X-Send-Pr-Version: 3.95

>Number:         19765
>Category:       pkg
>Synopsis:       security/pgp2 LP64 patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tron
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 09 23:48:00 +0000 2003
>Closed-Date:    Thu Sep 28 20:58:23 +0000 2006
>Last-Modified:  Thu Sep 28 20:58:23 +0000 2006
>Originator:     john heasley
>Release:        NetBSD 1.6K
>Organization:
>Environment:
System: NetBSD guelah 1.6K NetBSD 1.6K (guelah) #9: Mon Dec 30 19:01:40 UTC 2002 root@guelah:/sys/arch/sparc64/compile/guelah sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	It appears there pkgsrc/security/pgp2 was already patched for
	alpha as a special case, but not sparc64.  thus some variables
	which were supposed to be 32 bits, were 64 resulting is misc
	errors.
>How-To-Repeat:
	use pgp2 on sparc64, get BUS errors, etc.
>Fix:
	this patch might not address all the problems, but pgp2 does work
	for me with these.  the __alpha specifics could probably be removed.

*** md5.h.orig	Mon Aug  1 15:12:18 1994
--- md5.h	Thu Jan  9 23:30:04 2003
***************
*** 1,10 ****
  #ifndef MD5_H
  #define MD5_H

! #ifdef __alpha
! typedef unsigned int uint32;
  #else
  typedef unsigned long uint32;
  #endif

  struct MD5Context {
--- 1,14 ----
  #ifndef MD5_H
  #define MD5_H

! #ifdef __NetBSD__
! typedef uint32_t uint32;
  #else
+ # ifdef __alpha
+ typedef unsigned int uint32;
+ # else
  typedef unsigned long uint32;
+ # endif
  #endif

  struct MD5Context {
*** usuals.h.orig	Thu Jan  9 23:36:30 2003
--- usuals.h	Thu Jan  9 23:36:03 2003
***************
*** 15,24 ****
  typedef byte *byteptr;	/* pointer to byte */
  typedef char *string;	/* pointer to ASCII character string */
  typedef unsigned short word16;	/* values are 0-65535 */
! #ifdef __alpha
! typedef unsigned int word32;	/* values are 0-4294967295 */
  #else
  typedef unsigned long word32;	/* values are 0-4294967295 */
  #endif

  #ifndef TRUE
--- 15,28 ----
  typedef byte *byteptr;	/* pointer to byte */
  typedef char *string;	/* pointer to ASCII character string */
  typedef unsigned short word16;	/* values are 0-65535 */
! #ifdef __NetBSD__
! typedef uint32_t word32;	/* values are 0-4294967295 */
  #else
+ # ifdef __alpha
+ typedef unsigned int word32;	/* values are 0-4294967295 */
+ # else
  typedef unsigned long word32;	/* values are 0-4294967295 */
+ # endif
  #endif

  #ifndef TRUE
>Release-Note:
>Audit-Trail:

From: Martin Husemann <martin@duskware.de>
To: john heasley <heas@shrubbery.net>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/19765: security/pgp2 LP64 patch
Date: Fri, 10 Jan 2003 01:26:03 +0100

 On Thu, Jan 09, 2003 at 11:47:53PM +0000, john heasley wrote:

 > 	this patch might not address all the problems, but pgp2 does work
 > 	for me with these.  the __alpha specifics could probably be removed.

 I think it would be better to make it use the libc-supplied md5 routines.

 Martin

From: john heasley <heas@shrubbery.net>
To: Martin Husemann <martin@duskware.de>
Cc: john heasley <heas@shrubbery.net>, gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/19765: security/pgp2 LP64 patch
Date: Thu, 9 Jan 2003 16:37:27 -0800

 Fri, Jan 10, 2003 at 01:26:03AM +0100, Martin Husemann:
 > On Thu, Jan 09, 2003 at 11:47:53PM +0000, john heasley wrote:
 > 
 > > 	this patch might not address all the problems, but pgp2 does work
 > > 	for me with these.  the __alpha specifics could probably be removed.
 > 
 > I think it would be better to make it use the libc-supplied md5 routines.

 had not thought of that.  the patch to usuals.h also affects other functions,
 afaict.  perhaps these can be applied for now?
Responsible-Changed-From-To: pkg-manager->tron
Responsible-Changed-By: tron@netbsd.org
Responsible-Changed-When: Thu, 28 Sep 2006 16:25:19 +0000
Responsible-Changed-Why:
I'll handle this PR.


State-Changed-From-To: open->feedback
State-Changed-By: tron@netbsd.org
State-Changed-When: Thu, 28 Sep 2006 16:25:19 +0000
State-Changed-Why:
I've just committed patches and bumped the package revision. Would you
please check whether version 2.6.3ianb1 of the "pgp2" package fixes the
problem for you?


From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/19765 CVS commit: pkgsrc/security/pgp2
Date: Thu, 28 Sep 2006 16:21:46 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Thu Sep 28 16:21:46 UTC 2006

 Modified Files:
 	pkgsrc/security/pgp2: Makefile distinfo
 	pkgsrc/security/pgp2/patches: patch-af
 Added Files:
 	pkgsrc/security/pgp2/patches: patch-ah

 Log Message:
 Always use "unsigned int" for a 32 bit unsigned integer which is correct
 on all platforms supported by pkgsrc.

 This should fix LP64 problems reported in PR pkg/19765 by John Heasley.


 To generate a diff of this commit:
 cvs rdiff -r1.47 -r1.48 pkgsrc/security/pgp2/Makefile
 cvs rdiff -r1.5 -r1.6 pkgsrc/security/pgp2/distinfo
 cvs rdiff -r1.1 -r1.2 pkgsrc/security/pgp2/patches/patch-af
 cvs rdiff -r0 -r1.1 pkgsrc/security/pgp2/patches/patch-ah

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: john heasley <heas@shrubbery.net>
To: gnats-bugs@NetBSD.org
Cc: tron@NetBSD.org, pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org, heas@shrubbery.net
Subject: Re: pkg/19765 (security/pgp2 LP64 patch)
Date: Thu, 28 Sep 2006 13:43:12 -0700

 It seems to work.  reads/write ascii/binary armors that are readable on
 netbsd/i386.

 However, it does not read a "gpg -esa --pgp2" message.  I don't think
 that is pilot error, but that appears to be a gpg bug, as pgp2/i386
 doesn't work either.

From: Matthias Scheler <tron@NetBSD.org>
To: john heasley <heas@shrubbery.net>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/19765 (security/pgp2 LP64 patch)
Date: Thu, 28 Sep 2006 21:47:48 +0100

 On Thu, Sep 28, 2006 at 01:43:12PM -0700, john heasley wrote:
 > It seems to work.  reads/write ascii/binary armors that are readable on
 > netbsd/i386.

 Thanks for testing this.

 > However, it does not read a "gpg -esa --pgp2" message.  I don't think
 > that is pilot error, but that appears to be a gpg bug, as pgp2/i386
 > doesn't work either.

 That would be a different issue then.

 Is it allright with you if I close this PR?

 	Kind regards

 -- 
 Matthias Scheler                                  http://zhadum.org.uk/

From: john heasley <heas@shrubbery.net>
To: Matthias Scheler <tron@NetBSD.org>
Cc: john heasley <heas@shrubbery.net>, gnats-bugs@NetBSD.org
Subject: Re: pkg/19765 (security/pgp2 LP64 patch)
Date: Thu, 28 Sep 2006 13:54:13 -0700

 > > However, it does not read a "gpg -esa --pgp2" message.  I don't think
 > > that is pilot error, but that appears to be a gpg bug, as pgp2/i386
 > > doesn't work either.
 > 
 > That would be a different issue then.

 definitely.  
 > Is it allright with you if I close this PR?

 yes.

State-Changed-From-To: feedback->closed
State-Changed-By: tron@netbsd.org
State-Changed-When: Thu, 28 Sep 2006 20:58:23 +0000
State-Changed-Why:
The submitter confirmed that the new patches in revision 1 of the package
address the issue.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.