diff options
author | Vadim Zhukov <zhuk@cvs.openbsd.org> | 2017-01-11 13:40:25 +0000 |
---|---|---|
committer | Vadim Zhukov <zhuk@cvs.openbsd.org> | 2017-01-11 13:40:25 +0000 |
commit | 5bbf7372ac1eb01288fe0d876a99647665d96d04 (patch) | |
tree | 2188a600b48711a41cccd0360765866010285e91 | |
parent | 18a9cb94281ba43a4afb0c590bb1dbfde975e6a6 (diff) |
Don't attempt to read .netrc when we already force anonymous FTP (-a).
Patch from Anton Lindqvist via tech@, thanks!
okay deraadt@
-rw-r--r-- | usr.bin/ftp/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index 4da0e3be26a..8629f8faea3 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.81 2016/08/20 20:18:42 millert Exp $ */ +/* $OpenBSD: util.c,v 1.82 2017/01/11 13:40:24 zhuk Exp $ */ /* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */ /*- @@ -221,7 +221,7 @@ ftp_login(const char *host, char *user, char *pass) struct passwd *pw; #ifndef SMALL - if (user == NULL) { + if (user == NULL && !anonftp) { if (ruserpass(host, &user, &pass, &acctname) < 0) { code = -1; return (0); |