NetBSD Problem Report #479
From gnats Fri Sep 16 04:40:43 1994
Received: from bloom-beacon.mit.edu (BLOOM-BEACON.MIT.EDU [18.181.0.26]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id EAA00610 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 16 Sep 1994 04:40:42 -0700
Message-Id: <199409161122.HAA03121@kolvir.blrc.ma.us>
Date: Fri, 16 Sep 1994 07:22:47 -0400
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: ftp can dump core + FIX
X-Send-Pr-Version: 3.2
>Number: 479
>Category: misc
>Synopsis: ftp can dump core depending on contents of ~/.netrc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 16 04:50:03 +0000 1994
>Closed-Date: Sat Sep 17 00:52:12 +0000 1994
>Last-Modified:
>Originator: John Kohl
>Release: 1.0_BETA
>Organization:
>Environment:
i486/33
System: NetBSD kolvir 1.0_BETA NetBSD 1.0_BETA (KOLVIR) #16: Thu Sep 15 22:03:20 EDT 1994 jtk@kolvir:/u1/NetBSD-1.0/src/sys/arch/i386/compile/KOLVIR i386
>Description:
If your ~/.netrc has a password line before a login line, ftp will dump
core.
>How-To-Repeat:
Put this in your ~/.netrc:
machine foo.bar
password yourname@your.domain
login anonymous
run ftp to foo.bar, watch it dump core.
>Fix:
Apply this patch:
*** 1.1 1994/09/16 11:14:35
--- src/usr.bin/ftp/ruserpass.c 1994/09/16 11:16:56
***************
*** 145,151 ****
}
break;
case PASSWD:
! if (strcmp(*aname, "anonymous") &&
fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
--- 145,151 ----
}
break;
case PASSWD:
! if ((*aname == NULL || strcmp(*aname, "anonymous")) &&
fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Fri Sep 16 17:52:12 PDT 1994
State-Changed-Why:
Fixed.
>Unformatted:
(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.