You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dg...@hyperreal.org on 1997/11/05 12:38:53 UTC

cvs commit: apache/src CHANGES mod_userdir.c

dgaudet     97/11/05 03:38:53

  Modified:    src      Tag: APACHE_1_2_X CHANGES mod_userdir.c
  Log:
  mod_userdir overwrites r->finfo in cases where it does not also
  update r->filename.  These two are meant to be in sync, so this
  is a bug.
  
  Reviewed by:	Dean Gaudet, Roy Fielding, Ralf Engelschall
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.286.2.56 +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.55
  retrieving revision 1.286.2.56
  diff -u -r1.286.2.55 -r1.286.2.56
  --- CHANGES	1997/09/26 03:11:22	1.286.2.55
  +++ CHANGES	1997/11/05 11:38:51	1.286.2.56
  @@ -2,6 +2,10 @@
   
     *) suexec.c wouldn't build without -DLOG_EXEC. [Jason A. Dour]
   
  +  *) mod_userdir was modifying r->finfo in cases where it wasn't setting
  +     r->filename.  Since those two are meant to be in sync with each other
  +     this is a bug.  ["Paul B. Henson" <he...@intranet.csupomona.edu>]
  +
     *) Inetd mode (which is buggy) uses timeouts without having setup the
        jmpbuffer. [Dean Gaudet] PR#1064
   
  
  
  
  1.14.2.1  +3 -1      apache/src/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_userdir.c,v
  retrieving revision 1.14
  retrieving revision 1.14.2.1
  diff -u -r1.14 -r1.14.2.1
  --- mod_userdir.c	1997/03/07 14:15:44	1.14
  +++ mod_userdir.c	1997/11/05 11:38:52	1.14.2.1
  @@ -114,6 +114,7 @@
       char *name = r->uri;
       const char *w, *dname, *redirect;
       char *x = NULL;
  +    struct stat statbuf;
   
       if (userdirs == NULL || !strcasecmp(userdirs, "disabled") ||
           (name[0] != '/') || (name[1] != '~')) {
  @@ -182,8 +183,9 @@
          in the hope that some handler might handle it. This can be used, for
          example, to run a CGI script for the user. 
          */
  -      if (filename && (!*userdirs || stat(filename, &r->finfo) != -1)) {
  +      if (filename && (!*userdirs || stat(filename, &statbuf) != -1)) {
   	r->filename = pstrcat(r->pool, filename, dname, NULL);
  +	r->finfo = statbuf;
   	return OK;
         }
       }