summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-06 02:03:47 +0000
committerjkh <jkh@FreeBSD.org>1996-07-06 02:03:47 +0000
commit667294c4e6cd064f2096e198962d0b00bf9c9cc9 (patch)
tree61efd76c399f0685a6823f98f506a8589521954d /release
parent5aa5e5a7d8841c59bccec62f6846d150d04736e6 (diff)
downloadFreeBSD-src-667294c4e6cd064f2096e198962d0b00bf9c9cc9.zip
FreeBSD-src-667294c4e6cd064f2096e198962d0b00bf9c9cc9.tar.gz
Fix a longstanding FTP login name bogon I just noticed again.
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/ftp_strat.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c
index f19f646..3815f19 100644
--- a/release/sysinstall/ftp_strat.c
+++ b/release/sysinstall/ftp_strat.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: ftp_strat.c,v 1.18 1996/06/16 21:57:30 jkh Exp $
+ * $Id: ftp_strat.c,v 1.19 1996/06/17 21:48:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -128,19 +128,22 @@ mediaInitFTP(Device *dev)
return FALSE;
}
+ hostname = variable_get(VAR_FTP_HOST);
+ dir = variable_get(VAR_FTP_DIR);
+ if (!hostname || !dir)
+ msgFatal("Missing FTP host or directory specification - something's wrong!");
+
user = variable_get(VAR_FTP_USER);
if (!user || !*user) {
snprintf(password, BUFSIZ, "installer@%s", variable_get(VAR_HOSTNAME));
login_name = "anonymous";
}
- else {
+ else
login_name = user;
- strcpy(password, variable_get(VAR_FTP_PASS) ? variable_get(VAR_FTP_PASS) : login_name);
- }
- hostname = variable_get(VAR_FTP_HOST);
- dir = variable_get(VAR_FTP_DIR);
- if (!hostname || !dir)
- msgFatal("Missing FTP host or directory specification - something's wrong!");
+ if (variable_get(VAR_FTP_PASS))
+ strcpy(password, variable_get(VAR_FTP_PASS));
+ else
+ sprintf(password, "%s@%s", login_name, hostname);
retries = 0;
retry:
msgNotify("Logging in as %s..", login_name);
OpenPOWER on IntegriCloud