mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
use the HAVE_KRB4 define instead of just KRB4
This commit is contained in:
parent
d4629fd395
commit
800052dc50
@ -36,7 +36,7 @@
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* Define if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef KRB4
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
@ -50,7 +50,7 @@
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* Define if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef KRB4
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#undef ssize_t
|
||||
|
10
lib/ftp.c
10
lib/ftp.c
@ -77,7 +77,7 @@
|
||||
#include "http.h" /* for HTTP proxy tunnel stuff */
|
||||
#include "ftp.h"
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
#include "security.h"
|
||||
#include "krb4.h"
|
||||
#endif
|
||||
@ -377,7 +377,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
|
||||
if(!result)
|
||||
code = atoi(buf);
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
/* handle the security-oriented responses 6xx ***/
|
||||
/* FIXME: some errorchecking perhaps... ***/
|
||||
switch(code) {
|
||||
@ -467,7 +467,7 @@ CURLcode Curl_ftp_connect(struct connectdata *conn)
|
||||
return CURLE_FTP_WEIRD_SERVER_REPLY;
|
||||
}
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
/* if not anonymous login, try a secure login */
|
||||
if(data->set.krb4) {
|
||||
|
||||
@ -559,7 +559,7 @@ CURLcode Curl_ftp_connect(struct connectdata *conn)
|
||||
(the user logged in without password) */
|
||||
infof(data, "We have successfully logged in\n");
|
||||
if (conn->ssl[FIRSTSOCKET].use) {
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
/* we are logged in (with Kerberos)
|
||||
* now set the requested protection level
|
||||
*/
|
||||
@ -739,7 +739,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
Curl_sec_fflush_fd(conn, conn->sock[SECONDARYSOCKET]);
|
||||
#endif
|
||||
/* shut down the socket to inform the server we're done */
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef CURL_DISABLE_FTP
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
|
||||
#include "security.h"
|
||||
#include "base64.h"
|
||||
@ -402,5 +402,5 @@ CURLcode Curl_krb_kauth(struct connectdata *conn)
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
#endif /* KRB4 */
|
||||
#endif /* HAVE_KRB4 */
|
||||
#endif /* CURL_DISABLE_FTP */
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef CURL_DISABLE_FTP
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
|
||||
#define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */
|
||||
#include <curl/mprintf.h>
|
||||
@ -90,7 +90,7 @@ static struct Curl_sec_client_mech *mechs[] = {
|
||||
#ifdef KRB5
|
||||
/* not supported */
|
||||
#endif
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
&Curl_krb4_client_mech,
|
||||
#endif
|
||||
NULL
|
||||
@ -478,5 +478,5 @@ Curl_sec_end(struct connectdata *conn)
|
||||
conn->mech=NULL;
|
||||
}
|
||||
|
||||
#endif /* KRB4 */
|
||||
#endif /* HAVE_KRB4 */
|
||||
#endif /* CURL_DISABLE_FTP */
|
||||
|
@ -48,7 +48,7 @@
|
||||
#define _MPRINTF_REPLACE /* use the internal *printf() functions */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
#include "security.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
@ -278,12 +278,12 @@ CURLcode Curl_write(struct connectdata *conn,
|
||||
#else
|
||||
(void)conn;
|
||||
#endif
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
if(conn->sec_complete) {
|
||||
bytes_written = Curl_sec_write(conn, sockfd, mem, len);
|
||||
}
|
||||
else
|
||||
#endif /* KRB4 */
|
||||
#endif /* HAVE_KRB4 */
|
||||
{
|
||||
bytes_written = swrite(sockfd, mem, len);
|
||||
}
|
||||
@ -412,7 +412,7 @@ int Curl_read(struct connectdata *conn,
|
||||
(void)conn;
|
||||
#endif
|
||||
*n=0; /* reset amount to zero */
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
if(conn->sec_complete)
|
||||
nread = Curl_sec_read(conn, sockfd, buf, buffersize);
|
||||
else
|
||||
|
@ -127,7 +127,7 @@
|
||||
#define _MPRINTF_REPLACE /* use our functions only */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
#include "security.h"
|
||||
#endif
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
||||
#define MAX(x,y) ((x)>(y)?(x):(y))
|
||||
#endif
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
/* Types needed for krb4-ftp connections */
|
||||
struct krb4buffer {
|
||||
void *data;
|
||||
@ -510,7 +510,7 @@ struct connectdata {
|
||||
char *newurl; /* This can only be set if a Location: was in the
|
||||
document headers */
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
enum protection_level command_prot;
|
||||
enum protection_level data_prot;
|
||||
enum protection_level request_data_prot;
|
||||
|
@ -102,7 +102,7 @@ char *curl_version(void)
|
||||
(void)num; /* no compiler warning please */
|
||||
#endif
|
||||
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
sprintf(ptr, " krb4");
|
||||
ptr += strlen(ptr);
|
||||
#endif
|
||||
@ -167,7 +167,7 @@ static curl_version_info_data version_info = {
|
||||
#ifdef ENABLE_IPV6
|
||||
| CURL_VERSION_IPV6
|
||||
#endif
|
||||
#ifdef KRB4
|
||||
#ifdef HAVE_KRB4
|
||||
| CURL_VERSION_KERBEROS4
|
||||
#endif
|
||||
#ifdef USE_SSLEAY
|
||||
|
Loading…
Reference in New Issue
Block a user