* cmds.c (user): Replace "oldlevel" with the more descriptive
authorGeoffrey King <gjking@mit.edu>
Fri, 28 Aug 1998 22:56:36 +0000 (22:56 +0000)
committerGeoffrey King <gjking@mit.edu>
Fri, 28 Aug 1998 22:56:36 +0000 (22:56 +0000)
"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

src/appl/gssftp/ftp/ChangeLog
src/appl/gssftp/ftp/cmds.c
src/appl/gssftp/ftp/ftp.c

index 6c0321c06e88baab3fd9f5d715f9ca9d42a3d0f4..d389d990aa5ec3c1fa1cf493d6f09b79d1a9f023 100644 (file)
@@ -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
index d1dfc9c09fb8bd9301a923aeef325ee876fa77a7..4d1a8206abb4592caea4f95140b9a24c4dd61843 100644 (file)
@@ -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) {
index b2e7ebd3b5163badc34950934a2dc97550ee4d85..f6fb15677343f6c20d1316e8c5d43d33c72c4082 100644 (file)
@@ -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;