1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

472 Commits

Author SHA1 Message Date
Chris Darroch
85e7288fb5 whitespace cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724813 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09 18:40:18 +00:00
Bradley Nicholes
3a3dd65e29 Remove the ap_session_get, ap_session_set export references for the NetWare build
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@710140 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 19:36:47 +00:00
Ruediger Pluem
4ca264abc8 * Better use calloc instead of alloc to initialize unset fields in struct.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709881 13f79535-47bb-0310-9956-ffa450edef68
2008-11-02 13:38:11 +00:00
Chris Darroch
cf4e94f55e Remove mod_authn_default and mod_authz_default.
Note: I've attempted to work through the Windows and Netware build files,
but if those with such systems could repair any damage, that would be
appreciated.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709839 13f79535-47bb-0310-9956-ffa450edef68
2008-11-02 04:21:48 +00:00
Chris Darroch
fa0fdfa2fc Fix handling of authz configurations, make default authz logic replicate
2.2.x authz logic and support existing configurations (including .htaccess
files), and replace <Satisfy*>, Reject, and AuthzMergeRules directives
with Match, <Match*>, and AuthzMerge directives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709838 13f79535-47bb-0310-9956-ffa450edef68
2008-11-02 04:01:32 +00:00
Chris Darroch
54a737b120 minor formatting changes prior to larger changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709754 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 19:03:56 +00:00
Chris Darroch
8fee2005b0 remove unused variables, rename some variables, move and change
variable initializations, etc., prior to larger changes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709751 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 18:58:49 +00:00
Chris Darroch
6bfd10b3d9 prevent crash when authz provider not registered prior to use in alias
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709746 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 18:28:17 +00:00
Chris Darroch
99b3df75de move some variable initializations prior to larger changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709742 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 18:22:55 +00:00
Chris Darroch
a7e48ffbbb localize some variables in authz provider alias functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709736 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 17:58:19 +00:00
Chris Darroch
8564ca3ee9 move function prior to larger changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709728 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 17:24:57 +00:00
Chris Darroch
6200ffa41e remove unused AUTHZ_GROUP_NOTE define
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709708 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 15:01:35 +00:00
Chris Darroch
44de43a894 remove trailing whitespace, adjust formatting and comments prior
to larger changes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709705 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 14:50:30 +00:00
Chris Darroch
097b993e8e Add AuthType of None to support disabling authentication.
Prevent crash when provider alias created to provider which is not
yet registered.
Migrate remaining functionality of mod_authn_default to mod_authn_core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709553 13f79535-47bb-0310-9956-ffa450edef68
2008-10-31 20:18:07 +00:00
Chris Darroch
704feaaeb3 Implement checks for NULL r->user as per r705361.
NOTE: If someone with an LDAP setup can ensure this compiles and works,
that would be great.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@707183 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 20:11:07 +00:00
Chris Darroch
84687933eb Prior to authn/z refactoring in r368027, if authorization Require
directives had no matching AuthType and associated authentication
directives, requests would generally fall through in the
check_user_id hook to mod_authn_default.c's authentication_no_user()
handler, which returned DECLINED if ap_auth_type() was not set.
The ap_process_request_internal() function in request.c would handle
this case by logging an "AuthType not set!" error and returning
HTTP_INTERNAL_SERVER_ERROR.

