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
André Malo
a3a4b01dc1 drop the guess_domain function.
Our docs say about AuthDigestDomain:
This directive should always be specified and contain at least the (set of)
root URI(s) for this space. Omitting to do so will cause the client to send
the Authorization header for every request sent to this server.

guessing the parameter is somewhat bogus. guess_domain() also resulted sometimes
in relative URIs, non-URI strings or empty strings, which caused a lot of
problems.
According to the docs, the domain parameter will be omitted now,
if not specified. This is exactly, what one would expect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98636 13f79535-47bb-0310-9956-ffa450edef68
2003-02-13 02:28:57 +00:00
André Malo
da9f328380 Do not use local paths for the domain parameter on non-unix systems.
PR: 16937


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98610 13f79535-47bb-0310-9956-ffa450edef68
2003-02-11 02:08:01 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
André Malo
ee354d8caa make provider selection available in .htaccess files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98146 13f79535-47bb-0310-9956-ffa450edef68
2003-01-01 16:40:42 +00:00
Wilfredo Sanchez
4273951026 outch. there are some possible NULL pointer references. Have you ever tried
AuthDigestProvider dbm? This results in a great kaboom. The patch makes
apache throw an error, if someone tries a provider, that doesn't support
the particular auth scheme.

Submitted by:	Andre Malo <nd@perlig.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97802 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 21:13:07 +00:00
Wilfredo Sanchez
1f8f74d25c when asking the providers for authentication, the main loop should
not only  break, if access is granted. It should also break, if
access was *denied*  by one provider. To be safe, it has to break
also, if an error occured. So  the patch turns the condition around
and continues only, if the user was  not found.
I find it also weird, that if auth was denied (by password
usually), the  AuthBasicAuthoritative behaviour can override that
by "passing to lower  modules". The patch changes that behaviour,
too.

Justin notes:
I'm kind of on the fence about that.  I was originally thinking
optimistically, but yeah, it might make sense to do it
pessimistically.  If there's any error, bug out.

Submitted by:	Andre Malo <nd@perlig.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97801 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 21:10:37 +00:00
Justin Erenkrantz
1efa9fe703 Per Greg's request, add a version string component to the ap_provider.h
functions.  This allows modules to register different versions of the
same provider.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97696 13f79535-47bb-0310-9956-ffa450edef68
2002-11-30 18:48:41 +00:00
Justin Erenkrantz
7efe307731 Add ap_register_provider and ap_lookup_provider functions which resolve
the DSO link problems for DAV and the new aaa modules by moving the
provider code into the core of the server and generalizing them to be
used by any code.

Remove the auth{nz}_*_provider functions as they are no longer needed.

Change the dav_*_provider functions to wrap the ap_*_provider functions
as they have a bit more of a historical precedent that we should keep
around.

