diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-02-11 22:50:57 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-11 22:50:57 +0000 |
commit | b98faaa8c0c5f2f8d0a1d4301be4b5d9950c98ee (patch) | |
tree | a9ea3b7e86531bdc24ed72140b1644404c9509d2 | |
parent | 73772323c92a38cfd115ac0a82a9e8d80345b9ab (diff) |
Fixed bad krb4 code. It always tried to use krb4 if built enabled.
-rw-r--r-- | lib/ftp.c | 32 |
1 files changed, 17 insertions, 15 deletions
@@ -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) { |