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