gbenson 01/10/22 03:48:12
Modified: perl-framework/c-modules/authany mod_authany.c
Log:
fixed for 1.x, and enabled
Revision Changes Path
1.4 +13 -4 httpd-test/perl-framework/c-modules/authany/mod_authany.c
Index: mod_authany.c
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/c-modules/authany/mod_authany.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mod_authany.c 2001/09/08 22:07:14 1.3
+++ mod_authany.c 2001/10/22 10:48:12 1.4
@@ -1,5 +1,3 @@
-#define HTTPD_TEST_REQUIRE_APACHE 2
-
#if CONFIG_FOR_HTTPD_TEST
Alias /authany @DocumentRoot@
@@ -52,6 +50,7 @@
{
const char *sent_pw;
int rc = ap_get_basic_auth_pw(r, &sent_pw);
+ char *user;
if (rc != OK) {
return rc;
@@ -60,11 +59,21 @@
if (require_any_user(r) != OK) {
return DECLINED;
}
+
+#ifdef APACHE1
+ user = r->connection->user;
+#endif
+#ifdef APACHE2
+ user = r->user;
+#endif
- if (!(strtrue(r->user) && strtrue(sent_pw))) {
+ if (!(strtrue(user) && strtrue(sent_pw))) {
ap_note_basic_auth_failure(r);
+#ifdef APACHE1
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ "Both a username and password must be provided");
+#endif
#ifdef APACHE2
- /* prototype is different in 1.x */
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Both a username and password must be provided");
#endif