summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-07-27 19:59:14 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-07-27 19:59:14 +0000
commitcc9b0f669227ebd6287a4dc860669d4bf3136676 (patch)
tree24232a6df33647a7605a8226ee006179fa696010 /usr.bin
parent28e867ba29aeeec457edd12944528e685bb76a9c (diff)
If the HOME environment variable is not set, do not try to read
.netrc from cwd. Mostly paranoia but good practive. Closes PR 1332.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ftp/ruserpass.c6
1 files changed, 3 insertions, 3 deletions
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 {