Commit Graph

6650 Commits

Author SHA1 Message Date
c9897ccf0c Further mitigation for the TLS renegotation attack, CVE-2009-3555:
* modules/ssl/ssl_engine_kernel.c (has_buffered_data): New function.
  (ssl_hook_Access): Forcibly disable keepalive for the connection if
  there is any buffered data readable from the input filter stack.

* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): Ensure that the
  BIO uses blocking operations when invoked outside direct control of
  the httpd filter stack.

Thanks to Hartmut Keil <Hartmut.Keil adnovum.ch> for proposing this
technique.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@891282 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 15:59:49 +00:00
730a42e334 Fix crash in balancer-manager.
This was due to an incomplete refactoring in
r771940 (switching balancer->workers to an
array of pointers).

It's likely that other balancer functionality
was broken too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@891230 13f79535-47bb-0310-9956-ffa450edef68
2009-12-16 13:24:51 +00:00
e76a453763 Correctly reference the apr_crypto_t context as a context and not a factory,
using the new name apr_crypto_make.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@890581 13f79535-47bb-0310-9956-ffa450edef68
2009-12-15 00:31:39 +00:00
140031be51 * Ensure that the new table values are allocated from the pool of the main
request as they might be added to the header tables of the main request.
  Otherwise these values might become invalid once the subrequest and its
  pool gets destroyed.

PR: 48359
Submitted by: rpluem, niq
Reviewed by: niq


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@889408 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 20:18:05 +00:00
76709be016 Use "=" instead of "==" in test condition for
improved shell compatibility.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@888546 13f79535-47bb-0310-9956-ffa450edef68
2009-12-08 19:46:10 +00:00
33b33d1987 Don't keepalive when we send a non-100 response while Client is expecting 100
and may be feeding us continuation data.
PR 47087


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@888310 13f79535-47bb-0310-9956-ffa450edef68
2009-12-08 10:22:56 +00:00
b0ab99d9d0 fix this:
mod_auth_digest.c: In function ‘set_shmem_size’:
mod_auth_digest.c:681: warning: format ‘%ld’ expects type ‘long int’, but argument 7 has type ‘apr_size_t’


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@886213 13f79535-47bb-0310-9956-ffa450edef68
2009-12-02 17:34:33 +00:00
03a066c10a more NetWare makefile cleanups.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885781 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 15:00:11 +00:00
14f5f18aa4 fixed NetWare proxy export list;
only build mod_serf if we have zlib.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885766 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 14:24:27 +00:00
f568428323 Revert nonsense I introduced in r885689; solve cl test correctly
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885694 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 08:59:41 +00:00
3e338e488c Elaborate on low hanging XXX fruit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885689 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 08:44:11 +00:00
6a6cc5a680 Add mod_proxy_scgi; PR 48303; Submitted by: Gregg L. Smith <lists glewis.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885655 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 02:24:31 +00:00
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
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
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
b5a24b1d4f KeepAlive no longer accepts other than On|Off.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883082 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 14:30:50 +00:00
540ceccf45 Remove errno from dav_error interface. Calls to dav_new_error()
and dav_new_error_tag() must be adjusted to add an apr_status_t parameter.

Reviewed by: jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882274 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 20:09:27 +00:00
d854b9d90c fix or complain about some invalid errno references
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882269 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 20:00:12 +00:00
d5861f048a Add AuthLDAPBindAuthoritative to allow other authentication providers a chance
to run when mod_authnz_ldap finds a user but can't verify their password.

Submitted By: Justin Erenkrantz, Joe Schaefer, Tony Stevenson



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@881808 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 15:49:48 +00:00
a256895c80 * modules/ssl/ssl_engine_kernel.c (ssl_callback_Info): Cast away the
constness of SSL * before calling SSL_get_state, to fix warning with
  older OpenSSLs.

Reported by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@881222 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 09:54:56 +00:00
48726802e1 Build: fix --with-module to work as documented
PR 43881
Submitted: Gez Saunders
Reviewed: Nick Kew



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@880794 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 15:24:34 +00:00
4b0455e133 * Use correct #ifndef's to compile again on openssl 0.9.8 and fix compiler
warnings.

Noted by: sf


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@835046 13f79535-47bb-0310-9956-ffa450edef68
2009-11-11 20:27:10 +00:00
d06145f959 When moving a file over device boundaries and unlinking the source file fails
because it does not exist anymore, don't unlink the destination file.

While it is unclear to me how/when this can happen, at least one user
encountered the problem:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=273476


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834697 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 22:13:50 +00:00
aa875cfd7f Revert removal of the key_type byte in the lock key. There is no need to break
the format on systems without inodes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834533 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 16:32:57 +00:00
6af9d4c85f fix off by one error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834500 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 15:29:04 +00:00
3ce0b4fbcd Fix broken config check for *max timeouts
Fix floating point exception for *minrate == 0


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834499 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 15:27:02 +00:00
b90aee19b9 enable support for ECC keys and ECDH ciphers. Tested against
OpenSSL 1.0.0b3.  [Vipul Gupta vipul.gupta sun.com, Sander Temme]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834378 13f79535-47bb-0310-9956-ffa450edef68
2009-11-10 07:55:13 +00:00
953abd3453 mod_dav_fs: Include uri when logging a PUT error due to connection abort.
PR: 38149


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834245 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 21:32:10 +00:00
710003318f Return 409 instead of 500 for a LOCK request if the parent resource does not
exist or is not a collection.

