Apache2
|
Modules | |
Access Control for Sub-Requests and | |
Macros | |
#define | AP_SUBREQ_NO_ARGS 0 |
#define | AP_SUBREQ_MERGE_ARGS 1 |
#define | MERGE_ALLOW 0 |
#define | REPLACE_ALLOW 1 |
#define | AP_BUCKET_IS_EOR(e) ((e)->type == &ap_bucket_type_eor) |
Variables | |
AP_DECLARE_DATA const apr_bucket_type_t | ap_bucket_type_eor |
#define AP_BUCKET_IS_EOR | ( | e | ) | ((e)->type == &ap_bucket_type_eor) |
Determine if a bucket is an End Of REQUEST (EOR) bucket
e | The bucket to inspect |
#define AP_SUBREQ_MERGE_ARGS 1 |
#define AP_SUBREQ_NO_ARGS 0 |
#define MERGE_ALLOW 0 |
#define REPLACE_ALLOW 1 |
void ap_allow_methods | ( | request_rec * | r, |
int | reset, | ||
... | |||
) |
Add one or more methods to the list permitted to access the resource. Usually executed by the content handler before the response header is sent, but sometimes invoked at an earlier phase if a module knows it can set the list authoritatively. Note that the methods are ADDED to any already permitted unless the reset flag is non-zero. The list is used to generate the Allow response header field when it is needed.
r | The pointer to the request identifying the resource. |
reset | Boolean flag indicating whether this list should completely replace any current settings. |
... | A NULL-terminated list of strings, each identifying a method name to add. |
void ap_allow_standard_methods | ( | request_rec * | r, |
int | reset, | ||
... | |||
) |
Add one or more methods to the list permitted to access the resource. Usually executed by the content handler before the response header is sent, but sometimes invoked at an earlier phase if a module knows it can set the list authoritatively. Note that the methods are ADDED to any already permitted unless the reset flag is non-zero. The list is used to generate the Allow response header field when it is needed.
r | The pointer to the request identifying the resource. |
reset | Boolean flag indicating whether this list should completely replace any current settings. |
... | A list of method identifiers, from the "M_" series defined in httpd.h, terminated with a value of -1 (e.g., "M_GET, M_POST, M_OPTIONS, -1") |
apr_bucket* ap_bucket_eor_create | ( | apr_bucket_alloc_t * | list, |
request_rec * | r | ||
) |
Create a bucket referring to an End Of REQUEST (EOR). This bucket holds a pointer to the request_rec, so that the request can be destroyed right after all of the output has been sent to the client.
list | The freelist from which this bucket should be allocated |
r | The request to destroy when this bucket is destroyed |
apr_bucket* ap_bucket_eor_make | ( | apr_bucket * | b, |
request_rec * | r | ||
) |
Make the bucket passed in an End Of REQUEST (EOR) bucket
b | The bucket to make into an EOR bucket |
r | The request to destroy when this bucket is destroyed |
request_rec* ap_bucket_eor_request | ( | apr_bucket * | b | ) |
Get the request bound to an End Of Request (EOR) bucket.
b | The EOR bucket |
apr_status_t ap_check_pipeline | ( | conn_rec * | c, |
apr_bucket_brigade * | bb, | ||
unsigned int | max_blank_lines | ||
) |
Check whether a connection is still established and has data available, optionally consuming blank lines ([CR]LF).
c | The current connection |
bb | The brigade to filter |
max_blank_lines | Max number of blank lines to consume, or zero to consider them as data (single read). |
void ap_destroy_sub_req | ( | request_rec * | r | ) |
Free the memory associated with a subrequest
r | The subrequest to finish |
void ap_die | ( | int | type, |
request_rec * | r | ||
) |
Kill the current request
type | Why the request is dying |
r | The current request |
int ap_directory_walk | ( | request_rec * | r | ) |
int ap_file_walk | ( | request_rec * | r | ) |
void ap_hook_check_access | ( | ap_HOOK_access_checker_t * | pf, |
const char *const * | aszPre, | ||
const char *const * | aszSucc, | ||
int | nOrder, | ||
int | type | ||
) |
Register a hook function that will apply additional access control to the current request.
pf | An access_checker hook function |
aszPre | A NULL-terminated array of strings that name modules whose hooks should precede this one |
aszSucc | A NULL-terminated array of strings that name modules whose hooks should succeed this one |
nOrder | An integer determining order before honouring aszPre and aszSucc (for example, HOOK_MIDDLE) |
type | Internal request processing mode, either AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF |
void ap_hook_check_access_ex | ( | ap_HOOK_access_checker_ex_t * | pf, |
const char *const * | aszPre, | ||
const char *const * | aszSucc, | ||
int | nOrder, | ||
int | type | ||
) |
Register a hook function that will apply additional access control and/or bypass authentication for the current request.
pf | An access_checker_ex hook function |
aszPre | A NULL-terminated array of strings that name modules whose hooks should precede this one |
aszSucc | A NULL-terminated array of strings that name modules whose hooks should succeed this one |
nOrder | An integer determining order before honouring aszPre and aszSucc (for example, HOOK_MIDDLE) |
type | Internal request processing mode, either AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF |
void ap_hook_check_authn | ( | ap_HOOK_check_user_id_t * | pf, |
const char *const * | aszPre, | ||
const char *const * | aszSucc, | ||
int | nOrder, | ||
int | type | ||
) |
Register a hook function that will analyze the request headers, authenticate the user, and set the user information in the request record.
pf | A check_user_id hook function |
aszPre | A NULL-terminated array of strings that name modules whose hooks should precede this one |
aszSucc | A NULL-terminated array of strings that name modules whose hooks should succeed this one |
nOrder | An integer determining order before honouring aszPre and aszSucc (for example, HOOK_MIDDLE) |
type | Internal request processing mode, either AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF |
void ap_hook_check_autht | ( | ap_HOOK_token_checker_t * | pf, |
const char *const * | aszPre, | ||
const char *const * | aszSucc, | ||
int | nOrder, | ||
int | type | ||
) |
Register a hook function that will analyze the request headers, extract any tokens, and apply and metadata contained in the tokens or keyed against the tokens to the request record.
pf | A token_checker hook function |
aszPre | A NULL-terminated array of strings that name modules whose hooks should precede this one |
aszSucc | A NULL-terminated array of strings that name modules whose hooks should succeed this one |
nOrder | An integer determining order before honouring aszPre and aszSucc (for example, HOOK_MIDDLE) |
type | Internal request processing mode, either AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF |
void ap_hook_check_authz | ( | ap_HOOK_auth_checker_t * | pf, |
const char *const * | aszPre, | ||
const char *const * | aszSucc, | ||
int | nOrder, | ||
int | type | ||
) |
Register a hook function that determine if the resource being requested is available for the currently authenticated user.
pf | An auth_checker hook function |
aszPre | A NULL-terminated array of strings that name modules whose hooks should precede this one |
aszSucc | A NULL-terminated array of strings that name modules whose hooks should succeed this one |
nOrder | An integer determining order before honouring aszPre and aszSucc (for example, HOOK_MIDDLE) |
type | Internal request processing mode, either AP_AUTH_INTERNAL_PER_URI or AP_AUTH_INTERNAL_PER_CONF |
int ap_if_walk | ( | request_rec * | r | ) |
void ap_internal_fast_redirect | ( | request_rec * | sub_req, |
request_rec * | r | ||
) |
Redirect the current request to a sub_req, merging the pools
sub_req | A subrequest created from this request |
r | The current request |
void ap_internal_redirect | ( | const char * | new_uri, |
request_rec * | r | ||
) |
Redirect the current request to some other uri
new_uri | The URI to replace the current request with |
r | The current request |
void ap_internal_redirect_handler | ( | const char * | new_uri, |
request_rec * | r | ||
) |
This function is designed for things like actions or CGI scripts, when using AddHandler, and you want to preserve the content type across an internal redirect.
new_uri | The URI to replace the current request with. |
r | The current request |
int ap_is_initial_req | ( | request_rec * | r | ) |
Determine if the current request is the main request or a subrequest
r | The current request |
int ap_location_walk | ( | request_rec * | r | ) |
void ap_process_async_request | ( | request_rec * | r | ) |
Process a top-level request from a client, allowing some or all of the response to remain buffered in the core output filter for later, asynchronous write completion
r | The current request |
void ap_process_request | ( | request_rec * | r | ) |
Process a top-level request from a client, and synchronously write the response to the client
r | The current request |
void ap_process_request_after_handler | ( | request_rec * | r | ) |
int ap_process_request_internal | ( | request_rec * | r | ) |
An internal handler used by the ap_process_request, all subrequest mechanisms and the redirect mechanism.
r | The request, subrequest or internal redirect to pre-process |
int ap_run_sub_req | ( | request_rec * | r | ) |
Run the handler for the subrequest
r | The subrequest to run |
int ap_some_auth_required | ( | request_rec * | r | ) |
Can be used within any handler to determine if any authentication is required for the current request
r | The current request |
int ap_some_authn_required | ( | request_rec * | r | ) |
Can be used within any handler to determine if any authentication is required for the current request. Note that if used with an access_checker hook, an access_checker_ex hook or an authz provider; the caller should take steps to avoid a loop since this function is implemented by calling these hooks.
r | The current request |
request_rec* ap_sub_req_lookup_dirent | ( | const apr_finfo_t * | finfo, |
const request_rec * | r, | ||
int | subtype, | ||
ap_filter_t * | next_filter | ||
) |
Create a subrequest for the given apr_dir_read result. This subrequest can be inspected to find information about the requested file
finfo | The apr_dir_read result to lookup |
r | The current request |
subtype | What type of subrequest to perform, one of; AP_SUBREQ_NO_ARGS ignore r->args and r->path_info AP_SUBREQ_MERGE_ARGS merge r->args and r->path_info |
next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
request_rec* ap_sub_req_lookup_file | ( | const char * | new_file, |
const request_rec * | r, | ||
ap_filter_t * | next_filter | ||
) |
Create a subrequest for the given file. This subrequest can be inspected to find information about the requested file
new_file | The file to lookup |
r | The current request |
next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
request_rec* ap_sub_req_lookup_uri | ( | const char * | new_uri, |
const request_rec * | r, | ||
ap_filter_t * | next_filter | ||
) |
Create a subrequest from the given URI. This subrequest can be inspected to find information about the requested URI
new_uri | The URI to lookup |
r | The current request |
next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
request_rec* ap_sub_req_method_uri | ( | const char * | method, |
const char * | new_uri, | ||
const request_rec * | r, | ||
ap_filter_t * | next_filter | ||
) |
Create a subrequest for the given URI using a specific method. This subrequest can be inspected to find information about the requested URI
method | The method to use in the new subrequest |
new_uri | The URI to lookup |
r | The current request |
next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
apr_status_t ap_sub_req_output_filter | ( | ap_filter_t * | f, |
apr_bucket_brigade * | bb | ||
) |
An output filter to strip EOS buckets from sub-requests. This always has to be inserted at the end of a sub-requests filter stack.
f | The current filter |
bb | The brigade to filter |
void ap_update_mtime | ( | request_rec * | r, |
apr_time_t | dependency_mtime | ||
) |
Function to set the r->mtime field to the specified value if it's later than what's already there.
r | The current request |
dependency_mtime | Time to set the mtime to |
apr_array_header_t* authn_ap_list_provider_names | ( | apr_pool_t * | ptemp | ) |
apr_array_header_t* authz_ap_list_provider_names | ( | apr_pool_t * | ptemp | ) |
|
extern |
End Of REQUEST (EOR) bucket