]> granicus.if.org Git - curl/commitdiff
Fixed bad krb4 code. It always tried to use krb4 if built enabled.
authorDaniel Stenberg <daniel@haxx.se>
Fri, 11 Feb 2005 22:50:57 +0000 (22:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 11 Feb 2005 22:50:57 +0000 (22:50 +0000)
lib/ftp.c

index 82683aae664aedfb08b68c0b8b8320b6869fd36a..fc73edc861af0b853a215af41e6fe715980bb102 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2154,21 +2154,23 @@ static CURLcode ftp_state_loggedin(struct connectdata *conn)
   infof(data, "We have successfully logged in\n");
 
 #ifdef HAVE_KRB4
-  /* We are logged in with Kerberos, now set the requested
-   * protection level
-   */
-  if(conn->sec_complete)
-    /* BLOCKING */
-    Curl_sec_set_protection_level(conn);
-
-  /* We may need to issue a KAUTH here to have access to the files
-   * do it if user supplied a password
-   */
-  if(conn->passwd && *conn->passwd) {
-    /* BLOCKING */
-    result = Curl_krb_kauth(conn);
-    if(result)
-      return result;
+  if(data->set.krb4) {
+    /* We are logged in, asked to use Kerberos. Set the requested
+     * protection level
+     */
+    if(conn->sec_complete)
+      /* BLOCKING */
+      Curl_sec_set_protection_level(conn);
+    
+    /* We may need to issue a KAUTH here to have access to the files
+     * do it if user supplied a password
+     */
+    if(conn->passwd && *conn->passwd) {
+      /* BLOCKING */
+      result = Curl_krb_kauth(conn);
+      if(result)
+        return result;
+    }
   }
 #endif
   if(conn->ssl[FIRSTSOCKET].use) {