The refactoring removes this error handling in request.c, so
individual modules will need to test for a lack of authentication,
as necessary.  Since some modules such as mod_authz_host.c support
Require directives that do not need any authentication, the
mod_authn_default.c handler no longer returns DECLINED if ap_auth_type()
is not set.  (Also, mod_authn_default can be compiled out with
--disable-authn-default, so it can't be relied upon to exist.)

Since r->user may now be NULL, individual handlers must test for that
case when necessary.  Otherwise, most Require directives in the
absence of AuthType directives cause handlers to crash while performing
strcmp() and friends on a NULL r->user value.

NOTE: I can't test mod_authnz_ldap.c myself, so I'm not sure if it
needs similar fixes.  On the one hand, a NULL r->user in the authz
handlers always generates a log message.  However, it appears that
authn_ldap_build_filter() will sometimes then be called, perform no
action, which may result in a possibly uninitialized filtbuf buffer
being passed to util_ldap_cache_getuserdn().  I don't know if that
could cause problems in the LDAP cache code.  If someone familiar with
LDAP authz could take a look, that would be much appreciated.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@705361 13f79535-47bb-0310-9956-ffa450edef68
2008-10-16 21:09:27 +00:00
Nick Kew
e8dd90b487 mod_authnz_ldap: avoid returning NULL env vars
PR 39045


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@693328 13f79535-47bb-0310-9956-ffa450edef68
2008-09-09 00:52:03 +00:00
Graham Leggett
84e0e4f48d mod_auth_form: Make sure that basic authentication is correctly
faked directly after login.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@690506 13f79535-47bb-0310-9956-ffa450edef68
2008-08-30 13:48:47 +00:00
Graham Leggett
2af7a38d72 Remove trailing spaces (on the insistence of Eclipse).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@690505 13f79535-47bb-0310-9956-ffa450edef68
2008-08-30 13:47:05 +00:00
Graham Leggett
0529fe2737 mod_auth_form: Make sure the logged in user is populated correctly
after a form login. Fixes a missing REMOTE_USER variable directly
following a login.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@690493 13f79535-47bb-0310-9956-ffa450edef68
2008-08-30 11:11:21 +00:00
Eric Covener
49168ab41a propogate a NULL get_realm_hash() implementation from AuthnProviderAlias back
to mod_auth_digest.  PR 45196



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@678949 13f79535-47bb-0310-9956-ffa450edef68
2008-07-22 23:53:23 +00:00
Eric Covener
bb7398fce0 revert r672639 which lacked a necessary major bump, add a major MMN bump
to account for the short-lived API addition/removal.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@678947 13f79535-47bb-0310-9956-ffa450edef68
2008-07-22 23:49:51 +00:00
Eric Covener
b159abbf7a caught by Ruediger
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@672671 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 20:09:45 +00:00
Eric Covener
bbc850ee33 mod_auth_digest: Detect during startup when AuthDigestProvider
is configured to use an incompatible provider via AuthnProviderAlias.
PR 45196 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@672639 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 16:42:43 +00:00
Bradley Nicholes
47f3698bf3 Switch the default base authz logic operation to 'AND' rather than 'OR'. This should allow directory authz rules merging to be more restrictive in sub-directories
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@667651 13f79535-47bb-0310-9956-ffa450edef68
2008-06-13 20:59:10 +00:00
Jim Jagielski
5ebf4a21e5 Allow for negation of env check as well...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@667513 13f79535-47bb-0310-9956-ffa450edef68
2008-06-13 13:02:09 +00:00
William A. Rowe Jr
1ed653d36a Catch up with a host of changes to the current module set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664240 13f79535-47bb-0310-9956-ffa450edef68
2008-06-07 02:10:32 +00:00
William A. Rowe Jr
11492551fa If we are submitting 2GB login forms, there is a very serious,
serious problem.  The len and form_size of size_t should be
adaquate, clean up the rest of the size/off mismatches.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664230 13f79535-47bb-0310-9956-ffa450edef68
2008-06-07 01:10:50 +00:00
William A. Rowe Jr
df5ca37b48 As this is consumed by the core, mod_auth must reside in
the serverwide include/'s.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664169 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 22:34:44 +00:00
William A. Rowe Jr
a020591640 For *trunk/* development, presume at least apr-1.3 (now released) for
seperation of ldap link options.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@663663 13f79535-47bb-0310-9956-ffa450edef68
2008-06-05 17:12:22 +00:00
Bradley Nicholes
e86828739b Add an include path to mod_request.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@659642 13f79535-47bb-0310-9956-ffa450edef68
2008-05-23 19:51:12 +00:00
Chris Darroch
fc21f4e72e Determine registered authn/z providers directly in ap_setup_auth_internal(),
which allows optional functions that just wrapped ap_list_provider_names()
to be removed from authn/z modules.

This change requires modules/aaa/mod_auth.h to be included into
server/request.c, which necessitates a minor change to configure.in for
Unix platforms.

I'm unable to tell whether a similar change is necessary for Windows and
NetWare builds or not.  Could developers with access to those platforms
please test and make any needed configuration or build alterations?  Thanks!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@659160 13f79535-47bb-0310-9956-ffa450edef68
2008-05-22 17:01:14 +00:00
Chris Darroch
9864958fcd Convert common provider version strings ("0") to
AUTHN/Z_PROVIDER_VERSION macros defined in mod_auth.h.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@658046 13f79535-47bb-0310-9956-ffa450edef68
2008-05-19 23:53:05 +00:00
Graham Leggett
4e084cccd6 Make sure the optional function calls are used for ap_session_set and
ap_session_get. [Brad Nicholes]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655205 13f79535-47bb-0310-9956-ffa450edef68
2008-05-10 22:57:36 +00:00
Roy T. Fielding
45e2cb08b4 fix uninitialized variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@655017 13f79535-47bb-0310-9956-ffa450edef68
2008-05-10 06:44:44 +00:00
Graham Leggett
00db8a73d2 mod_auth_form: Make sure the input filter stack is properly set
up before reading the login form. Make sure the kept body filter
is correctly inserted to ensure the body can be read a second
time safely should the authn be successful. [Graham Leggett,
Ruediger Pluem]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654958 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 22:15:37 +00:00
Graham Leggett
d5c7f53e1e Remove C++ style comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@652683 13f79535-47bb-0310-9956-ffa450edef68
2008-05-01 21:59:13 +00:00
Graham Leggett
23ff756ed4 Ensure that the REMOTE_USER variable is correctly written when the user
has been authenticated from a session.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649113 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 14:03:14 +00:00
Graham Leggett
e1cb99ff36 Fix the optional declarations so that the modules will build clean in
a mod_so environment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649109 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 13:59:51 +00:00
Graham Leggett
b613588a30 Move the KeptBodySize directive, kept_body filters and the
ap_parse_request_body function out of the http module and into a
new module called mod_request, reducing the size of the core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@647263 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 18:41:53 +00:00
Chris Darroch
8e69b9c41b Let each consumer of authn providers redefine the list_provider_names
callback in case they are loaded individually without mod_authn_core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646445 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 17:25:33 +00:00
Guenter Knauf
34a76aedbb added mod_auth_form to NetWare build.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646307 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 12:42:26 +00:00
Guenter Knauf
7f6a84a6a9 No var declarations in the middle of the code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646305 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 12:40:14 +00:00
Graham Leggett
786afc76bd mod_auth_form: Add a module capable of allowing end users to log
in using an HTML form, storing the credentials within mod_session.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646285 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 11:46:46 +00:00
Paul Querna
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Chris Darroch
c8ba67fb83 Avoid calling access control hooks for internal requests with
configurations which match those of the initial request.  Revert to
the original behaviour (call access control hooks for internal requests
with URIs different from the initial request) if any access control hooks
or providers are not registered as permitting this optimization.
Introduce wrappers for access control hook and provider registration
which can accept additional mode and flag data.

The configuration walk optimizations were originally proposed a while
ago (see http://marc.info/?l=apache-httpd-dev&m=116536713506234&w=2);
they have been used since then in production systems and appear to be
stable and effective.  They permit certain combinations of modules
and clients to function efficiently, especially when a deeply recursive
series of internal requests, such as those generated by certain WebDAV
requests, are all subject to the identical authentication and authorization
directives.

The major change from the original proposal is a cleaner mechanism for
detecting modules which may expect the old behaviour.  This has been
tested successfully with Subversion's mod_authz_svn, which specifically
requires the old behaviour when performing path-based authorization based
against its own private access control configuration files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@644525 13f79535-47bb-0310-9956-ffa450edef68
2008-04-03 21:51:07 +00:00
Chris Darroch
0b2f9c920e Return AUTHZ_GRANTED not AUTHZ_DENIED when redirecting after
successful login/logout.  Use redirection URL from first row returned
by DB query, in the same manner as that used by mod_authn_dbd when
querying for a single record.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@640932 13f79535-47bb-0310-9956-ffa450edef68
2008-03-25 18:21:32 +00:00
Chris Darroch
99aab143e9 PR #43210: Disambiguate and tidy database authentication error messages.
Based on patch from Phil Endecott.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@639079 13f79535-47bb-0310-9956-ffa450edef68
2008-03-19 23:57:00 +00:00
Eric Covener
e5143bc75a return AUTHZ_GRANTED instead of OK from the LDAP nested group checking.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@633620 13f79535-47bb-0310-9956-ffa450edef68
2008-03-04 20:20:00 +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