From 02c768e8ae094275d384b056dffc71dffdac138f Mon Sep 17 00:00:00 2001 From: dg Date: Sun, 18 Sep 1994 04:09:28 +0000 Subject: Kludge to workaround ftp coredumping when password is specified before login in .netrc. Submitted by: John Kohl --- usr.bin/ftp/ruserpass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/ftp') 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."); -- cgit v1.1