summaryrefslogtreecommitdiffstats
path: root/src/appl
diff options
context:
space:
mode:
authorGeoffrey King <gjking@mit.edu>1998-08-28 22:56:36 +0000
committerGeoffrey King <gjking@mit.edu>1998-08-28 22:56:36 +0000
commitc57d45f6bd9447e2b8912e24252d48c521deeed7 (patch)
treec5009b08d628cbe9e69c3d37bedb888e70ea8983 /src/appl
parent5ccd5f3c4916415a73e3a4a2c0b43302cbb852f8 (diff)
downloadkrb5-c57d45f6bd9447e2b8912e24252d48c521deeed7.tar.gz
krb5-c57d45f6bd9447e2b8912e24252d48c521deeed7.tar.xz
krb5-c57d45f6bd9447e2b8912e24252d48c521deeed7.zip
* cmds.c (user): Replace "oldlevel" with the more descriptive
"oldclevel". Also, replace all occurrences of "dlevel" in this function with "clevel". * ftp.c (login): Test whether or not the server actually requires "PASS dummy" by first sending "PWD" and checking the return value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10898 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl')
-rw-r--r--src/appl/gssftp/ftp/ChangeLog9
-rw-r--r--src/appl/gssftp/ftp/cmds.c8
-rw-r--r--src/appl/gssftp/ftp/ftp.c14
3 files changed, 25 insertions, 6 deletions
diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog
index 6c0321c06..d389d990a 100644
--- a/src/appl/gssftp/ftp/ChangeLog
+++ b/src/appl/gssftp/ftp/ChangeLog
@@ -1,3 +1,12 @@
+Fri Aug 28 18:46:35 1998 Geoffrey King <gjking@mit.edu>
+
+ * cmds.c (user): Replace "oldlevel" with the more descriptive
+ "oldclevel". Also, replace all occurrences of "dlevel" in this
+ function with "clevel".
+
+ * ftp.c (login): Test whether or not the server actually requires
+ "PASS dummy" by first sending "PWD" and checking the return value.
+
Wed Aug 12 02:26:26 1998 Geoffrey King <gjking@mit.edu>
* ftp.c, cmds.c, cmdtab.c, main.c, secure.c, ftp_var.h: Replace
diff --git a/src/appl/gssftp/ftp/cmds.c b/src/appl/gssftp/ftp/cmds.c
index d1dfc9c09..4d1a8206a 100644
--- a/src/appl/gssftp/ftp/cmds.c
+++ b/src/appl/gssftp/ftp/cmds.c
@@ -1564,17 +1564,17 @@ user(argc, argv)
n = command("PASS dummy");
else if (n == CONTINUE) {
#ifndef NOENCRYPTION
- int oldlevel;
+ int oldclevel;
#endif
- if (argc < 3 )
+ if (argc < 3)
argv[2] = mygetpass("Password: "), argc++;
#ifndef NOENCRYPTION
- if ((oldlevel = dlevel) == PROT_S) dlevel = PROT_P;
+ if ((oldclevel = clevel) == PROT_S) clevel = PROT_P;
#endif
n = command("PASS %s", argv[2]);
#ifndef NOENCRYPTION
/* level may have changed */
- if (dlevel == PROT_P) dlevel = oldlevel;
+ if (clevel == PROT_P) clevel = oldclevel;
#endif
}
if (n == CONTINUE) {
diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c
index b2e7ebd3b..f6fb15677 100644
--- a/src/appl/gssftp/ftp/ftp.c
+++ b/src/appl/gssftp/ftp/ftp.c
@@ -289,8 +289,18 @@ login(host)
user = tmp;
}
n = command("USER %s", user);
- if (n == COMPLETE)
- n = command("PASS dummy");
+ if (n == COMPLETE) {
+ /* determine if we need to send a dummy password */
+ int oldverbose = verbose;
+
+ verbose = 0;
+ if (command("PWD") != COMPLETE) {
+ verbose = oldverbose;
+ command("PASS dummy");
+ } else {
+ verbose = oldverbose;
+ }
+ }
else if (n == CONTINUE) {
#ifndef NOENCRYPTION
int oldclevel;