mod_access.c

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

  1. … 26 more files in changeset.
stop using APLOG_NOERRNO in calls to ap_log_[pr]error()

  1. … 33 more files in changeset.
Update our copyright for this year.

  1. … 260 more files in changeset.
Mixed tabs and spaces within many nexted {}-less if-else expressions

can be very difficult to read. No logic was changed.

Just some style peeves. Tabs and spaces and whatnot.

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>

  1. … 23 more files in changeset.
Add the ability to extend the methods that Apache understands

and have those methods <limit>able in the httpd.conf. It uses

the same bit mask/shifted offset as the original HTTP methods

such as M_GET or M_POST, but expands the total bits from an int to

an ap_int64_t to handle more bits for new request methods than

an int provides.

Submitted by: Cody Sherr <csherr@covalent.net>

  1. … 9 more files in changeset.

More APR_STATUS_IS_ canonicalization

  1. … 1 more file in changeset.
Fix a security exposure in mod_access. Previously when IPv6

listening sockets were used, allow/deny-from-IPv4-address rules

were not evaluated properly (PR #7407). Also, add the ability to

specify IPv6 address strings with optional prefix length on Allow

and Deny.

Note: A bit more of PR #7407 remains dealing with a problem with

double-reverse lookups when an IPv6 listening socket is used.

  1. … 1 more file in changeset.
tweak ap_get_remote_host() so that the caller can find out if she got

back an IP address

mod_access needed to know this, but the old code didn't handle IPv6

  1. … 8 more files in changeset.
Update copyright to 2001

  1. … 205 more files in changeset.
Use apr_want.h to get the declarations for ntohs et al instead of

including the appropriate system header files directly.

This gets rid of a warning for props.c on FreeBSD 3.4 which cropped

up when I included the right header file to get OS/390 to build :)

  1. … 1 more file in changeset.
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

  1. … 26 more files in changeset.
renaming various functions for consistency sake

see: http://apr.apache.org/~dougm/apr_rename.pl

PR:

Obtained from:

Submitted by:

Reviewed by:

  1. … 94 more files in changeset.

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.

  1. … 85 more files in changeset.

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.

  1. … 47 more files in changeset.
Make handlers use hooks.

  1. … 23 more files in changeset.
The local_addr and remote_addr fields in the conn_rec are now

apr_sockaddr_t * instead of sockaddr_in. This is a small step

towards IPv6 support.

  1. … 5 more files in changeset.
Not all platforms have INADDR_NONE defined by default. Apache used to

check for this and the define it if needed. Since APR also needs this

check it makes more sense for APR to just check and export a symobl that

is always available.

Submitted by: Branko �ibej <brane@xbc.nu>

Reviewed by: Ryan Bloom

  1. … 4 more files in changeset.

Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols

for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)

and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.

All _VAR_ flavors changes to _DATA to be absolutely clear.

Thank you Greg, for the most obvious suggestion.

  1. … 102 more files in changeset.

Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...

see src/lib/apr/apr_compat.h for most details.

Also a few minor nits to get Win32 to build.

PR:

Obtained from:

Submitted by:

Reviewed by:

  1. … 73 more files in changeset.
prefix libapr functions and types with apr_

  1. … 143 more files in changeset.
Move all APR functions related to strings to their own directory, and

create a new header for those functions. This is the first step to

removing the apr/lib directory completely, and moving those files/functions

to descriptive directories.

  1. … 36 more files in changeset.
Include strings.h for strcasecmp(), strncasecmp(), and bzero().

Include time.h for time().

This removes a bunch of compiler warnings with gcc -Wall on AIX.

Submitted by: Jeff Trawick, Victor Orlikowski

  1. … 22 more files in changeset.
blast the old names for the status codes

  1. … 26 more files in changeset.
Use the new command-handler initializer macros in mod_access;

clean up the resulting warnings.

Clean up a big chunk of ap_config.h. This basically stops ap_config.h from

including any files. Because of this change, other files must include

their own headers. I also cleaned up a couple of other bugs in some

modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.

The massive configure cleanup is almost done. I will go through the files

one more time after this commit.

  1. … 23 more files in changeset.

PR:

Obtained from:

Submitted by:

Reviewed by:

Reverse out all _EXPORT_VAR changes back to their original _VAR_EXPORT

names for linkage (API_, CORE_, and MODULE_).

  1. … 50 more files in changeset.

This patch corrects the issues from the AP_EXPORT and linkage

specification arguments to the ap_hooks.h declarations. As with

the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,

and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

I will be happy to revert the inclusion of ap_config.h from

httpd.h if this bothers anyone. More individual modules need

to be patched if we do so.

The API_EXPORTs all moved into central storage in the ap_config.h

header. Without WIN32 or API_STATIC compile time declarations,

these macros remain no-ops.

This patch also moves the following data from http_main to http_config:

const char *ap_server_argv0;

const char *ap_server_root;

ap_array_header_t *ap_server_pre_read_config;

ap_array_header_t *ap_server_post_read_config;

ap_array_header_t *ap_server_config_defines;

And the following variables had already moved into ap_hooks.c:

ap_pool_t *g_pHookPool; (initialized now in http_config)

int g_bDebugHooks; (out of http_config)

const char *g_szCurrentHookName; (out of http_config)

The changes to http_main.c are in preparation for that module to

move out to a seperate .exe for win32. Other platforms will be

unaffected, outside of these changes.

  1. … 61 more files in changeset.
add AP_ prefix to *HOOK* macros

  1. … 34 more files in changeset.