You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2001/10/05 02:53:14 UTC
cvs commit: apache-1.3/src/modules/standard mod_auth.c
coar 01/10/04 17:53:14
Modified: src/modules/standard mod_auth.c
Log:
Fix the file-owner and file-group processing; I inadvertently
added them as 'and' operations, so if they were specified but
not matched, nothing else could match either. Fixed..
Revision Changes Path
1.57 +15 -13 apache-1.3/src/modules/standard/mod_auth.c
Index: mod_auth.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -u -r1.56 -r1.57
--- mod_auth.c 2001/09/12 15:48:01 1.56
+++ mod_auth.c 2001/10/05 00:53:14 1.57
@@ -279,9 +279,10 @@
*/
if (strcmp(w, "file-owner") == 0) {
#if defined(WIN32) || defined(NETWARE) || defined(OS2)
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
- "'Require file-user' not supported on this platform");
- return HTTP_UNAUTHORIZED;
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r,
+ "'Require file-user' not supported "
+ "on this platform, ignored");
+ continue;
#else
struct passwd *pwent;
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
@@ -307,32 +308,33 @@
return OK;
}
else {
- return HTTP_UNAUTHORIZED;
+ continue;
}
}
#endif
}
if (strcmp(w, "file-group") == 0) {
#if defined(WIN32) || defined(NETWARE) || defined(OS2)
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
- "'Require file-group' not supported on this platform");
- return HTTP_UNAUTHORIZED;
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r,
+ "'Require file-group' not supported "
+ "on this platform, ignored");
+ continue;
#else
struct group *grent;
if (sec->auth_grpfile == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r,
"no AuthGroupFile, so 'file-group' "
- "requirement fails for file '%s'",
+ "requirement cannot succeed for file '%s'",
r->filename);
- return HTTP_UNAUTHORIZED;
+ continue;
}
if (grpstatus == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, r,
"authenticated user '%s' not a member of "
"any groups, so 'file-group' requirement "
- "fails for file '%s'",
+ "cannot succeed for file '%s'",
user, r->filename);
- return HTTP_UNAUTHORIZED;
+ continue;
}
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
"checking for 'group' access for file '%s'",
@@ -357,7 +359,7 @@
return OK;
}
else {
- return HTTP_UNAUTHORIZED;
+ continue;
}
}
#endif