From mbsd@pacbell.net  Sun Dec 29 23:16:26 2002
Return-Path: <mbsd@pacbell.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 829BC37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Dec 2002 23:16:26 -0800 (PST)
Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3298143ED4
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Dec 2002 23:16:26 -0800 (PST)
	(envelope-from mbsd@pacbell.net)
Received: from atlas ([64.166.23.44])
 by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 HotFix 1.6 (built Oct 18
 2002)) with ESMTP id <0H7X0005O87DBS@mta5.snfc21.pbi.net> for
 FreeBSD-gnats-submit@freebsd.org; Sun, 29 Dec 2002 23:16:26 -0800 (PST)
Message-Id: <20021229230516.C18514-100000@atlas.home>
Date: Sun, 29 Dec 2002 23:16:25 -0800 (PST)
From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mbsd@pacbell.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: openpam@thinksec.com
Subject: rshd crash, openpam bug, patch included

>Number:         46628
>Category:       bin
>Synopsis:       rshd crash, openpam bug, patch included
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 29 23:20:01 PST 2002
>Closed-Date:    Thu Jan 02 18:50:14 PST 2003
>Last-Modified:  Thu Jan 02 18:50:14 PST 2003
>Originator:     Mikko Tyolajarvi
>Release:        FreeBSD 5.0-CURRENT sparc64
>Organization:
>Environment:
System: FreeBSD sparc.home 5.0-CURRENT FreeBSD 5.0-CURRENT #12: Sun Dec 29 21:26:00 PST 2002 mikko@sparc.home:/usr/obj/usr/src/sys/SPARC64 sparc64

>Description:

Trying to access a 5.0 box using rsh crashes rshd in pam_putenv() due
to a bogus return value from openpam_findenv().

>How-To-Repeat:

  sparc% echo localhost > .rhosts
  sparc% rsh localhost date
  sparc% dmesg | tail -1
  pid 1916 (rshd), uid 0: exited on signal 11

>Fix:

--- DIFF begins here ---
Index: openpam_impl.h
===================================================================
RCS file: /home/ncvs/src/contrib/openpam/lib/openpam_impl.h,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 openpam_impl.h
--- openpam_impl.h	16 Dec 2002 15:28:02 -0000	1.1.1.9
+++ openpam_impl.h	30 Dec 2002 06:57:19 -0000
@@ -153,7 +153,7 @@
 #define ENTER()
 #define RETURNV() return
 #define RETURNC(c) return (c)
-#define RETURNI(n) return (i)
+#define RETURNI(i) return (i)
 #define RETURNP(p) return (p)
 #define RETURNS(s) return (s)
 #endif
--- DIFF ends here ---



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Thu Jan 2 18:50:13 PST 2003 
State-Changed-Why:  
Fixed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46628 
>Unformatted:
