summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/ftp.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-01-08 13:15:14 +0000
committerdes <des@FreeBSD.org>2001-01-08 13:15:14 +0000
commite75c537ff5c36ad3c93082e62bd622b3d7697e55 (patch)
tree7a3662c32c704dd7113fabd2237374a7405e6abf /lib/libfetch/ftp.c
parent2e3ba2a4f53e404d9229cf56c0393582cbd8ea1d (diff)
downloadFreeBSD-src-e75c537ff5c36ad3c93082e62bd622b3d7697e55.zip
FreeBSD-src-e75c537ff5c36ad3c93082e62bd622b3d7697e55.tar.gz
Use "anonymous" rather than "ftp" as login name for anonymous ftp.
Rather than have a separate (misnamed) FTP_ANONYMOUS_PASSWORD constant, use FTP_ANONYMOUS_USER (i.e. "anonymous") to construct the anonymous ftp password if getlogin() fails.
Diffstat (limited to 'lib/libfetch/ftp.c')
-rw-r--r--lib/libfetch/ftp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index da4f7ce..0be1d0d 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -74,8 +74,7 @@
#include "common.h"
#include "ftperr.h"
-#define FTP_ANONYMOUS_USER "ftp"
-#define FTP_ANONYMOUS_PASSWORD "ftp"
+#define FTP_ANONYMOUS_USER "anonymous"
#define FTP_CONNECTION_ALREADY_OPEN 125
#define FTP_OPEN_DATA_CONNECTION 150
@@ -779,7 +778,7 @@ _ftp_connect(struct url *url, struct url *purl, char *flags)
pwd = getenv("FTP_PASSWORD");
if (!pwd || !*pwd) {
if ((logname = getlogin()) == 0)
- logname = FTP_ANONYMOUS_PASSWORD;
+ logname = FTP_ANONYMOUS_USER;
gethostname(localhost, sizeof localhost);
snprintf(pbuf, sizeof pbuf, "%s@%s", logname, localhost);
pwd = pbuf;
OpenPOWER on IntegriCloud