mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
s/lderrno/uldap_ld_errno, but keep it internal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157678 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -449,7 +449,7 @@ static int uldap_connection_init(request_rec *r,
|
|||||||
return(rc);
|
return(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lderrno(util_ldap_connection_t *ldc)
|
static int uldap_ld_errno(util_ldap_connection_t *ldc)
|
||||||
{
|
{
|
||||||
int ldaprc;
|
int ldaprc;
|
||||||
#ifdef LDAP_OPT_ERROR_NUMBER
|
#ifdef LDAP_OPT_ERROR_NUMBER
|
||||||
@@ -460,6 +460,7 @@ static int lderrno(util_ldap_connection_t *ldc)
|
|||||||
#endif
|
#endif
|
||||||
return LDAP_OTHER;
|
return LDAP_OTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Replacement function for ldap_simple_bind_s() with a timeout.
|
* Replacement function for ldap_simple_bind_s() with a timeout.
|
||||||
* To do this in a portable way, we have to use ldap_simple_bind() and
|
* To do this in a portable way, we have to use ldap_simple_bind() and
|
||||||
@@ -475,13 +476,13 @@ static int uldap_simple_bind(util_ldap_connection_t *ldc, char *binddn,
|
|||||||
int msgid = ldap_simple_bind(ldc->ldap, binddn, bindpw);
|
int msgid = ldap_simple_bind(ldc->ldap, binddn, bindpw);
|
||||||
if (msgid == -1) {
|
if (msgid == -1) {
|
||||||
ldc->reason = "LDAP: ldap_simple_bind() failed";
|
ldc->reason = "LDAP: ldap_simple_bind() failed";
|
||||||
return lderrno(ldc);
|
return uldap_ld_errno(ldc);
|
||||||
}
|
}
|
||||||
rc = ldap_result(ldc->ldap, msgid, 0, timeout, &result);
|
rc = ldap_result(ldc->ldap, msgid, 0, timeout, &result);
|
||||||
if (rc == -1) {
|
if (rc == -1) {
|
||||||
ldc->reason = "LDAP: ldap_simple_bind() result retrieval failed";
|
ldc->reason = "LDAP: ldap_simple_bind() result retrieval failed";
|
||||||
/* -1 is LDAP_SERVER_DOWN in openldap, use something else */
|
/* -1 is LDAP_SERVER_DOWN in openldap, use something else */
|
||||||
return lderrno(ldc);
|
return uldap_ld_errno(ldc);
|
||||||
}
|
}
|
||||||
else if (rc == 0) {
|
else if (rc == 0) {
|
||||||
ldc->reason = "LDAP: ldap_simple_bind() timed out";
|
ldc->reason = "LDAP: ldap_simple_bind() timed out";
|
||||||
@@ -489,7 +490,7 @@ static int uldap_simple_bind(util_ldap_connection_t *ldc, char *binddn,
|
|||||||
} else if (ldap_parse_result(ldc->ldap, result, &rc, NULL, NULL, NULL,
|
} else if (ldap_parse_result(ldc->ldap, result, &rc, NULL, NULL, NULL,
|
||||||
NULL, 1) == -1) {
|
NULL, 1) == -1) {
|
||||||
ldc->reason = "LDAP: ldap_simple_bind() parse result failed";
|
ldc->reason = "LDAP: ldap_simple_bind() parse result failed";
|
||||||
return lderrno(ldc);
|
return uldap_ld_errno(ldc);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user