httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/main http_request.c
Date Sat, 15 Nov 1997 03:29:58 GMT
dgaudet     97/11/14 19:29:58

  Modified:    src      CHANGES
               src/main http_request.c
  Log:
  Lars says:
  
  if a user tries to use authentication and forgets to set AuthType
  he will the following error:
  
   configuration error:  couldn't check user.  No user file?
  
  The appended patch provides a correct error message if the
  authentication failure was due to a missing AuthType directive.
  
  Submitted by:	Lars Eilebrecht
  Reviewed by:	Dean Gaudet, Martin Kraemer, Roy Fielding
  
  Revision  Changes    Path
  1.512     +3 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.511
  retrieving revision 1.512
  diff -u -r1.511 -r1.512
  --- CHANGES	1997/11/14 16:07:22	1.511
  +++ CHANGES	1997/11/15 03:29:55	1.512
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) Give a more informative error when no AuthType is set.
  +     [Lars Eilebrecht]
  +
     *) Remove strtoul() use from mod_proxy because it isn't available
        on all platforms.   [Marc Slemko] PR#1214
   
  
  
  
  1.93      +20 -10    apachen/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- http_request.c	1997/11/08 21:39:11	1.92
  +++ http_request.c	1997/11/15 03:29:57	1.93
  @@ -1065,28 +1065,38 @@
               return;
           }
           if (some_auth_required(r)) {
  -            if ((access_status = check_user_id(r)) != 0) {
  -                decl_die(access_status, "check user.  No user file?", r);
  +            if (((access_status = check_user_id(r)) != 0) || !auth_type(r)) {
  +                decl_die(access_status, auth_type(r)
  +		    ? "check user.  No user file?"
  +		    : "perform authentication. AuthType not set!", r);
                   return;
               }
  -            if ((access_status = check_auth(r)) != 0) {
  -                decl_die(access_status, "check access.  No groups file?", r);
  +            if (((access_status = check_auth(r)) != 0) || !auth_type(r)) {
  +                decl_die(access_status, auth_type(r)
  +		    ? "check access.  No groups file?"
  +		    : "perform authentication. AuthType not set!", r);
                   return;
               }
           }
           break;
       case SATISFY_ANY:
  -        if ((access_status = check_access(r)) != 0) {
  +        if (((access_status = check_access(r)) != 0) || !auth_type(r)) {
               if (!some_auth_required(r)) {
  -                decl_die(access_status, "check access", r);
  +                decl_die(access_status, auth_type(r)
  +		    ? "check access"
  +		    : "perform authentication. AuthType not set!", r);
                   return;
               }
  -            if ((access_status = check_user_id(r)) != 0) {
  -                decl_die(access_status, "check user.  No user file?", r);
  +            if (((access_status = check_user_id(r)) != 0) || !auth_type(r)) {
  +                decl_die(access_status, auth_type(r)
  +		    ? "check user.  No user file?"
  +		    : "perform authentication. AuthType not set!", r);
                   return;
               }
  -            if ((access_status = check_auth(r)) != 0) {
  -                decl_die(access_status, "check access.  No groups file?", r);
  +            if (((access_status = check_auth(r)) != 0) || !auth_type(r)) {
  +                decl_die(access_status, auth_type(r)
  +		    ? "check access.  No groups file?"
  +		    : "perform authentication. AuthType not set!", r);
                   return;
               }
           }
  
  
  

Mime
View raw message