const char *);
API_EXPORT_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *,
void *, const char *);
-API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *, char *, int);
-API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, char *);
+API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *, void *, int);
+API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, const char *);
/* For modules which need to read config files, open logs, etc. ...
* this returns the fname argument if it begins with '/'; otherwise
return sec;
}
-static const char *set_auth_slot(cmd_parms *cmd, void *offset, char *f, char *t)
+static const char *set_auth_slot(cmd_parms *cmd, void *offset, const char *f,
+ const char *t)
{
if (t && strcmp(t, "standard"))
return ap_pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
static const command_rec auth_cmds[] =
{
- {"AuthUserFile", set_auth_slot,
- (void *) XtOffsetOf(auth_config_rec, auth_pwfile), OR_AUTHCFG, TAKE12,
- "text file containing user IDs and passwords"},
- {"AuthGroupFile", set_auth_slot,
- (void *) XtOffsetOf(auth_config_rec, auth_grpfile), OR_AUTHCFG, TAKE12,
- "text file containing group names and member user IDs"},
- {"AuthAuthoritative", ap_set_flag_slot,
- (void *) XtOffsetOf(auth_config_rec, auth_authoritative),
- OR_AUTHCFG, FLAG,
- "Set to 'no' to allow access control to be passed along to lower modules if the UserID is not known to this module"},
+ AP_INIT_TAKE12("AuthUserFile", set_auth_slot,
+ (void *) XtOffsetOf(auth_config_rec, auth_pwfile), OR_AUTHCFG,
+ "text file containing user IDs and passwords"),
+ AP_INIT_TAKE12("AuthGroupFile", set_auth_slot,
+ (void *) XtOffsetOf(auth_config_rec, auth_grpfile), OR_AUTHCFG,
+ "text file containing group names and member user IDs"),
+ AP_INIT_FLAG("AuthAuthoritative", ap_set_flag_slot,
+ (void *) XtOffsetOf(auth_config_rec, auth_authoritative),
+ OR_AUTHCFG,
+ "Set to 'no' to allow access control to be passed along to lower "
+ "modules if the UserID is not known to this module"),
{NULL}
};
}
API_EXPORT_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd,
- char *struct_ptr, int arg)
+ void *struct_ptr_v, int arg)
{
/* This one's pretty generic too... */
int offset = (int) (long) cmd->info;
+ char *struct_ptr = (char *)struct_ptr_v;
*(int *) (struct_ptr + offset) = arg ? 1 : 0;
return NULL;
}
-API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_ptr, char *arg)
+API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_ptr,
+ const char *arg)
{
/* Prepend server_root to relative arg.
This allows .htaccess to be independent of server_root,
char *p;
int offset = (int) (long) cmd->info;
if (ap_os_is_path_absolute(arg))
- p = arg;
+ p = ap_pstrdup(cmd->pool, arg);
else
p = ap_make_full_path(cmd->pool, ap_server_root, arg);
*(char **) (struct_ptr + offset) = p;