diff options
author | Bradley Nicholes <bnicholes@apache.org> | 2007-05-02 18:31:39 +0200 |
---|---|---|
committer | Bradley Nicholes <bnicholes@apache.org> | 2007-05-02 18:31:39 +0200 |
commit | 2874d54f16e14eca65147b5be6d2dc7c5a2dbf54 (patch) | |
tree | 743904530dea969930775ed6fefde953d30456b7 /include/http_core.h | |
parent | Sync with recently backported patches (diff) | |
download | apache2-2874d54f16e14eca65147b5be6d2dc7c5a2dbf54.tar.xz apache2-2874d54f16e14eca65147b5be6d2dc7c5a2dbf54.zip |
re-introduce ap_satisfies API back into core and modify how the access_checker, check_user_id and auth_checker hooks are called so that they respect the precedence that is set through the satisfy ALL/ANY directive. This also restores the directives order, allow, deny, satisfyas supported directives rather than being deprecated. These directives still remain in mod_access_compat however.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@534533 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/http_core.h')
-rw-r--r-- | include/http_core.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/include/http_core.h b/include/http_core.h index d308e424fc..aadab1eb67 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -114,6 +114,13 @@ extern "C" { /** @} // get_remote_host */ +/** all of the requirements must be met */ +#define SATISFY_ALL 0 +/** any of the requirements must be met */ +#define SATISFY_ANY 1 +/** There are no applicable satisfy lines */ +#define SATISFY_NOSPEC 2 + /** Make sure we don't write less than 8000 bytes at any one time. */ #define AP_MIN_BYTES_TO_WRITE 8000 @@ -287,6 +294,18 @@ AP_DECLARE(const char *) ap_auth_type(request_rec *r); */ AP_DECLARE(const char *) ap_auth_name(request_rec *r); +/** + * How the requires lines must be met. + * @param r The current request + * @return How the requirements must be met. One of: + * <pre> + * SATISFY_ANY -- any of the requirements must be met. + * SATISFY_ALL -- all of the requirements must be met. + * SATISFY_NOSPEC -- There are no applicable satisfy lines + * </pre> + */ +AP_DECLARE(int) ap_satisfies(request_rec *r); + #ifdef CORE_PRIVATE /** @@ -649,13 +668,20 @@ APR_DECLARE_OPTIONAL_FN(const char *, ap_ident_lookup, /* ---------------------------------------------------------------------- * - * authorization values with mod_authz_host + * authorization values with mod_authz_core */ APR_DECLARE_OPTIONAL_FN(int, authz_some_auth_required, (request_rec *r)); APR_DECLARE_OPTIONAL_FN(const char *, authn_ap_auth_type, (request_rec *r)); APR_DECLARE_OPTIONAL_FN(const char *, authn_ap_auth_name, (request_rec *r)); +/* ---------------------------------------------------------------------- + * + * authorization values with mod_access_compat + */ + +APR_DECLARE_OPTIONAL_FN(int, access_compat_ap_satisfies, (request_rec *r)); + /* ---------------------------------------------------------------------- */ #ifdef __cplusplus |