coar        99/01/06 11:14:52

  Modified:    src      CHANGES
               src/include ap_mmn.h http_config.h
  Log:
        If we tried to check the version number of a module compiled
        before 1 January 1999, we'd be looking in the wrong places
        for the filename and version numbers because the magic cookie
        insertion changed their offsets.  This fixes that, at the cost
        of making any modules compiled between 1 January 1999 and 6 January
        1999 unreadable.  Balancing a span of five days against six
        months makes this seem reasonable.
  
  Revision  Changes    Path
  1.1205    +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1204
  retrieving revision 1.1205
  diff -u -r1.1204 -r1.1205
  --- CHANGES   1999/01/05 08:17:25     1.1204
  +++ CHANGES   1999/01/06 19:14:49     1.1205
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.4
   
  +  *) Moved the MODULE_MAGIC_COOKIE from before the versions and
  +     filename to the end of the STANDARD_MODULE_STUFF.  Its
  +     presence at the beginning prevented reporting of the filename
  +     for modules compiled before 1 January 1999.  [Ken Coar]
  +
     *) SECURITY: ap_os_is_filename_valid() has been added to Win32
        to detect and prevent access to special DOS device file names.
        [Paul Sutton, Ken Parzygnat]
  
  
  
  1.20      +4 -1      apache-1.3/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/ap_mmn.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ap_mmn.h  1999/01/05 08:17:27     1.19
  +++ ap_mmn.h  1999/01/06 19:14:51     1.20
  @@ -196,12 +196,15 @@
    *                      - added MODULE_MAGIC_COOKIE to identify module 
structs
    * 19990103 (1.3.4-dev) - added ap_array_pstrcat()
    * 19990105 (1.3.4-dev) - added ap_os_is_filename_valid() to Win32
  + * 19990106 (1.3.4-dev) - Move MODULE_MAGIC_COOKIE to the end of the
  + *                        STANDARD_MODULE_STUFF macro so the version
  + *                        numbers and file name remain at invariant offsets
    */
   
   #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
   
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
  -#define MODULE_MAGIC_NUMBER_MAJOR 19990105
  +#define MODULE_MAGIC_NUMBER_MAJOR 19990106
   #endif
   #define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR        /* backward 
compat */
  
  
  
  1.100     +8 -8      apache-1.3/src/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/http_config.h,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- http_config.h     1999/01/01 20:27:47     1.99
  +++ http_config.h     1999/01/06 19:14:51     1.100
  @@ -186,10 +186,6 @@
    */
   
   typedef struct module_struct {
  -    unsigned long magic;        /* Magic Cookie to identify a module 
structure;
  -                                 * It's mainly important for the DSO facility
  -                                 * (see also mod_so).
  -                                 */
       int version;             /* API version, *not* module version;
                                 * check that module is compatible with this
                                 * version of the server.
  @@ -202,11 +198,15 @@
                                 */
   
       const char *name;
  -
       void *dynamic_load_handle;
   
       struct module_struct *next;
   
  +    unsigned long magic;        /* Magic Cookie to identify a module 
structure;
  +                                 * It's mainly important for the DSO facility
  +                                 * (see also mod_so).
  +                                 */
  +
       /* init() occurs after config parsing, but before any children are
        * forked.
        * Modules should not rely on the order in which create_server_config
  @@ -285,13 +285,13 @@
    * signal an error). See src/include/ap_mmn.h for MMN version history.
    */
   
  -#define STANDARD_MODULE_STUFF        MODULE_MAGIC_COOKIE, \
  -                             MODULE_MAGIC_NUMBER_MAJOR, \
  +#define STANDARD_MODULE_STUFF        MODULE_MAGIC_NUMBER_MAJOR, \
                                MODULE_MAGIC_NUMBER_MINOR, \
                                -1, \
                                __FILE__, \
  +                             NULL, \
                                NULL, \
  -                             NULL
  +                             MODULE_MAGIC_COOKIE
   
   /* Generic accessors for other modules to get at their own module-specific
    * data
  
  
  

Reply via email to