Update of /cvsroot/mod-auth/mod_authn_dbi/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21133/src
Modified Files:
mod_authn_dbi.c
Log Message:
Removed 'native' SHA1 Support. This is now included in apr-util.
Index: mod_authn_dbi.c
===================================================================
RCS file: /cvsroot/mod-auth/mod_authn_dbi/src/mod_authn_dbi.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mod_authn_dbi.c 8 Feb 2004 06:12:31 -0000 1.14
+++ mod_authn_dbi.c 8 Feb 2004 21:47:23 -0000 1.15
@@ -21,8 +21,6 @@
* Paul Querna
* Axel Grossklaus
*
- * based on mod_authn_mysql
- *
*/
#include "../include/mod_authn_dbi_config.h"
@@ -95,8 +93,7 @@
typedef enum pw_format_enum
{
plain,
- apr, /* handles crypt & md5 through apr_password_validate() */
- aprsha1,
+ apr, /* handles crypt, sha1 & md5 through apr_password_validate() */
aprdig
/*
* Possible other formats to consider:
@@ -523,9 +520,6 @@
else if (!strcasecmp(value, "Apr")) {
temp->rec.password_format = apr;
}
- else if (!strcasecmp(value, "AprSHA1")) {
- temp->rec.password_format = aprsha1;
- }
else if (!strcasecmp(value, "AprDigest")) {
temp->rec.password_format = aprdig;
}
@@ -645,7 +639,7 @@
AP_INIT_TAKE2("AuthnDbiPasswordFormat", set_dbi_switch_conf,
(void *) CONF_DBI_PASSWORD_FORMAT,
RSRC_CONF,
- "The format the password is saved as (Plain, Apr, AprSHA1 or AprDigest)"),
+ "The format the password is saved as (Plain, Apr, or AprDigest)"),
AP_INIT_TAKE2("AuthnDbiIsActiveField", set_dbi_switch_conf,
(void *) CONF_DBI_IS_ACTIVE_FIELD,
RSRC_CONF,
@@ -825,13 +819,14 @@
case apr:
/*
* This handles the password through the aprutil library.
- * At the moment, the supported formats are crypt (on *nix only) and MD5.
+ * At the moment, the supported formats are crypt (on *nix only), SHA1 and MD5.
* Other formats will transparently be supported as they become
* available in libaprutil.
*
* Examples are:
* crypt O8D24p2LCO7PA
* md5 $apr1$SvzPV/..$CJl3oQ/ko4Tq5eg6L2Fk..
+ * sha1 {SHA}C+7Hteo/D9vJXQ3UfzxbwnXaijM=
*/
#ifndef SKIP_APR_PWCHECK
@@ -870,28 +865,6 @@
}
break;
- case aprsha1:
- /* sha1:{SHA}C+7Hteo/D9vJXQ3UfzxbwnXaijM= */
-
- if (strlen(dbi_pass) == 38) {
- apr_sha1_base64(password, strlen(password),
- crypt_pass);
- if (strcmp(dbi_pass, crypt_pass) != 0) {
- ARV = AUTH_DENIED;
- }
- else {
- ARV = AUTH_GRANTED;
- }
- }
- else {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "[mod_authn_dbi.c] Invalid SHA1-format entry in password field of user %s in config %s. Length is %d",
- user, conf->rec.dbi_name,
- strlen(dbi_pass));
- ARV = AUTH_GENERAL_ERROR;
- }
- break;
-
case aprdig:
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"[mod_authn_dbi.c] - AprDig format is not supported for Basic Authentication.");
|