httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/aaa mod_authz_user.c
Date Mon, 06 Jan 2003 06:13:44 GMT
nd          2003/01/05 22:13:44

  Modified:    modules/aaa mod_authz_user.c
  Log:
  some cleanup.
  - The weird bit mask handling is not really neccessary.
  - call ap_note_auth_failure instead of ap_note_basic_auth_failure
  
  Revision  Changes    Path
  1.3       +5 -18     httpd-2.0/modules/aaa/mod_authz_user.c
  
  Index: mod_authz_user.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authz_user.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_authz_user.c	8 Dec 2002 21:16:05 -0000	1.2
  +++ mod_authz_user.c	6 Jan 2003 06:13:44 -0000	1.3
  @@ -111,7 +111,7 @@
                                                          &authz_user_module);
       char *user = r->user;
       int m = r->method_number;
  -    int method_restricted = 0;
  +    int required_user = 0;
       register int x;
       const char *t, *w;
       const apr_array_header_t *reqs_arr = ap_requires(r);
  @@ -131,10 +131,6 @@
               continue;
           }
   
  -        /* Note that there are applicable requirements 
  -         */
  -        method_restricted |= 1;
  -
           t = reqs[x].requirement;
           w = ap_getword_white(r->pool, &t);
           if (!strcmp(w, "valid-user")) {
  @@ -144,7 +140,7 @@
               /* And note that there are applicable requirements 
                * which we consider ourselves the owner of.
                */
  -            method_restricted |= 2;
  +            required_user = 1;
               while (t[0]) {
                   w = ap_getword_conf(r->pool, &t);
                   if (!strcmp(user, w)) {
  @@ -154,17 +150,8 @@
           }
       }
   
  -    if (method_restricted == 0) {
  -        /* no applicable requirements at all */
  -        return DECLINED;
  -    }
  -    /* There are require methods which we do not
  -     * understand. 
  -     */
  -    if ((method_restricted & 2) == 0) {
  -        /* no requirements of which we consider ourselves
  -         * the owner.
  -         */
  +    if (!required_user) {
  +        /* no applicable requirements */
           return DECLINED;
       }
   
  @@ -177,7 +164,7 @@
                     "'require'ments for user/valid-user to be allowed access",
                     r->uri, user);
           
  -    ap_note_basic_auth_failure(r);
  +    ap_note_auth_failure(r);
       return HTTP_UNAUTHORIZED;
   }
   
  
  
  

Mime
View raw message