httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/standard mod_userdir.c
Date Mon, 23 Oct 2000 18:38:01 GMT
manoj       00/10/23 11:38:01

  Modified:    src/modules/standard mod_userdir.c
  Log:
  I didn't know that mod_userdir was even used on Windows. Oops. #ifdef
  out Unix-specific portions for now.
  
  Revision  Changes    Path
  1.21      +11 -1     apache-2.0/src/modules/standard/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_userdir.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_userdir.c	2000/10/23 18:14:37	1.20
  +++ mod_userdir.c	2000/10/23 18:38:00	1.21
  @@ -91,12 +91,18 @@
    * disabled, except those explicitly turned on with the "enabled" keyword.
    */
   
  +#if !defined(WIN32) && !defined(OS2)
  +#define HAVE_UNIX_SUEXEC
  +#endif
  +
   #include "apr_strings.h"
   #include "ap_config.h"
   #include "httpd.h"
   #include "http_config.h"
   #include "http_request.h"
  -#include "suexec.h"
  +#ifdef HAVE_UNIX_SUEXEC
  +#include "suexec.h"        /* Contains the suexec_identity hook used on Unix */
  +#endif
   #ifdef HAVE_PWD_H
   #include <pwd.h>
   #endif
  @@ -352,6 +358,7 @@
       return DECLINED;
   }
   
  +#ifdef HAVE_UNIX_SUEXEC
   static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
   {
       const char *username = apr_table_get(r->notes, "mod_userdir_user");
  @@ -371,13 +378,16 @@
       
       return ugid;
   }
  +#endif /* HAVE_UNIX_SUEXEC */
   
   static void register_hooks(void)
   {
       static const char * const aszSucc[]={ "mod_alias.c",NULL };
   
       ap_hook_translate_name(translate_userdir,NULL,aszSucc,AP_HOOK_MIDDLE);
  +#ifdef HAVE_UNIX_SUEXEC
       ap_hook_get_suexec_identity(get_suexec_id_doer,NULL,NULL,AP_HOOK_MIDDLE);
  +#endif
   }
   
   module userdir_module = {
  
  
  

Mime
View raw message