Commit Graph

232 Commits

Author SHA1 Message Date
bc84971437 Fix segfault with Solaris LDAP SDK when enabling ldaps.
Enable SSL by passing secure=1 to apr_ldap_init instead of calling
apr_ldap_set_option(... APR_LDAP_OPT_TLS ...).

This change carefully avoids any change of behavior on non-Solaris LDAP SDKs.

PR: 42682


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209601 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 17:44:09 +00:00
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
93e479669b no termination of the loop in 1166823.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166839 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 18:26:54 +00:00
81097d5190 mod_ldap: Optional function uldap_ssl_supported(r) always returned false
if called from a virtual host with mod_ldap directives in it.  Did not
affect mod_authnz_ldap's usage of mod_ldap.  [Eric Covener]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166823 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 17:37:46 +00:00
c2236c7cbf The default timeout value of 10s lives in two places, the per-server config
and in this initialization. Drop the latter and check to see if a timeout
is requested in the per-server config.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166662 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 12:53:06 +00:00
5124ad1b62 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
2011-08-14 22:19:09 +00:00
ead0bcf35c add a static method to retrieve the LDAP errno, and call from a
few other paths that have us returning LDAP_OTHER (since
only 'server down' is retryable, we want to work hard to get
it returned when appropriate)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157677 13f79535-47bb-0310-9956-ffa450edef68
2011-08-14 22:03:02 +00:00
f19641462b Compare value instead of string pointer
Remove unused label
Remove unused var


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157357 13f79535-47bb-0310-9956-ffa450edef68
2011-08-13 09:14:33 +00:00
a68a8e4918 Accept LDAP_OPT_CONNECT_TIMEOUT as an alternative to LDAP_OPT_NETWORK_TIMEOUT.
An alternative on at least some IBM client libraries:

  http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.IBMDS.doc/progref281.htm#opttimeout



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1157111 13f79535-47bb-0310-9956-ffa450edef68
2011-08-12 13:56:54 +00:00
f5b63175fc mod_ldap: remove hard-coded loops of 10 retries w/o delay with a configurable
number of retries (LDAPRetries, default 3) and configurable delay between 
retries (LDAPRetryDelay, no delay by default).

The LDAP connection is re-initted every other retry, instead of
on the fifth retry -- this was a much more recent addition then
the basic looping behavior.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1156790 13f79535-47bb-0310-9956-ffa450edef68
2011-08-11 20:05:18 +00:00
293bffa871 Try to obtain the specific LDAP error code returned during a failed
ldap_simple_bind(). 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1156001 13f79535-47bb-0310-9956-ffa450edef68
2011-08-10 02:06:52 +00:00
2d0c55080a Enable ldap modules in 'all' and 'most' selections if ldap is compiled into
apr-util


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154114 13f79535-47bb-0310-9956-ffa450edef68
2011-08-05 08:01:31 +00:00
5ae1ca60bc Bring part some parts of r1142938 which were removed
by the big ldap revert r1150179.

Original commit log:

Use APR_ADDTO instead of APR_SETVAR or direct
variable assignment.

...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1150231 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 22:24:55 +00:00
602791140b Revert r1129808:
Incorporate the ap_ldap incomplete API, as there is no interest or effort
    at APR to make this a complete abstraction, and it was voted 'off the island'
    with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
    or apr+util 1.x.

This also reverts part of r1142938, which needs to be re-done.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150172 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:29:42 +00:00
9674eb32cb Revert r1129886:
Shift declaration logic of LDAP_DECLARE to ap_ldap.h from util_ldap.h



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150169 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:21:02 +00:00
6e1307b58e Revert r1129891:
LDAP_DECLARE Header adjustment for nw/win32



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150168 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:19:55 +00:00
33bbd1f6da Revert r1129956:
Fix include path relative to modules/ldap/



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150167 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:19:04 +00:00
97b5d740f8 Revert r1130186:
PR51307: Fix ldap_rebind build error when ldap is enabled and APR is built without threads.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150166 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:18:15 +00:00
533704a7fa Revert r1131393:
Several fixes for the ap_ldap build logic. This should fix compilation
    without --with-ldap.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150165 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:16:54 +00:00
2d42def875 Revert r1140069:
Fix load order dependencies in LDAP code by switching to use of APR
    optional functions for the inter-module API...



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:10:49 +00:00
596a9f614b Revert r1141201:
Fix compilation error due to missing LDAP_DECLARE definition



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/revert-ap-ldap@1150162 13f79535-47bb-0310-9956-ffa450edef68
2011-07-23 17:08:43 +00:00
a68daf2a82 Allow to specify module specific custom linker flags
via the MOD_XXX_LDADD variables.

Use APR_ADDTO instead of APR_SETVAR or direct
variable assignment.

This is especially useful when building mod_lua
or mod_deflate against a lua resp. libz which
are installed in non-standard locations.
One can add "-R ..." to MOD_LUA_LDADD and
MOD_DEFLATE_LDADD before configure to fix
the RPATH/RUNPATH of those modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142938 13f79535-47bb-0310-9956-ffa450edef68
2011-07-05 09:24:23 +00:00
d37c52a6e4 Silence compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142733 13f79535-47bb-0310-9956-ffa450edef68
2011-07-04 16:37:46 +00:00
fa569e11bd Fix compilation error due to missing LDAP_DECLARE definition
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1141201 13f79535-47bb-0310-9956-ffa450edef68
2011-06-29 19:12:03 +00:00
559c6ae018 Fix load order dependencies in LDAP code by switching to use of APR
optional functions for the inter-module API:

