26#define APR_WANT_STRFUNC
43#if !APR_VERSION_AT_LEAST(2,0,0)
48#define AUTHN_CACHE_STORE(r,user,realm,data) \
49 if (authn_cache_store != NULL) \
50 authn_cache_store((r), "dbm", (user), (realm), (data))
71 OR_AUTHCFG,
"dbm database file containing user IDs and passwords"),
74 OR_AUTHCFG,
"what type of DBM file the user file is"),
78module AP_MODULE_DECLARE_DATA authn_dbm_module;
82 const char *user,
char **
value)
84#if APU_MAJOR_VERSION > 1 || (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 7)
92#if APU_MAJOR_VERSION > 1 || (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 7)
97 "could not load '%s' dbm library: %s",
111 "could not open dbm (type %s) file: %s",
116 key.dptr = (
char*)user;
117#ifndef NETSCAPE_DBM_COMPAT
118 key.dsize = strlen(
key.dptr);
120 key.dsize = strlen(
key.dptr) + 1;
173 const char *realm,
char **
rethash)
apr_size_t const unsigned char unsigned int unsigned int d
APR Versioning Interface.
APR Standard Headers Support.
APR-util Versioning Interface.
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
#define AP_DECLARE_MODULE(foo)
const char * ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
void ap_hook_optional_fn_retrieve(ap_HOOK_optional_fn_retrieve_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
const char * ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
apr_status_t ap_register_auth_provider(apr_pool_t *pool, const char *provider_group, const char *provider_name, const char *provider_version, const void *provider, int type)
#define AP_AUTH_INTERNAL_PER_CONF
const char const apr_dbd_driver_t ** driver
#define APR_RETRIEVE_OPTIONAL_FN(name)
#define APR_OPTIONAL_FN_TYPE(name)
#define STANDARD20_MODULE_STUFF
const char const char * password
apr_int32_t apr_int32_t apr_int32_t err
Authentication and Authorization Extension for Apache.
#define AUTHN_PROVIDER_VERSION
#define AUTHN_PROVIDER_GROUP
static const authn_provider authn_dbm_provider
static const command_rec authn_dbm_cmds[]
static void opt_retr(void)
static void register_hooks(apr_pool_t *p)
static void * create_authn_dbm_dir_config(apr_pool_t *p, char *d)
#define AUTHN_CACHE_STORE(r, user, realm, data)
static apr_OFN_ap_authn_cache_store_t * authn_cache_store
static authn_status get_dbm_realm_hash(request_rec *r, const char *user, const char *realm, char **rethash)
static apr_status_t fetch_dbm_value(request_rec *r, const char *dbmtype, const char *dbmfile, const char *user, char **value)
static authn_status check_dbm_pw(request_rec *r, const char *user, const char *password)
static void ap_authn_cache_store(request_rec *r, const char *module, const char *user, const char *realm, const char *data)
A structure that represents the current request.
struct ap_conf_vector_t * per_dir_config