httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_userdir.c
Date Sun, 28 Jan 2001 23:51:53 GMT
wrowe       01/01/28 15:51:53

  Modified:    .        CHANGES
               modules/mappers mod_userdir.c
  Log:
    Moved several CHANGES back to APR where they belonged in the first place,
    Adopt apr features for simplifing mod_userdir, and accept the new
    Win32/OS2 exceptions without hiccuping
  
    Also note a potentially serious flaw - others please review.
  
  Revision  Changes    Path
  1.64      +2 -9      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- CHANGES	2001/01/28 23:45:56	1.63
  +++ CHANGES	2001/01/28 23:51:52	1.64
  @@ -1,14 +1,7 @@
   Changes with Apache 2.0b1
   
  -  *) Corrected an OS2'ism of apr_get_home_directory.  OS2 now returns the
  -     proper directory, including the user's name.
  -
  -  *) Removed private os2errno.h and integrated the OS2 network error codes
  -     into apr_errno.h for optimized error tests (APR_STATUS_IS_EFOO(rv)).
  -     [William Rowe]
  -
  -  *) Moved inclusion of <os2.h> header from multiple modules into apr.h
  -     [William Rowe]
  +  *) Adopt apr features for simplifing mod_userdir, and accept the new
  +     Win32/OS2 exceptions without hiccuping.  [William Rowe]
   
     *) Replace configure --with-optim option by using and saving the
        environment variable OPTIM instead.  This is needed because configure
  
  
  
  1.32      +8 -10     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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_userdir.c	2001/01/20 21:42:19	1.31
  +++ mod_userdir.c	2001/01/28 23:51:53	1.32
  @@ -281,6 +281,7 @@
       while (*userdirs) {
           const char *userdir = ap_getword_conf(r->pool, &userdirs);
           char *filename = NULL;
  +        apr_status_t rv;
   
           if (ap_strchr_c(userdir, '*'))
               x = ap_getword(r->pool, &userdir, '*');
  @@ -322,15 +323,10 @@
               char *homedir;
   
               if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
  -#ifdef OS2      /* XXX should this OS/2 logic move to APR? */
  -                /* Need to manually add user name for OS/2 */
  -                filename = apr_pstrcat(r->pool, homedir, w, "/", userdir, NULL);
  -#else
                   filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
  -#endif
               }
               else {
  -                /* XXX old code ignored this error... */
  +                return DECLINED;
               }
   #else
               return DECLINED;
  @@ -343,11 +339,13 @@
            * anyway, 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 || 
  -            apr_stat(&statbuf, filename, 
  -                     APR_FINFO_NORM, r->pool) == APR_SUCCESS)) {
  +        if (filename && (!*userdirs 
  +                      || ((rv = apr_stat(&statbuf, filename, APR_FINFO_NORM,
  +                                         r->pool)) == APR_SUCCESS
  +                                             || rv == APR_INCOMPLETE))) {
               r->filename = apr_pstrcat(r->pool, filename, dname, NULL);
  -	    /* when statbuf contains info on r->filename we can save a syscall
  +	    /* XXX: Does this walk us around FollowSymLink rules?
  +             * When statbuf contains info on r->filename we can save a syscall
   	     * by copying it to r->finfo
   	     */
   	    if (*userdirs && dname[0] == 0)
  
  
  

Mime
View raw message