PR: 43465


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834230 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 21:04:28 +00:00
2cefaf3c32 Fix compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834079 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 14:27:45 +00:00
69cae4bd3f Fix litmus warning: According to RFC2518, COPY to non-existant collection
should give 409 CONFLICT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834073 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 14:10:31 +00:00
539b5f666c Don't delete the whole file if a PUT with content-range failed.
PR: 42896


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834062 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 13:50:21 +00:00
071c3e84f9 Make PUT with DAV_MODE_WRITE_TRUNC create a temporary file first and, when the
transfer has been completed successfully, move it over the old file.

Since this would break inode keyed locking, switch to filename keyed locking
exclusively.

PR: 39815
Submitted by: Paul Querna, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834049 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 13:14:07 +00:00
734abfb1fa Instead of checking device ids, try rename first and in case of EXDEV,
fallback to copy.

From rename(2) on Linux: Linux permits a file system to be mounted at multiple
points, but  rename()  does  not  work  across  different  mount points, even
if the same file system is mounted on both.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834019 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 11:17:01 +00:00
16f79b1337 Also remove trailing whitespace in the value
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834013 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 10:43:16 +00:00
5cd0618812 Simplify code by using apr_strtok
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@834006 13f79535-47bb-0310-9956-ffa450edef68
2009-11-09 09:59:53 +00:00
12e2a81ffc mod_log_config: Make ${cookie}C correctly match whole cookie names
instead of substrings.

PR: 28037
Submitted by: Dan Franklin <dan dan-franklin.com>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833738 13f79535-47bb-0310-9956-ffa450edef68
2009-11-07 19:19:10 +00:00
718a24dd45 * modules/ssl/ssl_engine_kernel.c (ssl_callback_Info): Add parentheses
around bitwise-and.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833593 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 22:51:42 +00:00
39d5d9507b SECURITY: Partial fix for CVE-2009-3555:
Reject client-initiated renegotiations; this is sufficient to prevent
the attack for any configuration which does not require renegotiation
due to per-directory/per-location access control configuration.

Configuration with per-directory/per-location access control
requirements (such as "SSLVerifyClient require") are still vulnerable
to CVE-2009-3555 with this patch applied (if using OpenSSL <= 0.9.8k).

* modules/ssl/ssl_private.h (SSLConnRec): Add reneg_state field.
  (ssl_callback_Info): Renamed from ssl_callback_LogTracingState.

* modules/ssl/ssl_engine_init.c (ssl_init_ctx_callbacks): Install
  the (renamed) info callback unconditionally.

* modules/ssl/ssl_engine_io.c (ssl_filter_ctx_t): Add config pointer
  to SSLConnRec.
  (bio_filter_out_write, bio_filter_in_read): Fail with
  APR_ECONNABORTED if the reneg state is set to RENEG_ABORT.

* modules/ssl/ssl_engine_kernel.c (log_tracing_state): Factored out
  of ssl_callback_LogTracingState.
  (ssl_callback_Info): New function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833582 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 22:33:19 +00:00
4ca6d1cb48 Remove mod_unique_id from the default build.
Reviewed by: sctemme, niq, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833477 13f79535-47bb-0310-9956-ffa450edef68
2009-11-06 17:20:24 +00:00
796d34a469 expose r->notes to lua
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@833141 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 19:31:27 +00:00
cb6e1e0797 * modules/ssl/ssl_toolkit_compat.h: Fix compat with older OpenSSL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832943 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 00:56:06 +00:00
0aa10f9c58 * modules/lua/: s/apr_strnatcmp/strcmp/ - strnat*cmp functions are
for natural order string sorting.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832910 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 23:39:57 +00:00
4ae86f20e4 allow setting of r->user from lua
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832905 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 23:28:22 +00:00
813ff64ace map r->err_headers_out into lua
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832901 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 23:22:15 +00:00
df8d184d40 * modules/filters/mod_include.c (handle_printenv): Fix handling of
lazy variables, courtesy of LLVM scan-build.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832886 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 22:26:23 +00:00
21fa1f365b added back HAVE_OCSP define hack for non-configure platforms, but
only use if HAVE_OCSP is not yet defined as suggested by rpluem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832572 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 21:43:14 +00:00
8abd8d66b3 We now check for OCSP support in configure, so we can lose an OpenSSL version
number check.  Use a type safe STACK.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832496 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 18:19:33 +00:00
e30af9ed74 Fix remaining doxygen warnings. "make dox" is now clean with doxygen
version 1.5.8.

PR: 48093
Submitted by: Brad Hards
Reviewed by: poirier


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832442 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 14:59:24 +00:00
33e15a38e8 more configure-time support for dynamically loadable MPMs:
. axe --with-mpm="shared" hack, replace with --enable-mpms-shared={all|list}
. replace singular MPM_NAME with access to the list of enabled MPMs
. replace singular MPM_SUBDIR with list MPM_SUBDIRS
. enable OS/2 MPM in same manner as others with configure support instead of
  hard-coding in configure.in

Current state: MPMs are built as static archives (but not linked to httpd) with
--enable-mpms-shared, so they still have to be built with apxs to load 
dynamically.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832228 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 00:38:06 +00:00