mirror of
https://github.com/moparisthebest/curl
synced 2025-01-09 13:08:00 -05:00
openldap: replace ldap_ prefix on private functions
Since openldap itself uses that prefix and with OpenĹDAP 2.5.4 (at least) there's a symbol collision because of that. The private functions now use the 'oldap_' prefix where it previously used 'ldap_'. Reported-by: 3eka on github Fixes #7004 Closes #7005
This commit is contained in:
parent
ba0d3c28ca
commit
8bdde6b14c
@ -76,16 +76,16 @@ extern int ldap_init_fd(ber_socket_t fd, int proto, const char *url,
|
|||||||
LDAP **ld);
|
LDAP **ld);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static CURLcode ldap_setup_connection(struct Curl_easy *data,
|
static CURLcode oldap_setup_connection(struct Curl_easy *data,
|
||||||
struct connectdata *conn);
|
struct connectdata *conn);
|
||||||
static CURLcode ldap_do(struct Curl_easy *data, bool *done);
|
static CURLcode oldap_do(struct Curl_easy *data, bool *done);
|
||||||
static CURLcode ldap_done(struct Curl_easy *data, CURLcode, bool);
|
static CURLcode oldap_done(struct Curl_easy *data, CURLcode, bool);
|
||||||
static CURLcode ldap_connect(struct Curl_easy *data, bool *done);
|
static CURLcode oldap_connect(struct Curl_easy *data, bool *done);
|
||||||
static CURLcode ldap_connecting(struct Curl_easy *data, bool *done);
|
static CURLcode oldap_connecting(struct Curl_easy *data, bool *done);
|
||||||
static CURLcode ldap_disconnect(struct Curl_easy *data,
|
static CURLcode oldap_disconnect(struct Curl_easy *data,
|
||||||
struct connectdata *conn, bool dead);
|
struct connectdata *conn, bool dead);
|
||||||
|
|
||||||
static Curl_recv ldap_recv;
|
static Curl_recv oldap_recv;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LDAP protocol handler.
|
* LDAP protocol handler.
|
||||||
@ -93,18 +93,18 @@ static Curl_recv ldap_recv;
|
|||||||
|
|
||||||
const struct Curl_handler Curl_handler_ldap = {
|
const struct Curl_handler Curl_handler_ldap = {
|
||||||
"LDAP", /* scheme */
|
"LDAP", /* scheme */
|
||||||
ldap_setup_connection, /* setup_connection */
|
oldap_setup_connection, /* setup_connection */
|
||||||
ldap_do, /* do_it */
|
oldap_do, /* do_it */
|
||||||
ldap_done, /* done */
|
oldap_done, /* done */
|
||||||
ZERO_NULL, /* do_more */
|
ZERO_NULL, /* do_more */
|
||||||
ldap_connect, /* connect_it */
|
oldap_connect, /* connect_it */
|
||||||
ldap_connecting, /* connecting */
|
oldap_connecting, /* connecting */
|
||||||
ZERO_NULL, /* doing */
|
ZERO_NULL, /* doing */
|
||||||
ZERO_NULL, /* proto_getsock */
|
ZERO_NULL, /* proto_getsock */
|
||||||
ZERO_NULL, /* doing_getsock */
|
ZERO_NULL, /* doing_getsock */
|
||||||
ZERO_NULL, /* domore_getsock */
|
ZERO_NULL, /* domore_getsock */
|
||||||
ZERO_NULL, /* perform_getsock */
|
ZERO_NULL, /* perform_getsock */
|
||||||
ldap_disconnect, /* disconnect */
|
oldap_disconnect, /* disconnect */
|
||||||
ZERO_NULL, /* readwrite */
|
ZERO_NULL, /* readwrite */
|
||||||
ZERO_NULL, /* connection_check */
|
ZERO_NULL, /* connection_check */
|
||||||
PORT_LDAP, /* defport */
|
PORT_LDAP, /* defport */
|
||||||
@ -120,18 +120,18 @@ const struct Curl_handler Curl_handler_ldap = {
|
|||||||
|
|
||||||
const struct Curl_handler Curl_handler_ldaps = {
|
const struct Curl_handler Curl_handler_ldaps = {
|
||||||
"LDAPS", /* scheme */
|
"LDAPS", /* scheme */
|
||||||
ldap_setup_connection, /* setup_connection */
|
oldap_setup_connection, /* setup_connection */
|
||||||
ldap_do, /* do_it */
|
oldap_do, /* do_it */
|
||||||
ldap_done, /* done */
|
oldap_done, /* done */
|
||||||
ZERO_NULL, /* do_more */
|
ZERO_NULL, /* do_more */
|
||||||
ldap_connect, /* connect_it */
|
oldap_connect, /* connect_it */
|
||||||
ldap_connecting, /* connecting */
|
oldap_connecting, /* connecting */
|
||||||
ZERO_NULL, /* doing */
|
ZERO_NULL, /* doing */
|
||||||
ZERO_NULL, /* proto_getsock */
|
ZERO_NULL, /* proto_getsock */
|
||||||
ZERO_NULL, /* doing_getsock */
|
ZERO_NULL, /* doing_getsock */
|
||||||
ZERO_NULL, /* domore_getsock */
|
ZERO_NULL, /* domore_getsock */
|
||||||
ZERO_NULL, /* perform_getsock */
|
ZERO_NULL, /* perform_getsock */
|
||||||
ldap_disconnect, /* disconnect */
|
oldap_disconnect, /* disconnect */
|
||||||
ZERO_NULL, /* readwrite */
|
ZERO_NULL, /* readwrite */
|
||||||
ZERO_NULL, /* connection_check */
|
ZERO_NULL, /* connection_check */
|
||||||
PORT_LDAPS, /* defport */
|
PORT_LDAPS, /* defport */
|
||||||
@ -171,8 +171,8 @@ struct ldapreqinfo {
|
|||||||
int nument;
|
int nument;
|
||||||
};
|
};
|
||||||
|
|
||||||
static CURLcode ldap_setup_connection(struct Curl_easy *data,
|
static CURLcode oldap_setup_connection(struct Curl_easy *data,
|
||||||
struct connectdata *conn)
|
struct connectdata *conn)
|
||||||
{
|
{
|
||||||
struct ldapconninfo *li;
|
struct ldapconninfo *li;
|
||||||
LDAPURLDesc *lud;
|
LDAPURLDesc *lud;
|
||||||
@ -207,7 +207,7 @@ static CURLcode ldap_setup_connection(struct Curl_easy *data,
|
|||||||
static Sockbuf_IO ldapsb_tls;
|
static Sockbuf_IO ldapsb_tls;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static CURLcode ldap_connect(struct Curl_easy *data, bool *done)
|
static CURLcode oldap_connect(struct Curl_easy *data, bool *done)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = data->conn;
|
struct connectdata *conn = data->conn;
|
||||||
struct ldapconninfo *li = conn->proto.ldapc;
|
struct ldapconninfo *li = conn->proto.ldapc;
|
||||||
@ -255,7 +255,7 @@ static CURLcode ldap_connect(struct Curl_easy *data, bool *done)
|
|||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CURLcode ldap_connecting(struct Curl_easy *data, bool *done)
|
static CURLcode oldap_connecting(struct Curl_easy *data, bool *done)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = data->conn;
|
struct connectdata *conn = data->conn;
|
||||||
struct ldapconninfo *li = conn->proto.ldapc;
|
struct ldapconninfo *li = conn->proto.ldapc;
|
||||||
@ -354,14 +354,15 @@ static CURLcode ldap_connecting(struct Curl_easy *data, bool *done)
|
|||||||
|
|
||||||
if(info)
|
if(info)
|
||||||
ldap_memfree(info);
|
ldap_memfree(info);
|
||||||
conn->recv[FIRSTSOCKET] = ldap_recv;
|
conn->recv[FIRSTSOCKET] = oldap_recv;
|
||||||
*done = TRUE;
|
*done = TRUE;
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CURLcode ldap_disconnect(struct Curl_easy *data,
|
static CURLcode oldap_disconnect(struct Curl_easy *data,
|
||||||
struct connectdata *conn, bool dead_connection)
|
struct connectdata *conn,
|
||||||
|
bool dead_connection)
|
||||||
{
|
{
|
||||||
struct ldapconninfo *li = conn->proto.ldapc;
|
struct ldapconninfo *li = conn->proto.ldapc;
|
||||||
(void) dead_connection;
|
(void) dead_connection;
|
||||||
@ -384,7 +385,7 @@ static CURLcode ldap_disconnect(struct Curl_easy *data,
|
|||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
static CURLcode oldap_do(struct Curl_easy *data, bool *done)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = data->conn;
|
struct connectdata *conn = data->conn;
|
||||||
struct ldapconninfo *li = conn->proto.ldapc;
|
struct ldapconninfo *li = conn->proto.ldapc;
|
||||||
@ -429,8 +430,8 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
|
|||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CURLcode ldap_done(struct Curl_easy *data, CURLcode res,
|
static CURLcode oldap_done(struct Curl_easy *data, CURLcode res,
|
||||||
bool premature)
|
bool premature)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = data->conn;
|
struct connectdata *conn = data->conn;
|
||||||
struct ldapreqinfo *lr = data->req.p.ldap;
|
struct ldapreqinfo *lr = data->req.p.ldap;
|
||||||
@ -452,8 +453,8 @@ static CURLcode ldap_done(struct Curl_easy *data, CURLcode res,
|
|||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t ldap_recv(struct Curl_easy *data, int sockindex, char *buf,
|
static ssize_t oldap_recv(struct Curl_easy *data, int sockindex, char *buf,
|
||||||
size_t len, CURLcode *err)
|
size_t len, CURLcode *err)
|
||||||
{
|
{
|
||||||
struct connectdata *conn = data->conn;
|
struct connectdata *conn = data->conn;
|
||||||
struct ldapconninfo *li = conn->proto.ldapc;
|
struct ldapconninfo *li = conn->proto.ldapc;
|
||||||
|
Loading…
Reference in New Issue
Block a user