Update of /cvsroot/mod-auth/mod_authn_dbi/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1143/src
Modified Files:
mod_authn_dbi.c
Log Message:
several fixes spotted by Brice Tebbs (again!)
Index: mod_authn_dbi.c
===================================================================
RCS file: /cvsroot/mod-auth/mod_authn_dbi/src/mod_authn_dbi.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** mod_authn_dbi.c 8 Feb 2004 05:55:05 -0000 1.13
--- mod_authn_dbi.c 8 Feb 2004 06:12:31 -0000 1.14
***************
*** 451,455 ****
}
written += strlen(p);
! if (written >= MAX_STRING_LEN) {
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool,
"[mod_authn_dbi.c] Populated string would exceed %d bytes",
--- 451,455 ----
}
written += strlen(p);
! if (written >= MAX_STRING_LEN-1) {
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool,
"[mod_authn_dbi.c] Populated string would exceed %d bytes",
***************
*** 749,753 ****
"[mod_authn_dbi.c] - Server Config for \"%s\" was not found",
dconf->id);
! return ARV;
}
--- 749,753 ----
"[mod_authn_dbi.c] - Server Config for \"%s\" was not found",
dconf->id);
! return AUTH_GENERAL_ERROR;
}
***************
*** 802,809 ****
&& !strcmp(dbi_pass, DBI_EMPTY_PASSWORD)) {
/* This user is configured to be allowed to login without a password (or any other password) */
- ARV = AUTH_GRANTED;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"Accepting user %s without password check.",
user);
}
else {
--- 802,809 ----
&& !strcmp(dbi_pass, DBI_EMPTY_PASSWORD)) {
/* This user is configured to be allowed to login without a password (or any other password) */
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"Accepting user %s without password check.",
user);
+ ARV = AUTH_GRANTED;
}
else {
***************
*** 949,953 ****
"[mod_authn_dbi.c] - Server Config for \"%s\" was not found",
dconf->id);
! return ARV;
}
--- 949,953 ----
"[mod_authn_dbi.c] - Server Config for \"%s\" was not found",
dconf->id);
! return AUTH_GENERAL_ERROR;
}
***************
*** 956,960 ****
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"[mod_authn_dbi.c] - Digest Authentication with AuthnDbiPasswordFormat other than 'Plain' or 'AprDigest' is only supported on quantum computers");
! return AUTH_DENIED;
}
--- 956,960 ----
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"[mod_authn_dbi.c] - Digest Authentication with AuthnDbiPasswordFormat other than 'Plain' or 'AprDigest' is only supported on quantum computers");
! return AUTH_GENERAL_ERROR;
}
***************
*** 1007,1014 ****
else if ((conf->rec.options & DBI_OPTION_EMPTY_PASSWORDS)
&& !strcmp(dbi_pass, DBI_EMPTY_PASSWORD)) {
- ARV = AUTH_GRANTED;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"Accepting user %s without password check.",
user);
}
else {
--- 1007,1014 ----
else if ((conf->rec.options & DBI_OPTION_EMPTY_PASSWORDS)
&& !strcmp(dbi_pass, DBI_EMPTY_PASSWORD)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"Accepting user %s without password check.",
user);
+ ARV = AUTH_GRANTED;
}
else {
***************
*** 1044,1047 ****
--- 1044,1048 ----
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"[mod_authn_dbi.c] Unsupported password format in digest authentication. This is an internal error of mod_authn_dbi");
+ ARV = AUTH_GENERAL_ERROR;
}
}
***************
*** 1063,1066 ****
--- 1064,1068 ----
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"[mod_authn_dbi.c] Query Failed!");
+ ARV = AUTH_GENERAL_ERROR;
}
if (dbi_pass != NULL) {
|