ben         99/07/11 12:00:57

  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_alias.c mod_asis.c
                        mod_auth.c mod_autoindex.c mod_dir.c mod_env.c
                        mod_imap.c mod_log_config.c mod_mime.c
                        mod_negotiation.c mod_setenvif.c mod_userdir.c
  Log:
  Another hook.
  
  Revision  Changes    Path
  1.7       +0 -1      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- http_config.h     1999/07/11 13:27:24     1.6
  +++ http_config.h     1999/07/11 19:00:47     1.7
  @@ -240,7 +240,6 @@
        * logger --- log a transaction.
        */
   
  -    int (*ap_check_user_id) (request_rec *);
       int (*auth_checker) (request_rec *);
       int (*access_checker) (request_rec *);
       int (*type_checker) (request_rec *);
  
  
  
  1.3       +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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- http_request.h    1999/07/11 13:27:24     1.2
  +++ http_request.h    1999/07/11 19:00:47     1.3
  @@ -114,6 +114,7 @@
   
     /* Hooks */
   DECLARE_HOOK(int,translate_name,(request_rec *))
  +DECLARE_HOOK(int,check_user_id,(request_rec *))
   
   #ifdef __cplusplus
   }
  
  
  
  1.10      +0 -8      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_config.c     1999/07/11 16:42:23     1.9
  +++ http_config.c     1999/07/11 19:00:48     1.10
  @@ -237,7 +237,6 @@
   
   {
   #define m(meth)      { XtOffsetOf(module,meth),#meth }
  -    m(ap_check_user_id),
       m(auth_checker),
       m(type_checker),
       m(fixer_upper),
  @@ -276,7 +275,6 @@
    */
   static const int method_offsets[] =
   {
  -    XtOffsetOf(module, ap_check_user_id),
       XtOffsetOf(module, auth_checker),
       XtOffsetOf(module, access_checker),
       XtOffsetOf(module, type_checker),
  @@ -286,7 +284,6 @@
   #define NMETHODS     (sizeof (method_offsets)/sizeof (method_offsets[0]))
   
   static struct {
  -    int ap_check_user_id;
       int auth_checker;
       int access_checker;
       int type_checker;
  @@ -395,11 +392,6 @@
    * want to define something for the other.  Note that check_auth is
    * separate from check_access to make catching some config errors easier.
    */
  -
  -int ap_check_user_id(request_rec *r)
  -{
  -    return run_method(r, offsets_into_method_ptrs.ap_check_user_id, 0);
  -}
   
   int ap_check_auth(request_rec *r)
   {
  
  
  
  1.6       +0 -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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- http_core.c       1999/07/11 16:54:04     1.5
  +++ http_core.c       1999/07/11 19:00:48     1.6
  @@ -2647,7 +2647,6 @@
       merge_core_server_configs,       /* merge per-server config structures */
       core_cmds,                       /* command table */
       core_handlers,           /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       do_nothing,                      /* check access */
       do_nothing,                      /* type_checker */
  
  
  
  1.10      +9 -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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_request.c    1999/07/11 16:42:24     1.9
  +++ http_request.c    1999/07/11 19:00:49     1.10
  @@ -80,10 +80,13 @@
   
   HOOK_STRUCT(
            HOOK_LINK(translate_name)
  +         HOOK_LINK(check_user_id)
   )
   
   IMPLEMENT_HOOK(int,translate_name,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK,
               DECLINED)
  +IMPLEMENT_HOOK(int,check_user_id,(request_rec *r),(r),RUN_TO_FIRST_ERROR,OK,
  +            DECLINED)
   
   /*****************************************************************
    *
  @@ -803,11 +806,11 @@
                || ap_satisfies(rnew) == SATISFY_NOSPEC)
               ? ((res = ap_check_access(rnew))
                  || (ap_some_auth_required(rnew)
  -                   && ((res = ap_check_user_id(rnew))
  +                   && ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
               : ((res = ap_check_access(rnew))
                  && (!ap_some_auth_required(rnew)
  -                   || ((res = ap_check_user_id(rnew))
  +                   || ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
              )
           || (res = ap_find_types(rnew))
  @@ -926,11 +929,11 @@
                || ap_satisfies(rnew) == SATISFY_NOSPEC)
               ? ((res = ap_check_access(rnew))
                  || (ap_some_auth_required(rnew)
  -                   && ((res = ap_check_user_id(rnew))
  +                   && ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
               : ((res = ap_check_access(rnew))
                  && (!ap_some_auth_required(rnew)
  -                   || ((res = ap_check_user_id(rnew))
  +                   || ((res = ap_run_check_user_id(rnew))
                          || (res = ap_check_auth(rnew)))))
              )
           || (res = ap_find_types(rnew))
  @@ -1177,7 +1180,7 @@
               return;
           }
           if (ap_some_auth_required(r)) {
  -            if (((access_status = ap_check_user_id(r)) != 0) || 
!ap_auth_type(r)) {
  +            if (((access_status = ap_run_check_user_id(r)) != 0) || 
!ap_auth_type(r)) {
                   decl_die(access_status, ap_auth_type(r)
                    ? "check user.  No user file?"
                    : "perform authentication. AuthType not set!", r);
  @@ -1199,7 +1202,7 @@
                    : "perform authentication. AuthType not set!", r);
                   return;
               }
  -            if (((access_status = ap_check_user_id(r)) != 0) || 
!ap_auth_type(r)) {
  +            if (((access_status = ap_run_check_user_id(r)) != 0) || 
!ap_auth_type(r)) {
                   decl_die(access_status, ap_auth_type(r)
                    ? "check user.  No user file?"
                    : "perform authentication. AuthType not set!", r);
  
  
  
  1.10      +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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- prefork.c 1999/07/11 13:27:27     1.9
  +++ prefork.c 1999/07/11 19:00:50     1.10
  @@ -3086,7 +3086,6 @@
       NULL,                    /* merge per-server config structures */
       prefork_cmds,            /* command table */
       NULL,                    /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       NULL,                    /* check access */
       NULL,                    /* type_checker */
  
  
  
  1.5       +0 -1      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_access.c      1999/07/11 13:27:27     1.4
  +++ mod_access.c      1999/07/11 19:00:51     1.5
  @@ -400,7 +400,6 @@
       NULL,                    /* merge server config */
       access_cmds,
       NULL,                    /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       check_dir_access,                /* check access */
       NULL,                    /* type_checker */
  
  
  
  1.6       +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_alias.c       1999/07/11 16:54:08     1.5
  +++ mod_alias.c       1999/07/11 19:00:51     1.6
  @@ -416,7 +416,6 @@
       merge_alias_config,              /* merge server configs */
       alias_cmds,                      /* command table */
       NULL,                    /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       NULL,                    /* check access */
       NULL,                    /* type_checker */
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_asis.c        1999/07/11 13:27:28     1.4
  +++ mod_asis.c        1999/07/11 19:00:51     1.5
  @@ -137,7 +137,6 @@
       NULL,                    /* merge per-server config structures */
       NULL,                    /* command table */
       asis_handlers,           /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       NULL,                    /* check access */
       NULL,                    /* type_checker */
  
  
  
  1.5       +7 -2      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_auth.c        1999/07/11 13:27:28     1.4
  +++ mod_auth.c        1999/07/11 19:00:51     1.5
  @@ -75,6 +75,7 @@
   #include "http_log.h"
   #include "http_protocol.h"
   #include "ap_md5.h"
  +#include "http_request.h"
   
   typedef struct auth_config_struct {
       char *auth_pwfile;
  @@ -309,6 +310,11 @@
       return AUTH_REQUIRED;
   }
   
  +static void register_hooks(void)
  +    {
  +    ap_hook_check_user_id(authenticate_basic_user,NULL,NULL,HOOK_MIDDLE);
  +    }
  +
   module MODULE_VAR_EXPORT auth_module =
   {
       STANDARD20_MODULE_STUFF,
  @@ -323,11 +329,10 @@
       NULL,                    /* merge server config */
       auth_cmds,                       /* command table */
       NULL,                    /* handlers */
  -    authenticate_basic_user, /* check_user_id */
       check_user_access,               /* check auth */
       NULL,                    /* check access */
       NULL,                    /* type_checker */
       NULL,                    /* fixups */
       NULL,                    /* logger */
  -    NULL                     /* register hooks */
  +    register_hooks           /* register hooks */
   };
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_autoindex.c   1999/07/11 13:27:28     1.4
  +++ mod_autoindex.c   1999/07/11 19:00:51     1.5
  @@ -1661,7 +1661,6 @@
       NULL,                    /* merge server config */
       autoindex_cmds,          /* command table */
       autoindex_handlers,              /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       NULL,                    /* check access */
       NULL,                    /* type_checker */
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_dir.c 1999/07/11 13:27:28     1.3
  +++ mod_dir.c 1999/07/11 19:00:52     1.4
  @@ -235,7 +235,6 @@
       NULL,                    /* merge per-server config structures */
       dir_cmds,                        /* command table */
       dir_handlers,            /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       NULL,                    /* check access */
       NULL,                    /* type_checker */
  
  
  
  1.6       +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_env.c 1999/07/11 13:27:28     1.5
  +++ mod_env.c 1999/07/11 19:00:52     1.6
  @@ -260,7 +260,6 @@
       NULL,                       /* merge server configs */
       env_module_cmds,            /* command table */
       NULL,                       /* handlers */
  -    NULL,                       /* check_user_id */
       NULL,                       /* check auth */
       NULL,                       /* check access */
       NULL,                       /* type_checker */
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_imap.c        1999/07/11 13:27:28     1.4
  +++ mod_imap.c        1999/07/11 19:00:52     1.5
  @@ -908,7 +908,6 @@
       NULL,                       /* merge server config */
       imap_cmds,                  /* command table */
       imap_handlers,              /* handlers */
  -    NULL,                       /* check_user_id */
       NULL,                       /* check auth */
       NULL,                       /* check access */
       NULL,                       /* type_checker */
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_log_config.c  1999/07/11 13:27:29     1.4
  +++ mod_log_config.c  1999/07/11 19:00:52     1.5
  @@ -1118,7 +1118,6 @@
       merge_config_log_state,     /* merge server config */
       config_log_cmds,            /* command table */
       NULL,                       /* handlers */
  -    NULL,                       /* check_user_id */
       NULL,                       /* check auth */
       NULL,                       /* check access */
       NULL,                       /* type_checker */
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_mime.c        1999/07/11 13:27:29     1.3
  +++ mod_mime.c        1999/07/11 19:00:52     1.4
  @@ -391,7 +391,6 @@
       NULL,                    /* merge per-server config structures */
       mime_cmds,                       /* command table */
       NULL,                    /* handlers */
  -    NULL,                    /* check_user_id */
       NULL,                    /* check auth */
       NULL,                    /* check access */
       find_ct,                 /* type_checker */
  
  
  
  1.5       +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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_negotiation.c 1999/07/11 13:27:29     1.4
  +++ mod_negotiation.c 1999/07/11 19:00:53     1.5
  @@ -2738,7 +2738,6 @@
       NULL,                       /* merge server config */
       negotiation_cmds,           /* command table */
       negotiation_handlers,       /* handlers */
  -    NULL,                       /* check_user_id */
       NULL,                       /* check auth */
       NULL,                       /* check access */
       handle_multi,               /* type_checker */
  
  
  
  1.6       +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_setenvif.c    1999/07/11 16:54:08     1.5
  +++ mod_setenvif.c    1999/07/11 19:00:53     1.6
  @@ -419,7 +419,6 @@
       merge_setenvif_config,      /* merge server configs */
       setenvif_module_cmds,       /* command table */
       NULL,                       /* handlers */
  -    NULL,                       /* check_user_id */
       NULL,                       /* check auth */
       NULL,                       /* check access */
       NULL,                       /* type_checker */
  
  
  
  1.6       +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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_userdir.c     1999/07/11 16:54:08     1.5
  +++ mod_userdir.c     1999/07/11 19:00:53     1.6
  @@ -347,7 +347,6 @@
       NULL,                       /* merge server config */
       userdir_cmds,               /* command table */
       NULL,                       /* handlers */
  -    NULL,                       /* check_user_id */
       NULL,                       /* check auth */
       NULL,                       /* check access */
       NULL,                       /* type_checker */
  
  
  

Reply via email to