summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-03-16 11:55:11 -0400
committerChris Lumens <clumens@redhat.com>2009-03-16 12:00:27 -0400
commite4c0c374f4f2b7e0cee9811c21caa2522021a9e4 (patch)
treeba55c57c9ee668b5618efec2c0314fb6c0df74eb /loader
parentaf6304b902455bd764d2c7ad09bf052caef37bc9 (diff)
downloadanaconda-e4c0c374f4f2b7e0cee9811c21caa2522021a9e4.tar.gz
anaconda-e4c0c374f4f2b7e0cee9811c21caa2522021a9e4.tar.xz
anaconda-e4c0c374f4f2b7e0cee9811c21caa2522021a9e4.zip
Handle FTP servers that both want and don't want PASS after USER (#490350).
Before, we were sending PASS only if we got a 230 (success) response to USER and not providing PASS if we got a 331 (gimme a password) response. That's entirely the wrong behavior.
Diffstat (limited to 'loader')
-rw-r--r--loader/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/ftp.c b/loader/ftp.c
index 8f8a585f9..15b4f8326 100644
--- a/loader/ftp.c
+++ b/loader/ftp.c
@@ -330,7 +330,7 @@ int ftpOpen(char *host, int family, char *name, char *password,
/* FTP does not require that USER be followed by PASS. Anonymous logins
* in particular do not need any password.
*/
- if (!strncmp(userReply, "230", 3)) {
+ if (strncmp(userReply, "230", 3) != 0) {
if ((rc = ftpCommand(sock, NULL, "PASS", password, NULL))) {
close(sock);
return rc;