* modules/ldap/ldap_private.h: New file, containing "real" function
  declarations, copied from...

* include/ap_ldap.h.in, include/ap_ldap_url.h,
  include/ap_ldap_option.h, include/ap_ldap_init.h,
  include/ap_ldap_rebind.h: ... here.  All declarations changed to APR
  optional function declarations.

* modules/ldap/util_ldap.c (util_ldap_register_hooks): Register all
  the new optional functions.

* modules/aaa/mod_authnz_ldap.c (ImportULDAPOptFn): Pick up optional
  function stub for ap_ldap_url_parse.
  (mod_auth_ldap_parse_url): Use it here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1140069 13f79535-47bb-0310-9956-ffa450edef68
2011-06-27 09:27:04 +00:00
4bc8885d8d Fix "statement not reached" warnings with sun cc
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1139391 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 17:59:44 +00:00
ec64e1a29f Several fixes for the ap_ldap build logic. This should fix compilation
without --with-ldap.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1131393 13f79535-47bb-0310-9956-ffa450edef68
2011-06-04 13:31:49 +00:00
02bbc3848e PR51307: Fix ldap_rebind build error when ldap is enabled and APR is built without threads.
Submitted By: Philipp <pippo deo.li>
Reviewed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1130186 13f79535-47bb-0310-9956-ffa450edef68
2011-06-01 15:25:20 +00:00
fbd4b6ee73 Fix include path relative to modules/ldap/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129956 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 22:59:53 +00:00
ffb3338389 LDAP_DECLARE Header adjustment for nw/win32
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129891 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 20:02:03 +00:00
07c1a9d29c Shift declaration logic of LDAP_DECLARE to ap_ldap.h from util_ldap.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129886 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 19:57:07 +00:00
37770675d7 Incorporate the ap_ldap incomplete API, as there is no interest or effort
at APR to make this a complete abstraction, and it was voted 'off the island'
with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
or apr+util 1.x.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129808 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 17:10:11 +00:00
6eaa4a5590 Fix double free in out-of-mem situation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096855 13f79535-47bb-0310-9956-ffa450edef68
2011-04-26 19:17:16 +00:00
46dc6e060b mod_ldap: Make LDAPSharedCacheSize 0 create a non-shared-memory cache per
process as opposed to disabling caching completely. This allows to use
the non-shared-memory cache as a workaround for the shared memory cache
not being available during graceful restarts

PR: 48958


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096577 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 20:00:43 +00:00
07eb9d7796 Note util_ldap.h for convenience
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086462 13f79535-47bb-0310-9956-ffa450edef68
2011-03-29 01:52:52 +00:00
cdba63f119 always use (via break) the LDAP connection we're looking at once it's a match,
whether it's used as-is or has just been unbound.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086433 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 22:43:08 +00:00
4355155ced fix incorrect type of LDAP connection pool member, fix naming fors
style guidlines



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086432 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 22:40:20 +00:00
888ec80125 Use a var INSTALLBASE to simplify NetWare installation rules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 04:56:06 +00:00
bab978c56e Use var for prelude so its possible to change it at one place.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082811 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 03:09:27 +00:00
05e818b8b2 change all the negative values for LDAPConnPoolTTL into
-2 (AP_LDAP_CONNPOOL_INFINITE), so we can't get confused 
over -1 (AP_LDAP_CONNPOOL_DEFAULT) being merged.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081146 13f79535-47bb-0310-9956-ffa450edef68
2011-03-13 16:45:06 +00:00
7dbcca96c1 *) mod_ldap: Add LDAPConnectionPoolTTL to give control over lifetime
of bound backend LDAP connections.  PR47634 [Eric Covener]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081007 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 21:42:36 +00:00
813da4a81f ifdef 0-out uldap_connection_remove(), which is not part of the API and
currently has no callers. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081006 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 21:20:23 +00:00
03c032b4e4 Lay some groundwork for improvements to the connection pool.
remove unnecessary uldap_connection_cleanup (nothing needed between unbind 
  and remove)

  properly remove rebind callback info when credentials change

  maintain a separate pool for the rebind callback storage so it can be cleared
  when the connection is unbound.

(major bump for util_ldap function removal)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081005 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 21:18:21 +00:00
2d471132db whitespace-only: re-indent the blocks I wrapped in an if with r1080922
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080923 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 12:03:59 +00:00
9885316bba avoid apr_ldap_rebind_{add,remove} when referral chasing is turned off
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080922 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 12:02:40 +00:00
4598f1a7d4 fix some grammar mistakes, mostly in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 00:35:39 +00:00
e8a8becc0f NetWare build overhaul in order to compile on Linux.
Removed absolute paths to imp files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079487 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 18:59:02 +00:00
46b7e1d210 NetWare build overhaul in order to compile on Linux.
Take 1.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079407 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 16:04:40 +00:00