httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_userdir.c
Date Thu, 22 Feb 2001 20:50:07 GMT
rbb         01/02/22 12:50:06

  Modified:    .        CHANGES
               modules/mappers mod_userdir.c
  Log:
  Fix a seg fault in mod_userdir.c.  We used to use the pw structure
  without ever filling it out.
  
  PR:	7271
  Submitted by:	Taketo Kabe <kabe@sra-tohoku.co.jp> and Cliff Woolley <cliffwoolley@yahoo.com>]
  
  Revision  Changes    Path
  1.106     +5 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -d -b -w -u -r1.105 -r1.106
  --- CHANGES	2001/02/22 04:05:57	1.105
  +++ CHANGES	2001/02/22 20:49:56	1.106
  @@ -1,5 +1,10 @@
   Changes with Apache 2.0.12-dev
   
  +  *) Fix a seg fault in mod_userdir.c.  We used to use the pw structure
  +     without ever filling it out.  This fixes PR 7271.
  +     [Taketo Kabe <kabe@sra-tohoku.co.jp> and 
  +      Cliff Woolley <cliffwoolley@yahoo.com>]
  +
     *) Add a couple of GCC attribute tags to printf style functions.
        [Jon Travis <jtravis@covalent.net>]
   
  
  
  
  1.38      +7 -5      httpd-2.0/modules/mappers/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_userdir.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -d -b -w -u -r1.37 -r1.38
  --- mod_userdir.c	2001/02/18 02:58:52	1.37
  +++ mod_userdir.c	2001/02/22 20:50:03	1.38
  @@ -357,9 +357,9 @@
   #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");
  -    struct passwd *pw = NULL;
       ap_unix_identity_t *ugid = NULL;
  +#if APR_HAS_USER
  +    const char *username = apr_table_get(r->notes, "mod_userdir_user");
   
       if (username == NULL) {
           return NULL;
  @@ -369,9 +369,11 @@
           return NULL;
       }
   
  -    ugid->uid = pw->pw_uid;
  -    ugid->gid = pw->pw_gid;
  +    if (apr_get_userid(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS)
{
  +        return NULL;
  +    }
       
  +#endif 
       return ugid;
   }
   #endif /* HAVE_UNIX_SUEXEC */
  
  
  

Mime
View raw message