summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-18 04:09:28 +0000
committerdg <dg@FreeBSD.org>1994-09-18 04:09:28 +0000
commit02c768e8ae094275d384b056dffc71dffdac138f (patch)
tree26b7bb7bc6fa8288691b06aa06dcb5af232635d9 /usr.bin/ftp
parent5a1cd8e3f866c3d4049d31f8e653bc274882ae3f (diff)
downloadFreeBSD-src-02c768e8ae094275d384b056dffc71dffdac138f.zip
FreeBSD-src-02c768e8ae094275d384b056dffc71dffdac138f.tar.gz
Kludge to workaround ftp coredumping when password is specified before
login in .netrc. Submitted by: John Kohl
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/ruserpass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/ftp/ruserpass.c b/usr.bin/ftp/ruserpass.c
index 07bb1f4..d5d69fb 100644
--- a/usr.bin/ftp/ruserpass.c
+++ b/usr.bin/ftp/ruserpass.c
@@ -144,7 +144,7 @@ next:
}
break;
case PASSWD:
- if (strcmp(*aname, "anonymous") &&
+ if ((*aname == NULL || strcmp(*aname, "anonymous")) &&
fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
OpenPOWER on IntegriCloud