From cc9b0f669227ebd6287a4dc860669d4bf3136676 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 27 Jul 2000 19:59:14 +0000 Subject: If the HOME environment variable is not set, do not try to read .netrc from cwd. Mostly paranoia but good practive. Closes PR 1332. --- usr.bin/ftp/ruserpass.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/ftp/ruserpass.c b/usr.bin/ftp/ruserpass.c index 7f51b7f0035..14831e9e1bd 100644 --- a/usr.bin/ftp/ruserpass.c +++ b/usr.bin/ftp/ruserpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ruserpass.c,v 1.11 1998/03/30 06:59:35 deraadt Exp $ */ +/* $OpenBSD: ruserpass.c,v 1.12 2000/07/27 19:59:13 millert Exp $ */ /* $NetBSD: ruserpass.c,v 1.14 1997/07/20 09:46:01 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: ruserpass.c,v 1.11 1998/03/30 06:59:35 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ruserpass.c,v 1.12 2000/07/27 19:59:13 millert Exp $"; #endif #endif /* not lint */ @@ -94,7 +94,7 @@ ruserpass(host, aname, apass, aacct) hdir = getenv("HOME"); if (hdir == NULL) - hdir = "."; + return (0); if (strlen(hdir) + sizeof(".netrc") < sizeof(buf)) { (void)sprintf(buf, "%s/.netrc", hdir); } else { -- cgit v1.2.3