Reviewed by:	John K. Sterling <john@sterls.com> (in concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96919 13f79535-47bb-0310-9956-ffa450edef68
2002-09-20 00:57:50 +00:00
Justin Erenkrantz
913278e702 Add ability to use multiple providers for basic and digest authentication.
The syntax is:

AuthBasicProvider file dbm
AuthUserFile conf/basic-user
AuthDBMUserFile conf/basic-user-dbm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96869 13f79535-47bb-0310-9956-ffa450edef68
2002-09-18 01:05:25 +00:00
Justin Erenkrantz
20202e5cdc Stage #2 of aaa rewrite: Add provider support so that mod_authn_* modules
do not have to re-implement basic auth and to allow mod_auth_digest (and
other modules) to leverage the authn backends.

Adds AuthBasicProvider and AuthDigestProvider directives.

This also moves a lot of the basic auth handling code inside of mod_auth_basic
(but does not remove the code in server/protocol.c - that will have to wait
for a version bump so that we don't totally bust old modules).

This patch incorporates code review comments by Greg Stein.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96739 13f79535-47bb-0310-9956-ffa450edef68
2002-09-10 06:57:03 +00:00
Justin Erenkrantz
9cdc0f0ce9 Stage #1 of the aaa rewrite - refactoring modules.
All modules are reorganized under the following scheme:
- mod_auth_*:   Front-end (basic, digest)
- mod_authn_*:  Authentication (anon, dbm, default, file)
- mod_authz_*:  Authorization (dbm, default, groupfile, host, user)

This passes the httpd-test suite when it accounts for the renaming of
aaa modules.

Originally written by: Dirk-Willem van Gulik
Completed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96728 13f79535-47bb-0310-9956-ffa450edef68
2002-09-10 00:15:39 +00:00
Victor J. Orlikowski
d982829aa1 Continue the Bill Rowe apr_size_t crusade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 06:01:14 +00:00
Brian Pane
6cbe41d3fe use new time conversion macros in place of APR_USEC_PER_SEC
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95961 13f79535-47bb-0310-9956-ffa450edef68
2002-07-05 00:53:12 +00:00
William A. Rowe Jr
5cf5552b11 Use lowercased macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95620 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 22:27:37 +00:00
William A. Rowe Jr
271ee8497b Use the new APR_TIME_FROM_SEC() wrapper
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95616 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 16:56:27 +00:00
Jeff Trawick
bc0cf18899 stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95151 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:33:10 +00:00
Bradley Nicholes
a05adbc9f5 By using _setn instead of _set, this call is setting a pointer to a stack variable
in the hash entry.  Once initialize_module() returns, the key pointer in the
hash entry is invalid.  This causes a fault the next time that the hash entry
key is checked.  Calling the _set() version will store a copy of the key which
has the same lifetime as the hash table entry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94914 13f79535-47bb-0310-9956-ffa450edef68
2002-05-02 22:03:58 +00:00
Roy T. Fielding
108504ab8b kill a warning on Darwin for NONCE_LEN becoming a long int by math.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94833 13f79535-47bb-0310-9956-ffa450edef68
2002-04-28 09:02:19 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Aaron Bannert
bdf5fe9280 Convert mod_auth_digest to use the new apr_global_mutex_t type.
Added some comments that will help us make this more portable.
tmpnam() is not portable to platforms that will not inhereit
the process, so we need to pull the lock filename from somewhere
shared, like a configuration directive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93533 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 17:00:50 +00:00
Bradley Nicholes
6bff0e6ab3 Added some type casting to the appropriate types to avoid type mismatches
on the CodeWarrior compiler


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93066 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 00:23:30 +00:00
William A. Rowe Jr
73430e922d Fixing the apr_shm_ and apr_rmm_ args back to a warning state was good.
Enabling APR_HAS_SHARED_MEMORY again in the previous patch was bad.

  This can be toggled once we straighten out all the pointers into offsets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92794 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 02:58:10 +00:00
William A. Rowe Jr
7e1113f913 This patch eliminated from the _SHARED_ segment of the scoreboard all
pointer math.  This is required for portable scoreboards.

  vhost becomes the 'vhost name string' so it now survives ap_generation
  clicks.  next was apparently never used.

  This patch also accounts for the changes to the apr_shm api, and gives
  Win32 the magic of a shared scoreboard.

  Breakage aplenty on non-win32 platforms, I suspect, but this radical
  surgery, and culling of unused functions, was really, really needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92791 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 00:28:00 +00:00
Jeff Trawick
57b42f96ac handle the disappearance of apr_lock_create_np() and
apr_proc_mutex_create_np() and the new parameter to
apr_lock_create() and apr_proc_mutex_create()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92653 13f79535-47bb-0310-9956-ffa450edef68
2001-12-29 23:16:24 +00:00
William A. Rowe Jr
b04cdf141a Error feedback, PLEASE!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92645 13f79535-47bb-0310-9956-ffa450edef68
2001-12-29 03:34:33 +00:00
Aaron Bannert
130eaf6e95 Two fixes in one:
- No longer calls exit() when the secret fails to initialize, instead
  post_config just returns !OK and lets the server bail out.

- No longer fails on DSOs -- since we load-unload-reload DSOs we lose
  any static memory that was initialized during the first load.
  This patch allows us to simply pass on the first call to post_config,
  and then do the initialization in the second call.

Tested to work on Linux from an IE5.0 client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92630 13f79535-47bb-0310-9956-ffa450edef68
2001-12-27 21:36:10 +00:00
Aaron Bannert
470adc87c8 Style changes only. Lots of tab alignment issues, and added lots of
extra {} blocks. I first ran it through M-x untabify, then went through
the whole thing by hand, then compiled/tested it. This is a preemptive
style-strike.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92626 13f79535-47bb-0310-9956-ffa450edef68
2001-12-27 19:40:15 +00:00
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
Doug MacEachern
2090fa8748 adjust to apr_uri_ rename
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90361 13f79535-47bb-0310-9956-ffa450edef68
2001-08-19 16:01:05 +00:00
Jeff Trawick
c216c2184a fix some homophonic issues in comments, as well as some
mispelings found near "its" or "it's"

(helping our 4th grader with homework, couldn't help but
grep)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90173 13f79535-47bb-0310-9956-ffa450edef68
2001-08-15 21:11:59 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
Roy T. Fielding
43b9634ceb Moved util_uri to apr-util/uri/apr_uri, which means adding the apr_
prefix to all of the uri functions (yuck), changing some includes,
and using APR error codes instead of HTTP-specific error codes.

Other notes to test this patch:
- You need to delete the util_uri.h file - exports picks up on this.
- I'd like to remove the apr_uri.h from httpd.h, but that might
  increase the complexity of this patch even further.  Once this patch
  is accepted (in some form), then I can focus on removing apr_uri.h
  from httpd.h entirely.  I need baby steps (heh) right now.
- I imagine that this might break a bunch of stuff in Win32 or other OS
  builds with foreign dependency files.  Any help here is appreciated.

This is a start...  -- justin

Submitted by:	Justin Erenkrantz
Reviewed by:	Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89198 13f79535-47bb-0310-9956-ffa450edef68
2001-05-22 01:31:12 +00:00
Ben Laurie
6dbc2131e3 Fix warnings.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89173 13f79535-47bb-0310-9956-ffa450edef68
2001-05-20 11:58:03 +00:00
Ryan Bloom
d7ba749612 We don't really treat this field as a const, and currently we are getting
warnings because on line 536, we are trying to assign a non-const to a
const.  This started happening after a fix for Windows.  This change should
solve the problem on all systems.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88860 13f79535-47bb-0310-9956-ffa450edef68
2001-04-14 23:00:28 +00:00
William A. Rowe Jr
5cba2e14a8 Clean up a yet a couple more emits
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88798 13f79535-47bb-0310-9956-ffa450edef68
2001-04-10 20:45:39 +00:00
Chuck Murcko
93463cfc17 This is a fix that went into v1.3 quite a while back, but not into v2.0.
It sorts out the problem when a password protected reverse proxy URL
sends a Proxy-Authenticate to a browser instead of a WWW-Authenticate.

This patch covers the changes to the httpd-2.0 tree.

Submitted by:	Graham Leggett
Reviewed by:	Chuck Murcko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88527 13f79535-47bb-0310-9956-ffa450edef68
2001-03-16 07:28:08 +00:00
Greg Stein
8bcd220ae9 Don't directly include ap_config_auto.h directly. It isn't available on
Windows platforms. Including ap_config.h will pick it up, or it will grab
the appropriate Windows header/defines.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88402 13f79535-47bb-0310-9956-ffa450edef68
2001-03-01 00:55:03 +00:00
William A. Rowe Jr
5cccb4a478 Clean up namespace badness with s/configfile_t/ap_configfile_t/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88312 13f79535-47bb-0310-9956-ffa450edef68
2001-02-25 00:51:32 +00:00
Jeff Trawick
3351f1b91f clean up a call to apr_psprintf() (trailing NULL not needed)
previously:
mod_auth_digest.c: In function `set_shmem_size':
mod_auth_digest.c:625: warning: too many arguments for format


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88275 13f79535-47bb-0310-9956-ffa450edef68
2001-02-22 14:22:39 +00:00
Doug MacEachern
18f173e918 rename miss: s/apr_clear_pool/apr_pool_clear/g
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88232 13f79535-47bb-0310-9956-ffa450edef68
2001-02-19 02:06:58 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +00:00
Martin Kraemer
e7d5943f28 Rename the module structures so that the exported symbol matches
the file name, and it is easier to automate the installation
process (generating LoadModule directives from the module filenames).

Next step is to remove the 4th argument to the APACHE_MODULE macro
completely and require people to use the matching names, and to
reduce the LoadModule directive to 1 argument.... Objections?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88189 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 13:38:31 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Doug MacEachern
ac5b27b86d doh. need a spellchekker for these rename scripts. s/apr_lock_aquire/apr_lock_acquire/g;
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88150 13f79535-47bb-0310-9956-ffa450edef68
2001-02-13 23:32:28 +00:00
Jeff Trawick
9e95d8139c clean up more warnings and link problems after the header file
shuffle


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88075 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 00:09:40 +00:00
Greg Stein
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +00:00
Jeff Trawick
4ab13e2afe Make a mod_auth_digest build fail in a less mysterious way on systems
without APR random number support (e.g., a stock Tru64 system).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88023 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 14:39:31 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00