diff options
author | des <des@FreeBSD.org> | 2001-01-08 13:15:14 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-01-08 13:15:14 +0000 |
commit | e75c537ff5c36ad3c93082e62bd622b3d7697e55 (patch) | |
tree | 7a3662c32c704dd7113fabd2237374a7405e6abf /lib | |
parent | 2e3ba2a4f53e404d9229cf56c0393582cbd8ea1d (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libfetch/Makefile | 2 | ||||
-rw-r--r-- | lib/libfetch/ftp.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/libfetch/Makefile b/lib/libfetch/Makefile index 90a2b2a..c0f968a 100644 --- a/lib/libfetch/Makefile +++ b/lib/libfetch/Makefile @@ -5,7 +5,7 @@ LIB= fetch CFLAGS+= -I. -Wall -pedantic CFLAGS+= -DINET6 .if !defined(DEBUG) -CFLAGS+= -DNDEBUG +#CFLAGS+= -DNDEBUG .endif SRCS= fetch.c common.c ftp.c http.c file.c \ ftperr.h httperr.h 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; |