1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

129 Commits

Author SHA1 Message Date
Graham Leggett
7cecbabda3 Avoid unnecessariy initialisation before we test ldap-status handler name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024453 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 22:53:41 +00:00
Stefan Fritsch
73bae8d90f Properly check the result returned by apr_ldap_init: There may have been an
error even if ldc->ldap != NULL.

PR 46076


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986974 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 22:59:45 +00:00
Stefan Fritsch
c3490c3c66 set free()d pointers to NULL to avoid potential use-after-free bugs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982011 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 19:36:03 +00:00
Eric Covener
e842857ce9 whitespace only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@963084 13f79535-47bb-0310-9956-ffa450edef68
2010-07-11 14:50:13 +00:00
Stefan Fritsch
1b34a4369e whitespace/indent fixes
remove a redundant comment


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956377 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 17:10:25 +00:00
Stefan Fritsch
95fe2050a8 - add some trace logging
- stop logging the PID explicitly, this is now always done by ap_log_*error


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956375 13f79535-47bb-0310-9956-ffa450edef68
2010-06-20 16:43:23 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Eric Covener
dd90ac4591 when we actually get a per-server config in a vhost, the shared memory
cache was not in the merged config.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951235 13f79535-47bb-0310-9956-ffa450edef68
2010-06-04 01:58:46 +00:00
William A. Rowe Jr
01d300298f Catch up with ap_[proc|global]_mutex_create api change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@940981 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04 17:40:43 +00:00
Stefan Fritsch
8d143e15c8 fix more errors found by cppcheck
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@930962 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 21:17:08 +00:00
Eric Covener
5b5c5facb0 make some sense of the difference between "Client" and "Global" certs in mod_ldap.
PR46541

Submitted By: Paul Reder, Eric Covener
Reviewed By: Eric Covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@915660 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 04:02:06 +00:00
Eric Covener
9a0ea94ac1 mod_ldap: Eliminate a potential crash with multiple LDAPTrustedClientCert when
some are not password-protected.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@915295 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 12:07:03 +00:00
Stefan Fritsch
006cdf796b Move the ldap_simple_bind() + ldap_result() code implementing a timeout
into a utility function and use it to replace the other occurence of
ldap_simple_bind_s().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@902604 13f79535-47bb-0310-9956-ffa450edef68
2010-01-24 17:14:12 +00:00
Ruediger Pluem
09f43b8aa6 * Fix compiler warning about wrong format
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@898910 13f79535-47bb-0310-9956-ffa450edef68
2010-01-13 19:28:00 +00:00
Stefan Fritsch
e87803f042 Introduce new config option LDAPTimeout to set the timeout for operations
like bind and search.

For operations other than search, the support of the timeout depends on the
LDAP SDK supporting LDAP_OPT_TIMEOUT (e.g. OpenLDAP >= 2.4.4). An exception is
the ldap_simple_bind() in uldap_connection_open(): Here we put some extra
effort into detecting a timeout in a portable way, to catch an idle connection
having been dropped by a firewall.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@898102 13f79535-47bb-0310-9956-ffa450edef68
2010-01-11 23:08:31 +00:00
Guenter Knauf
0cc4a12564 block setting debug level if AP_LDAP_OPT_DEBUG is not defined.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885281 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 22:23:26 +00:00
Jeff Trawick
0644e027f4 tweaks to r883540:
watchdog: use better mutex type name
  ldap/digest: use same FOO_mutex_type variable name as other modules
    for easier searching


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883708 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 14:47:55 +00:00
Jeff Trawick
2e9668a33d Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
and WatchdogMutexPath with a single Mutex directive.  Add APIs to
simplify setup and user customization of APR proc and global mutexes.  
(See util_mutex.h.)  Build-time setting DEFAULT_LOCKFILE is no longer
respected; set DEFAULT_REL_RUNTIMEDIR instead.

Some existing modules, such as mod_ldap and mod_auth_digest gain 
configurability for their mutexes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883540 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:17:51 +00:00
Eric Covener
c09a39aac9 require LDAPReferralHopLimit > 0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831549 13f79535-47bb-0310-9956-ffa450edef68
2009-10-31 15:09:09 +00:00
Eric Covener
5f87e4a3f4 Stop trying to set the referral HOP limit on each connection since most SDKs don't seem
to do anything with it, and causes an error on released openldap levels.  

Also moves/remove some macros internal to mod_ldap out of the public header for a major bump.

