You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2005/04/08 02:18:37 UTC
svn commit: r160498 - httpd/httpd/trunk/modules/ldap/util_ldap.c
Author: wrowe
Date: Thu Apr 7 17:18:36 2005
New Revision: 160498
URL: http://svn.apache.org/viewcvs?view=rev&rev=160498
Log:
Fix Win32 breakage - these hook providers can't be _DECLARE()ed,
they -would- be _DECLARE_NONSTD ... except that no functions within
mod_ldap need to be exported at all. All functions can be static,
as they are registered via callbacks.
Modified:
httpd/httpd/trunk/modules/ldap/util_ldap.c
Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ldap/util_ldap.c?view=diff&r1=160497&r2=160498
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Thu Apr 7 17:18:36 2005
@@ -124,7 +124,7 @@
* </Location>
*
*/
-int util_ldap_handler(request_rec *r)
+static int util_ldap_handler(request_rec *r)
{
util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(r->server->module_config, &ldap_module);
@@ -157,7 +157,7 @@
* uldap_connection_find() is called this connection will be
* available for reuse.
*/
-LDAP_DECLARE(void) uldap_connection_close(util_ldap_connection_t *ldc)
+static void uldap_connection_close(util_ldap_connection_t *ldc)
{
/*
@@ -184,7 +184,7 @@
* the LDAP server. It is used to bring the connection back to a known
* state after an error, and during pool cleanup.
*/
-LDAP_DECLARE_NONSTD(apr_status_t) uldap_connection_unbind(void *param)
+static apr_status_t uldap_connection_unbind(void *param)
{
util_ldap_connection_t *ldc = param;
@@ -205,7 +205,7 @@
* This function is registered with the pool cleanup function - causing
* the LDAP connections to be shut down cleanly on graceful restart.
*/
-LDAP_DECLARE_NONSTD(apr_status_t) uldap_connection_cleanup(void *param)
+static apr_status_t uldap_connection_cleanup(void *param)
{
util_ldap_connection_t *ldc = param;
@@ -237,8 +237,8 @@
*
* Returns LDAP_SUCCESS on success; and an error code on failure
*/
-LDAP_DECLARE(int) uldap_connection_open(request_rec *r,
- util_ldap_connection_t *ldc)
+static int uldap_connection_open(request_rec *r,
+ util_ldap_connection_t *ldc)
{
int rc = 0;
int failures = 0;
@@ -407,11 +407,12 @@
* and returned to the caller. If found in the cache, a pointer to the existing
* ldc structure will be returned.
*/
-LDAP_DECLARE(util_ldap_connection_t *)
- uldap_connection_find(request_rec *r,
- const char *host, int port,
- const char *binddn, const char *bindpw,
- deref_options deref, int secure) {
+static util_ldap_connection_t *
+ uldap_connection_find(request_rec *r,
+ const char *host, int port,
+ const char *binddn, const char *bindpw,
+ deref_options deref, int secure)
+{
struct util_ldap_connection_t *l, *p; /* To traverse the linked list */
int secureflag = secure;
@@ -554,9 +555,9 @@
*
* The lock for the ldap cache should already be acquired.
*/
-LDAP_DECLARE(int) uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn, const char *reqdn,
- int compare_dn_on_server)
+static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
+ const char *url, const char *dn,
+ const char *reqdn, int compare_dn_on_server)
{
int result = 0;
util_url_node_t *curl;
@@ -677,9 +678,9 @@
* require user cache is owned by the
*
*/
-LDAP_DECLARE(int) uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn,
- const char *attrib, const char *value)
+static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
+ const char *url, const char *dn,
+ const char *attrib, const char *value)
{
int result = 0;
util_url_node_t *curl;
@@ -809,10 +810,11 @@
return result;
}
-LDAP_DECLARE(int) uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *basedn, int scope, char **attrs,
- const char *filter, const char *bindpw, const char **binddn,
- const char ***retvals)
+static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
+ const char *url, const char *basedn,
+ int scope, char **attrs, const char *filter,
+ const char *bindpw, const char **binddn,
+ const char ***retvals)
{
const char **vals = NULL;
int numvals = 0;
@@ -1036,17 +1038,17 @@
return LDAP_SUCCESS;
}
- /*
+/*
* This function will return the DN of the entry matching userid.
* It is used to get the DN in case some other module than mod_auth_ldap
* has authenticated the user.
* The function is basically a copy of uldap_cache_checkuserid
* with password checking removed.
*/
-LDAP_DECLARE(int) uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *basedn, int scope, char **attrs,
- const char *filter, const char **binddn,
- const char ***retvals)
+static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
+ const char *url, const char *basedn,
+ int scope, char **attrs, const char *filter,
+ const char **binddn, const char ***retvals)
{
const char **vals = NULL;
int numvals = 0;
@@ -1226,7 +1228,7 @@
*
* 1 = enabled, 0 = not enabled
*/
-LDAP_DECLARE(int) uldap_ssl_supported(request_rec *r)
+static int uldap_ssl_supported(request_rec *r)
{
util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(
r->server->module_config, &ldap_module);
@@ -1630,7 +1632,7 @@
}
-void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
+static void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
{
util_ldap_state_t *st =
(util_ldap_state_t *)apr_pcalloc(p, sizeof(util_ldap_state_t));