You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/10/30 20:52:11 UTC
cvs commit: apache-2.0/src/modules/standard mod_auth_anon.c
rbb 00/10/30 11:52:10
Modified: src/modules/standard mod_auth_anon.c
Log:
Get mod_auth_anon to compile cleanly in 2.0
Revision Changes Path
1.18 +29 -24 apache-2.0/src/modules/standard/mod_auth_anon.c
Index: mod_auth_anon.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_anon.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mod_auth_anon.c 2000/10/16 06:05:04 1.17
+++ mod_auth_anon.c 2000/10/30 19:52:09 1.18
@@ -100,6 +100,7 @@
#include "http_log.h"
#include "http_protocol.h"
#include "http_request.h"
+#include "apr_strings.h"
typedef struct auth_anon {
char *password;
@@ -137,41 +138,48 @@
}
static const char *anon_set_passwd_flag(cmd_parms *cmd,
- anon_auth_config_rec * sec, int arg)
+ void *dummy, int arg)
{
+ anon_auth_config_rec *sec = dummy;
sec->auth_anon_mustemail = arg;
return NULL;
}
static const char *anon_set_userid_flag(cmd_parms *cmd,
- anon_auth_config_rec * sec, int arg)
+ void *dummy, int arg)
{
+ anon_auth_config_rec *sec = dummy;
sec->auth_anon_nouserid = arg;
return NULL;
}
+
static const char *anon_set_logemail_flag(cmd_parms *cmd,
- anon_auth_config_rec * sec, int arg)
+ void *dummy, int arg)
{
+ anon_auth_config_rec *sec = dummy;
sec->auth_anon_logemail = arg;
return NULL;
}
+
static const char *anon_set_verifyemail_flag(cmd_parms *cmd,
- anon_auth_config_rec * sec, int arg)
+ void *dummy, int arg)
{
+ anon_auth_config_rec *sec = dummy;
sec->auth_anon_verifyemail = arg;
return NULL;
}
static const char *anon_set_authoritative_flag(cmd_parms *cmd,
- anon_auth_config_rec * sec, int arg)
+ void *dummy, int arg)
{
+ anon_auth_config_rec *sec = dummy;
sec->auth_anon_authoritative = arg;
return NULL;
}
static const char *anon_set_string_slots(cmd_parms *cmd,
- anon_auth_config_rec * sec, char *arg)
+ void *dummy, const char *arg)
{
-
+ anon_auth_config_rec *sec = dummy;
auth_anon *first;
if (!(*arg))
@@ -180,10 +188,8 @@
/* squeeze in a record */
first = sec->auth_anon_passwords;
- if (
- (!(sec->auth_anon_passwords = (auth_anon *) apr_palloc(cmd->pool, sizeof(auth_anon)))) ||
- (!(sec->auth_anon_passwords->password = arg))
- )
+ if (!(sec->auth_anon_passwords = apr_palloc(cmd->pool, sizeof(auth_anon))) ||
+ !(sec->auth_anon_passwords->password = apr_pstrdup(cmd->pool, arg)))
return "Failed to claim memory for an anonymous password...";
/* and repair the next */
@@ -194,19 +200,18 @@
static const command_rec anon_auth_cmds[] =
{
- {"Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG, ITERATE,
- "a space-separated list of user IDs"},
- {"Anonymous_MustGiveEmail", anon_set_passwd_flag, NULL, OR_AUTHCFG, FLAG,
- "Limited to 'on' or 'off'"},
- {"Anonymous_NoUserId", anon_set_userid_flag, NULL, OR_AUTHCFG, FLAG,
- "Limited to 'on' or 'off'"},
-{"Anonymous_VerifyEmail", anon_set_verifyemail_flag, NULL, OR_AUTHCFG, FLAG,
- "Limited to 'on' or 'off'"},
- {"Anonymous_LogEmail", anon_set_logemail_flag, NULL, OR_AUTHCFG, FLAG,
- "Limited to 'on' or 'off'"},
- {"Anonymous_Authoritative", anon_set_authoritative_flag, NULL, OR_AUTHCFG, FLAG,
- "Limited to 'on' or 'off'"},
-
+ AP_INIT_ITERATE("Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG,
+ "a space-separated list of user IDs"),
+ AP_INIT_FLAG("Anonymous_MustGiveEmail", anon_set_passwd_flag, NULL,
+ OR_AUTHCFG, "Limited to 'on' or 'off'"),
+ AP_INIT_FLAG("Anonymous_NoUserId", anon_set_userid_flag, NULL, OR_AUTHCFG,
+ "Limited to 'on' or 'off'"),
+ AP_INIT_FLAG("Anonymous_VerifyEmail", anon_set_verifyemail_flag, NULL,
+ OR_AUTHCFG, "Limited to 'on' or 'off'"),
+ AP_INIT_FLAG("Anonymous_LogEmail", anon_set_logemail_flag, NULL, OR_AUTHCFG,
+ "Limited to 'on' or 'off'"),
+ AP_INIT_FLAG("Anonymous_Authoritative", anon_set_authoritative_flag, NULL,
+ OR_AUTHCFG, "Limited to 'on' or 'off'"),
{NULL}
};