Reported against APR in PR47501, but httpd shouldn't be asking for the option
by default.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831542 13f79535-47bb-0310-9956-ffa450edef68
2009-10-31 14:02:04 +00:00
Eric Covener
4e6f442708 add LDAPLibraryDebug directive to mod_ldap to turn on
tracing in underlying LDAP SDK, where all the interesting tidbits
about all kinds of LDAP errors are hidden.

Unfortunately windows doesn't implement this LDAP_OPT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831183 13f79535-47bb-0310-9956-ffa450edef68
2009-10-30 02:07:45 +00:00
Stefan Fritsch
da0e12aacf Work around broken cache management in mod_ldap: If LDAPSharedCacheSize is too
small, try to free some memory by purging the cache and log a warning.

Also increase the default LDAPSharedCacheSize to 500000. This is a more
realistic size suitable for the default values of 1024 for LdapCacheEntries and
LdapOpCacheEntries.

PR: 46749


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@822458 13f79535-47bb-0310-9956-ffa450edef68
2009-10-06 19:39:38 +00:00
Eric Covener
7bf3e4012d Bring the LDAPCacheEntries and LDAPOpCacheEntries usage() in synch with
the manual and the implementation (0 and -1 both disable the cache).

PR 40948


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@814441 13f79535-47bb-0310-9956-ffa450edef68
2009-09-13 23:54:23 +00:00
Jeff Trawick
a6e008c9e2 fix spelling in debug log message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@737582 13f79535-47bb-0310-9956-ffa450edef68
2009-01-25 21:35:44 +00:00
Jeff Trawick
932a6065b2 tweak the referral/hoplimit ldap option logic to save the failure reason in the util_ldap_connection_t for later logging
old error log message:
  auth_ldap authenticate: user wbush authentication failed; URI /ldap-status [(null)][Can't contact LDAP server]
new error log message:
  auth_ldap authenticate: user wbush authentication failed; URI /ldap-status [Unable to set LDAP_OPT_REFHOPLIMIT.][Can't contact LDAP server]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@735068 13f79535-47bb-0310-9956-ffa450edef68
2009-01-16 17:57:52 +00:00
Paul J. Reder
43c90c9fac *) mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init
when result is NULL. This could happen if LDAP initialization failed.
   PR 45994.  [Dan Poirier <poirier pobox.com>]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@727053 13f79535-47bb-0310-9956-ffa450edef68
2008-12-16 14:08:19 +00:00
Ruediger Pluem
7c99ca3f93 * Another set of missed renames.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722544 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 17:57:46 +00:00
Bradley Nicholes
49c238ec40 Move the initialization of rebind to the post_config handler so that it is done during the actual module load stage rather than the preload stage. If done during the preload stage, the pool passed into the initialization function will be cleared and all allocations will be freed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646582 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 22:49:31 +00:00
Eric Covener
2ac9128120 * mod_ldap: Correctly return all requested attribute values
when some attributes have a null value.

PR: 44560 
Submitted by: Anders Kaseorg <anders kaseorg.com>
Reviewed by: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@634821 13f79535-47bb-0310-9956-ffa450edef68
2008-03-07 21:02:41 +00:00
Paul J. Reder
1b6f4a456a The ordering of arguments in the directive desctiptions of LDAPTrustedGlobalCert
and LDAPTrustedClientCert were backwards.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@627637 13f79535-47bb-0310-9956-ffa450edef68
2008-02-14 02:27:26 +00:00
Ruediger Pluem
c0ce91dc70 * Fix a typo (timout -> timeout)
PR: 44360
Submitted by: Rainer Jung <rainer.jung kippdata.de>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@619125 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 19:52:04 +00:00
Paul J. Reder
85b935b3df Reduced the bumpiness (from major to minor) and utilized #defines throughout
(per Ruediger's suggestions). Still looking at the dir merge.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@614747 13f79535-47bb-0310-9956-ffa450edef68
2008-01-24 00:24:01 +00:00
Paul J. Reder
f4e5632d60 This adds Apache support (taking advantage of the new APR capability)
for ldap rebind callback while chasing referrals. This allows direct
searches on LDAP servers (in particular MS Active Directory 2003+)
using referrals without the use of the global catalog.
This addresses PRs 26538, 40268, and 42557



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@614605 13f79535-47bb-0310-9956-ffa450edef68
2008-01-23 18:14:41 +00:00
Eric Covener
5df5e051d8 Review comments from Ruediger on r607766:
Don't allow the ldap calls to be evaluated (twice) in the macro


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607841 13f79535-47bb-0310-9956-ffa450edef68
2008-01-01 13:53:03 +00:00
Eric Covener
7c9503a556 When using the MS SDK, re-establish LDAP backend connections on a
return code of LDAP_UNAVAILABLE as if it were LDAP_SERVER_DOWN.

With this SDK, LDAP_UNAVAIALBLE is returned when the socket had been closed 
between LDAP API calls.

PR 39095



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607766 13f79535-47bb-0310-9956-ffa450edef68
2007-12-31 19:20:25 +00:00
Ruediger Pluem
b514669c7a * Set character set for HTML outputs generated by mod_ldap,
mod_proxy_balancer, mod_proxy_ftp, mod_info, mod_dav without a character
  set to ISO-8859-1.

Submitted by: jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606693 13f79535-47bb-0310-9956-ffa450edef68
2007-12-24 11:45:22 +00:00
Paul J. Reder
29f637596b Final stage in this ldap commitathon. This fixes some problems
associated with processing of subgroup lists. There were some
problems that arose when the cache was referenced across possible
expirations. As of this fix the nested group code (and the caching
of queries related to nested groups) should be working correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@600013 13f79535-47bb-0310-9956-ffa450edef68
2007-11-30 23:39:43 +00:00
Paul J. Reder
b22b6fbd2b Clear the reason pointer when the connection is cleaned. We don't
need to be leaving historical info around.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599657 13f79535-47bb-0310-9956-ffa450edef68
2007-11-30 00:21:06 +00:00
Paul J. Reder
9a99383c08 Get rid of some compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599651 13f79535-47bb-0310-9956-ffa450edef68
2007-11-30 00:11:39 +00:00
Guenter Knauf
f09d5fb701 fixed var declaration in the middle of code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599425 13f79535-47bb-0310-9956-ffa450edef68
2007-11-29 12:56:52 +00:00
Eric Covener
4c46b08b82 Perform all per-LDAP-backend related memory allocations in a standalone pool,
provide a local method to completely remove an LDAP backend connection so
we can someday manage/dispose of extra connections in a reasonable way.

Clarify some commentary around the existing murky close/cleanup API
methods.

Minor bump for new members appended to util_ldap_connection_t, which is not
allocated by consumers of the API.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599164 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 22:19:00 +00:00
Ruediger Pluem
9384f140f7 * No functional change: Style. Fix linebreaks to make code more readable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599150 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 21:17:03 +00:00
Ruediger Pluem
419b6bb2f8 * Remove unused variable and thus remove compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599143 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 20:53:30 +00:00
Ruediger Pluem
41240cbb06 * No need for an else block here because we do a return above.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599141 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 20:52:37 +00:00
Paul J. Reder
ef021964d1 Stage 3 of refactoring. This reverses a couple of if checks so that the code is
easier to follow. The default svn diff looks ugle due to the spacing change. A
cleaner diff ignoring spacing changes can be found at:
http://people.apache.org/~rederpj/util_ldap_ignoring_spacing.diff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@598846 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 01:43:57 +00:00
Paul J. Reder
effa2f7fef Refactoring stage 2. This commit moves a large chunk of utility code out to its own function
to make reading and maintaining the actual subgroup function easier. This should just be
shuffling code around and shouldn't result in any semantic changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@598806 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 23:06:44 +00:00
Paul J. Reder
9ca30c79df Altered some comments and minor formatting of log calls in prep for a refactoring of this routine.
I wanted the diffs to be human readable and understandable. This should just be formatting and
shouldn't alter any semantics.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@598500 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 03:01:25 +00:00
Eric Covener
6aad4298a0 fix to http://svn.apache.org/viewvc?rev=591499&view=rev to properly copy into
char ***retvals when AuthLDAPUrl has extra attributes specified



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@593919 13f79535-47bb-0310-9956-ffa450edef68
2007-11-11 16:14:24 +00:00
Eric Covener
7efb84f750 while technically uldap_connection_cleanup() does leave an entry in the
connection list, it is fully disconnected before it's put back.  My previous
commentary did more harm then good.





git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@593283 13f79535-47bb-0310-9956-ffa450edef68
2007-11-08 20:01:04 +00:00
Eric Covener
30ede8a9cd Stop registering a cleanup on each LDAP connection created, this cleanup was
never called because it's registered against pconf in the child. LDAP
connections are created in the child and not shared between children, so no
action should be required at child exit

Additionally, clarify comments around uldap_connection_cleanup()



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@592764 13f79535-47bb-0310-9956-ffa450edef68
2007-11-07 14:43:26 +00:00