ben         99/08/14 16:46:50

  Modified:    mpm/src/include http_config.h http_request.h
               mpm/src/main http_config.c http_core.c http_request.c
               mpm/src/modules/mpm/prefork prefork.c
               mpm/src/modules/standard mod_access.c mod_actions.c
                        mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c
                        mod_dir.c mod_echo.c mod_env.c mod_imap.c
                        mod_log_config.c mod_mime.c mod_negotiation.c
                        mod_setenvif.c mod_userdir.c
  Log:
  Access checker hook.
  
  Revision  Changes    Path
  1.15      +0 -2      apache-2.0/mpm/src/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- http_config.h     1999/08/01 14:43:22     1.14
  +++ http_config.h     1999/08/14 23:46:37     1.15
  @@ -236,7 +236,6 @@
        */
   
       int (*auth_checker) (request_rec *);
  -    int (*access_checker) (request_rec *);
       void (*register_hooks) (void);
   } module;
   
  @@ -356,7 +355,6 @@
   /* Module-method dispatchers, also for http_request.c */
   
   int ap_translate_name(request_rec *);
  -int ap_check_access(request_rec *);  /* check access on non-auth basis */
   int ap_check_user_id(request_rec *); /* obtain valid username from client 
auth */
   int ap_check_auth(request_rec *);    /* check (validated) user is authorized 
here */
   int ap_invoke_handler(request_rec *);
  
  
  
  1.6       +1 -0      apache-2.0/mpm/src/include/http_request.h
  
  Index: http_request.h
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_request.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- http_request.h    1999/07/24 18:38:38     1.5
  +++ http_request.h    1999/08/14 23:46:38     1.6
  @@ -117,6 +117,7 @@
   DECLARE_HOOK(int,check_user_id,(request_rec *))
   DECLARE_HOOK(int,fixups,(request_rec *))
   DECLARE_HOOK(int,type_checker,(request_rec *))
  +DECLARE_HOOK(int,access_checker,(request_rec *))
   
   #ifdef __cplusplus
   }
  
  
  
  1.19      +0 -7      apache-2.0/mpm/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- http_config.c     1999/08/01 14:43:23     1.18
  +++ http_config.c     1999/08/14 23:46:39     1.19
  @@ -286,13 +286,11 @@
   static const int method_offsets[] =
   {
       XtOffsetOf(module, auth_checker),
  -    XtOffsetOf(module, access_checker),
   };
   #define NMETHODS     (sizeof (method_offsets)/sizeof (method_offsets[0]))
   
   static struct {
       int auth_checker;
  -    int access_checker;
   } offsets_into_method_ptrs;
   
   /*
  @@ -368,11 +366,6 @@
       }
   
       return run_all ? OK : DECLINED;
  -}
  -
  -int ap_check_access(request_rec *r)
  -{
  -    return run_method(r, offsets_into_method_ptrs.access_checker, 1);
   }
   
   /* Auth stuff --- anything that defines one of these will presumably
  
  
  
  1.18      +1 -1      apache-2.0/mpm/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- http_core.c       1999/08/06 00:54:30     1.17
  +++ http_core.c       1999/08/14 23:46:40     1.18
  @@ -2670,6 +2670,7 @@
       ap_hook_open_logs(core_open_logs,NULL,NULL,HOOK_MIDDLE);
       /* FIXME: I suspect we can eliminate the need for these - Ben */
       ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST);
  +    ap_hook_access_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST);
       }
   
   API_VAR_EXPORT module core_module = {
  @@ -2682,6 +2683,5 @@
       core_cmds,                       /* command table */
       core_handlers,           /* handlers */
       NULL,                    /* check auth */
  -    do_nothing,                      /* check access */
       register_hooks           /* register hooks */
   };
  
  
  
  1.16      +8 -6      apache-2.0/mpm/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_request.c    1999/07/31 09:31:23     1.15
  +++ http_request.c    1999/08/14 23:46:40     1.16
  @@ -83,12 +83,14 @@
            HOOK_LINK(check_user_id)
            HOOK_LINK(fixups)
            HOOK_LINK(type_checker)
  +         HOOK_LINK(access_checker)
   )
   
   IMPLEMENT_HOOK_RUN_FIRST(int,translate_name,(request_rec *r),(r),DECLINED)
   IMPLEMENT_HOOK_RUN_FIRST(int,check_user_id,(request_rec *r),(r),DECLINED)
   IMPLEMENT_HOOK_RUN_ALL(int,fixups,(request_rec *r),(r),OK,DECLINED)
   IMPLEMENT_HOOK_RUN_FIRST(int,type_checker,(request_rec *r),(r),DECLINED)
  +IMPLEMENT_HOOK_RUN_ALL(int,access_checker,(request_rec *r),(r),OK,DECLINED)
   
   /*****************************************************************
    *
  @@ -806,11 +808,11 @@
           || (res = location_walk(rnew))
           || ((ap_satisfies(rnew) == SATISFY_ALL
                || ap_satisfies(rnew) == SATISFY_NOSPEC)
  -            ? ((res = ap_check_access(rnew))
  +            ? ((res = ap_run_access_checker(rnew))
                  || (ap_some_auth_required(rnew)
                      && ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
  -            : ((res = ap_check_access(rnew))
  +            : ((res = ap_run_access_checker(rnew))
                  && (!ap_some_auth_required(rnew)
                      || ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
  @@ -929,11 +931,11 @@
       if (res
           || ((ap_satisfies(rnew) == SATISFY_ALL
                || ap_satisfies(rnew) == SATISFY_NOSPEC)
  -            ? ((res = ap_check_access(rnew))
  +            ? ((res = ap_run_access_checker(rnew))
                  || (ap_some_auth_required(rnew)
                      && ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
  -            : ((res = ap_check_access(rnew))
  +            : ((res = ap_run_access_checker(rnew))
                  && (!ap_some_auth_required(rnew)
                      || ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
  @@ -1177,7 +1179,7 @@
       switch (ap_satisfies(r)) {
       case SATISFY_ALL:
       case SATISFY_NOSPEC:
  -        if ((access_status = ap_check_access(r)) != 0) {
  +        if ((access_status = ap_run_access_checker(r)) != 0) {
               decl_die(access_status, "check access", r);
               return;
           }
  @@ -1197,7 +1199,7 @@
           }
           break;
       case SATISFY_ANY:
  -        if (((access_status = ap_check_access(r)) != 0) || !ap_auth_type(r)) 
{
  +        if (((access_status = ap_run_access_checker(r)) != 0) || 
!ap_auth_type(r)) {
               if (!ap_some_auth_required(r)) {
                   decl_die(access_status, ap_auth_type(r)
                    ? "check access"
  
  
  
  1.28      +0 -1      apache-2.0/mpm/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- prefork.c 1999/08/13 21:52:56     1.27
  +++ prefork.c 1999/08/14 23:46:41     1.28
  @@ -2985,6 +2985,5 @@
       prefork_cmds,            /* command table */
       NULL,                    /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       prefork_hooks,           /* register hooks */
   };
  
  
  
  1.13      +5 -2      apache-2.0/mpm/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_access.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_access.c      1999/08/01 14:43:26     1.12
  +++ mod_access.c      1999/08/14 23:46:42     1.13
  @@ -384,6 +384,10 @@
       return ret;
   }
   
  +static void register_hooks()
  +{
  +    ap_hook_access_checker(check_dir_access,NULL,NULL,HOOK_MIDDLE);
  +}
   
   
   module MODULE_VAR_EXPORT access_module =
  @@ -397,6 +401,5 @@
       access_cmds,
       NULL,                    /* handlers */
       NULL,                    /* check auth */
  -    check_dir_access,                /* check access */
  -    NULL                     /* register hooks */
  +    register_hooks           /* register hooks */
   };
  
  
  
  1.12      +0 -1      apache-2.0/mpm/src/modules/standard/mod_actions.c
  
  Index: mod_actions.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_actions.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_actions.c     1999/08/01 14:43:27     1.11
  +++ mod_actions.c     1999/08/14 23:46:43     1.12
  @@ -219,6 +219,5 @@
       action_cmds,             /* command table */
       action_handlers,         /* handlers */
       NULL,                       /* "check auth */
  -    NULL,                    /* check access */
       NULL                     /* register hooks */
   };
  
  
  
  1.14      +0 -1      apache-2.0/mpm/src/modules/standard/mod_alias.c
  
  Index: mod_alias.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_alias.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_alias.c       1999/08/01 14:43:27     1.13
  +++ mod_alias.c       1999/08/14 23:46:43     1.14
  @@ -414,6 +414,5 @@
       alias_cmds,                      /* command table */
       NULL,                    /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       register_hooks           /* register hooks */
   };
  
  
  
  1.13      +0 -1      apache-2.0/mpm/src/modules/standard/mod_asis.c
  
  Index: mod_asis.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_asis.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_asis.c        1999/08/01 14:43:28     1.12
  +++ mod_asis.c        1999/08/14 23:46:43     1.13
  @@ -134,6 +134,5 @@
       NULL,                    /* command table */
       asis_handlers,           /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       NULL                     /* register hooks */
   };
  
  
  
  1.14      +0 -1      apache-2.0/mpm/src/modules/standard/mod_auth.c
  
  Index: mod_auth.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_auth.c        1999/08/06 00:54:52     1.13
  +++ mod_auth.c        1999/08/14 23:46:43     1.14
  @@ -325,6 +325,5 @@
       auth_cmds,                       /* command table */
       NULL,                    /* handlers */
       check_user_access,               /* check auth */
  -    NULL,                    /* check access */
       register_hooks           /* register hooks */
   };
  
  
  
  1.13      +0 -1      apache-2.0/mpm/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: 
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_autoindex.c   1999/08/01 14:43:28     1.12
  +++ mod_autoindex.c   1999/08/14 23:46:43     1.13
  @@ -1658,6 +1658,5 @@
       autoindex_cmds,          /* command table */
       autoindex_handlers,              /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       NULL                     /* register hooks */
   };
  
  
  
  1.12      +0 -1      apache-2.0/mpm/src/modules/standard/mod_dir.c
  
  Index: mod_dir.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_dir.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_dir.c 1999/08/01 14:43:28     1.11
  +++ mod_dir.c 1999/08/14 23:46:44     1.12
  @@ -232,6 +232,5 @@
       dir_cmds,                        /* command table */
       dir_handlers,            /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       NULL                     /* register hooks */
   };
  
  
  
  1.7       +0 -1      apache-2.0/mpm/src/modules/standard/mod_echo.c
  
  Index: mod_echo.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_echo.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_echo.c        1999/08/01 14:43:28     1.6
  +++ mod_echo.c        1999/08/14 23:46:44     1.7
  @@ -71,6 +71,5 @@
       echo_cmds,                       /* command table */
       NULL,                    /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       register_hooks           /* register hooks */
   };
  
  
  
  1.14      +0 -1      apache-2.0/mpm/src/modules/standard/mod_env.c
  
  Index: mod_env.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_env.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_env.c 1999/08/01 14:43:28     1.13
  +++ mod_env.c 1999/08/14 23:46:44     1.14
  @@ -264,6 +264,5 @@
       env_module_cmds,            /* command table */
       NULL,                       /* handlers */
       NULL,                       /* check auth */
  -    NULL,                       /* check access */
       register_hooks              /* register hooks */
   };
  
  
  
  1.13      +0 -1      apache-2.0/mpm/src/modules/standard/mod_imap.c
  
  Index: mod_imap.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_imap.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_imap.c        1999/08/01 14:43:28     1.12
  +++ mod_imap.c        1999/08/14 23:46:44     1.13
  @@ -905,6 +905,5 @@
       imap_cmds,                  /* command table */
       imap_handlers,              /* handlers */
       NULL,                       /* check auth */
  -    NULL,                       /* check access */
       NULL                        /* register hooks */
   };
  
  
  
  1.14      +0 -1      apache-2.0/mpm/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===================================================================
  RCS file: 
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_log_config.c  1999/08/06 00:55:00     1.13
  +++ mod_log_config.c  1999/08/14 23:46:44     1.14
  @@ -1131,6 +1131,5 @@
       config_log_cmds,            /* command table */
       NULL,                       /* handlers */
       NULL,                       /* check auth */
  -    NULL,                       /* check access */
       register_hooks              /* register hooks */
   };
  
  
  
  1.12      +0 -1      apache-2.0/mpm/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_mime.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_mime.c        1999/08/01 14:43:29     1.11
  +++ mod_mime.c        1999/08/14 23:46:45     1.12
  @@ -395,6 +395,5 @@
       mime_cmds,                       /* command table */
       NULL,                    /* handlers */
       NULL,                    /* check auth */
  -    NULL,                    /* check access */
       register_hooks           /* register hooks */
   };
  
  
  
  1.13      +0 -1      apache-2.0/mpm/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: 
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_negotiation.c 1999/08/01 14:43:29     1.12
  +++ mod_negotiation.c 1999/08/14 23:46:45     1.13
  @@ -2741,6 +2741,5 @@
       negotiation_cmds,           /* command table */
       negotiation_handlers,       /* handlers */
       NULL,                       /* check auth */
  -    NULL,                       /* check access */
       register_hooks              /* register hooks */
   };
  
  
  
  1.14      +0 -1      apache-2.0/mpm/src/modules/standard/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===================================================================
  RCS file: 
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_setenvif.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_setenvif.c    1999/08/01 14:43:29     1.13
  +++ mod_setenvif.c    1999/08/14 23:46:45     1.14
  @@ -416,7 +416,6 @@
       setenvif_module_cmds,       /* command table */
       NULL,                       /* handlers */
       NULL,                       /* check auth */
  -    NULL,                       /* check access */
       register_hooks           /* register hooks */
   };
   
  
  
  
  1.14      +0 -1      apache-2.0/mpm/src/modules/standard/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_userdir.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_userdir.c     1999/08/01 14:43:29     1.13
  +++ mod_userdir.c     1999/08/14 23:46:45     1.14
  @@ -344,6 +344,5 @@
       userdir_cmds,               /* command table */
       NULL,                       /* handlers */
       NULL,                       /* check auth */
  -    NULL,                       /* check access */
       register_hooks              /* register hooks */
   };
  
  
  

Reply via email to