77 "text file containing group names and member user IDs"),
81module AP_MODULE_DECLARE_DATA authz_groupfile_module;
83#define VARBUF_INIT_LEN 512
84#define VARBUF_MAX_LEN (16*1024*1024)
106 if ((vb.
buf[0] ==
'#') || (!vb.
buf[0])) {
141 &authz_groupfile_module);
142 char *user =
r->
user;
161 "No group file was specified in the configuration");
170 "Could not open group file: %s",
178 "Authorization of user %s to access %s failed, reason: "
179 "user doesn't appear in group file (%s).",
187 "authz_groupfile authorize: require group: Can't "
188 "evaluate require expression: %s",
err);
200 "Authorization of user %s to access %s failed, reason: "
201 "user is not part of the 'require'ed group(s).",
214 &authz_groupfile_module);
215 char *user =
r->
user;
229 "No group file was specified in the configuration");
237 "Could not open group file: %s",
245 "Authorization of user %s to access %s failed, reason: "
246 "user doesn't appear in group file (%s).",
267 "Authorization of user %s to access %s failed, reason: "
268 "user is not part of the 'require'ed file group.",
277 const char *expr_err =
NULL;
285 "Cannot parse expression in require line: ",
Symbol export macros and hook functions.
APR general purpose library routines.
apr_size_t const unsigned char unsigned int unsigned int d
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
int ap_cfg_closefile(ap_configfile_t *cfp)
apr_status_t ap_pcfg_openfile(ap_configfile_t **ret_cfg, apr_pool_t *p, const char *name)
#define AP_DECLARE_MODULE(foo)
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
apr_status_t ap_varbuf_cfg_getline(struct ap_varbuf *vb, ap_configfile_t *cfp, apr_size_t max_len)
void ap_varbuf_free(struct ap_varbuf *vb)
void ap_varbuf_init(apr_pool_t *pool, struct ap_varbuf *vb, apr_size_t init_size)
#define APR_RETRIEVE_OPTIONAL_FN(name)
#define APR_OPTIONAL_FN_TYPE(name)
#define AP_EXPR_FLAG_STRING_RESULT
#define ap_expr_parse_cmd(cmd, expr, flags, err, lookup_fn)
const char * ap_expr_str_exec(request_rec *r, const ap_expr_info_t *expr, const char **err)
#define STANDARD20_MODULE_STUFF
char * ap_getword(apr_pool_t *p, const char **line, char stop)
char * ap_getword_conf(apr_pool_t *p, const char **line)
#define apr_pool_create(newpool, parent)
apr_int32_t apr_int32_t apr_int32_t err
Authentication and Authorization Extension for Apache.
#define AUTHZ_PROVIDER_VERSION
#define AUTHZ_PROVIDER_GROUP
static apr_status_t groups_for_user(apr_pool_t *p, char *user, char *grpfile, apr_table_t **out)
static apr_OFN_authz_owner_get_file_group_t * authz_owner_get_file_group
static const command_rec authz_groupfile_cmds[]
static void authz_groupfile_getfns(void)
static void register_hooks(apr_pool_t *p)
static void * create_authz_groupfile_dir_config(apr_pool_t *p, char *d)
static const authz_provider authz_group_provider
static authz_status group_check_authorization(request_rec *r, const char *require_args, const void *parsed_require_args)
static const authz_provider authz_filegroup_provider
static authz_status filegroup_check_authorization(request_rec *r, const char *require_args, const void *parsed_require_args)
static const char * groupfile_parse_config(cmd_parms *cmd, const char *require_line, const void **parsed_require_line)
A structure that represents the current request.
struct ap_conf_vector_t * per_dir_config
A structure to keep track of authorization requirements.
Apache resizable variable length buffer library.