1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

Check the FTP_LOGIN environment variable before falling back on

FTP_ANONYMOUS_USER.
This commit is contained in:
Dag-Erling Smørgrav 2000-12-22 18:01:40 +00:00
parent 3b93c7437b
commit e72f0de24e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70273

View File

@ -761,6 +761,8 @@ _ftp_connect(struct url *url, struct url *purl, char *flags)
/* send user name and password */
user = url->user;
if (!user || !*user)
user = getenv("FTP_LOGIN");
if (!user || !*user)
user = FTP_ANONYMOUS_USER;
if (purl && url->port == _fetch_default_port(url->scheme))