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/support ab.c htpasswd.c
Date Sat, 20 Jan 2001 21:42:23 GMT
wrowe       01/01/20 13:42:23

  Modified:    modules/cache mod_file_cache.c
               modules/dav/fs lock.c repos.c
               modules/filters mod_include.c
               modules/generators mod_cgi.c
               modules/http http_request.c
               modules/mappers mod_negotiation.c mod_rewrite.c
                        mod_userdir.c
               modules/proxy proxy_util.c
               os/unix  unixd.c
               os/win32 mod_isapi.c
               server   config.c log.c util.c
               server/mpm/beos beos.c
               server/mpm/dexter dexter.c
               server/mpm/mpmt_beos mpmt_beos.c
               server/mpm/mpmt_pthread mpmt_pthread.c
               server/mpm/perchild perchild.c
               server/mpm/prefork prefork.c
               server/mpm/spmt_os2 spmt_os2.c
               server/mpm/winnt mpm_winnt.c
               support  ab.c htpasswd.c
  Log:
    The changes required for the APR_FINFO_wanted argument to
    apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
    are simply the required changes to get the server working.
    The size of the patch is a warning about how we need to
    really look at what we are trying to accomplish with all
    of these stat/lstat calls.
  
  Revision  Changes    Path
  1.42      +8 -42     httpd-2.0/modules/cache/mod_file_cache.c
  
  Index: mod_file_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/cache/mod_file_cache.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- mod_file_cache.c	2001/01/19 07:04:16	1.41
  +++ mod_file_cache.c	2001/01/20 21:42:17	1.42
  @@ -157,39 +157,6 @@
       return sconf;
   }
   
  -#if APR_HAS_SENDFILE
  -static apr_status_t open_file(apr_file_t **file, const char *filename, int flg1, int flg2,

  -                             apr_pool_t *p)
  -{
  -    apr_status_t rv;
  -#ifdef WIN32
  -    /* The Windows file needs to be opened for overlapped i/o, which APR doesn't
  -     * support.
  -     */
  -    HANDLE hFile;
  -    /* XXX: This is wrong for unicode FS ... and it doesn't belong in httpd */
  -    hFile = CreateFile(filename,          /* pointer to name of the file */
  -                       GENERIC_READ,      /* access (read-write) mode */
  -                       FILE_SHARE_READ,   /* share mode */
  -                       NULL,              /* pointer to security attributes */
  -                       OPEN_EXISTING,     /* how to create */
  -                       FILE_FLAG_OVERLAPPED | FILE_FLAG_SEQUENTIAL_SCAN, /* file attributes
*/
  -                       NULL);            /* handle to file with attributes to copy */
  -    if (hFile != INVALID_HANDLE_VALUE) {
  -        rv = apr_put_os_file(file, &hFile, p);
  -    }
  -    else {
  -        rv = GetLastError();
  -        *file = NULL;
  -    }
  -#else
  -    rv = apr_open(file, filename, flg1, flg2, p);
  -#endif
  -
  -    return rv;
  -}
  -#endif /* APR_HAS_SENDFILE */
  -
   static apr_status_t cleanup_file_cache(void *sconfv)
   {
       a_server_config *sconf = sconfv;
  @@ -219,8 +186,8 @@
   {
       /* ToDo:
        * Disable the file cache on a Windows 9X box. APR_HAS_SENDFILE will be
  -     * defined in an Apache for Windows build, but apr_sendfile is not
  -     * implemened on Windows 9X because TransmitFile is not available.
  +     * defined in an Apache for Windows build, but apr_sendfile returns
  +     * APR_ENOTIMPL on Windows 9X because TransmitFile is not available.
        */
   
   #if APR_HAS_SENDFILE
  @@ -232,7 +199,9 @@
   
       /* canonicalize the file name? */
       /* os_canonical... */
  -    if ((rc = apr_stat(&tmp.finfo, filename, cmd->temp_pool)) != APR_SUCCESS) {
  +    /* XXX: uh... yea, or expect them to be -very- accurate typists */
  +    if ((rc = apr_stat(&tmp.finfo, filename, APR_FINFO_NORM, 
  +                       cmd->temp_pool)) != APR_SUCCESS) {
   	ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
   	    "mod_file_cache: unable to stat(%s), skipping", filename);
   	return NULL;
  @@ -243,11 +212,7 @@
   	return NULL;
       }
   
  -    /* Note: open_file should call apr_open for Unix and CreateFile for Windows.
  -     * The Windows file needs to be opened for async I/O to allow multiple threads
  -     * to serve it up at once.
  -     */
  -    rc = open_file(&fd, filename, APR_READ, APR_OS_DEFAULT, cmd->pool);
  +    rc = apr_open(&fd, filename, APR_READ | APR_XTHREAD, APR_OS_DEFAULT, cmd->pool);
       if (rc != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
                        "mod_file_cache: unable to open(%s, O_RDONLY), skipping", filename);
  @@ -285,7 +250,8 @@
       const char *fspec;
   
       fspec = ap_os_case_canonical_filename(cmd->pool, filename);
  -    if ((rc = apr_stat(&tmp.finfo, fspec, cmd->temp_pool)) != APR_SUCCESS) {
  +    if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_NORM, 
  +                       cmd->temp_pool)) != APR_SUCCESS) {
   	ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
   	    "mod_file_cache: unable to stat(%s), skipping", filename);
   	return NULL;
  
  
  
  1.13      +3 -3      httpd-2.0/modules/dav/fs/lock.c
  
  Index: lock.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/lock.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- lock.c	2000/11/26 04:47:39	1.12
  +++ lock.c	2001/01/20 21:42:17	1.13
  @@ -446,7 +446,7 @@
       apr_finfo_t finfo;
   
       /* ### use lstat() ?? */
  -    if (apr_stat(&finfo, file, p) == 0) {
  +    if (apr_stat(&finfo, file, APR_FINFO_NORM, p) == APR_SUCCESS) {
   
   	/* ### can we use a buffer for this? */
   	key.dsize = 1 + sizeof(finfo.inode) + sizeof(finfo.device);
  @@ -663,7 +663,7 @@
   		    apr_finfo_t finfo;
   
   		    /* if we don't see the file, then it's a locknull */
  -		    if (apr_lstat(&finfo, fname, p) != 0) {
  +		    if (apr_lstat(&finfo, fname, APR_FINFO_NORM, p) != APR_SUCCESS) {
   			if ((err = dav_fs_remove_locknull_member(p, fname, &buf)) != NULL) {
                               /* ### push a higher-level description? */
                               return err;
  @@ -833,7 +833,7 @@
   	return NULL;
       }
   
  -    if (apr_getfileinfo(&finfo, file) != APR_SUCCESS) {
  +    if (apr_getfileinfo(&finfo, APR_FINFO_NORM, file) != APR_SUCCESS) {
   	err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
   			    apr_psprintf(p,
   					"Opened but could not stat file %s",
  
  
  
  1.44      +7 -5      httpd-2.0/modules/dav/fs/repos.c
  
  Index: repos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/repos.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- repos.c	2001/01/20 11:29:34	1.43
  +++ repos.c	2001/01/20 21:42:17	1.44
  @@ -427,7 +427,7 @@
       src = apr_pstrcat(p, src_dir, "/" DAV_FS_STATE_DIR "/", src_file, NULL);
   
       /* the source file doesn't exist */
  -    if (apr_stat(&src_finfo, src, p) != 0) {
  +    if (apr_stat(&src_finfo, src, APR_FINFO_NORM, p) != APR_SUCCESS) {
   	return NULL;
       }
   
  @@ -447,7 +447,7 @@
       }
   
       /* get info about the state directory */
  -    if (apr_stat(&dst_state_finfo, dst, p) != 0) {
  +    if (apr_stat(&dst_state_finfo, dst, APR_FINFO_NORM, p) != APR_SUCCESS) {
   	/* Ack! Where'd it go? */
   	/* ### use something besides 500? */
   	return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
  @@ -735,7 +735,8 @@
   	parent_resource->uri = uri;
       }
   
  -    if (apr_stat(&parent_ctx->finfo, parent_ctx->pathname, ctx->pool) == 0)
{
  +    if (apr_stat(&parent_ctx->finfo, parent_ctx->pathname, 
  +                 APR_FINFO_NORM, ctx->pool) == APR_SUCCESS) {
           parent_resource->exists = 1;
       }
   
  @@ -1138,7 +1139,7 @@
   	 * so try it
   	 */
   	dirpath = ap_make_dirstr_parent(dstinfo->pool, dstinfo->pathname);
  -	if (apr_stat(&finfo, dirpath, dstinfo->pool) == 0
  +	if (apr_stat(&finfo, dirpath, APR_FINFO_NORM, dstinfo->pool) == 0
   	    && finfo.device == srcinfo->finfo.device) {
   	    can_rename = 1;
   	}
  @@ -1386,7 +1387,8 @@
   	/* append this file onto the path buffer (copy null term) */
   	dav_buffer_place_mem(pool, &fsctx->path1, name, len + 1, 0);
   
  -	if (apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf, pool) != 0) {
  +        if (apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf, 
  +                      APR_FINFO_NORM, pool) != APR_SUCCESS) {
   	    /* woah! where'd it go? */
   	    /* ### should have a better error here */
   	    err = dav_new_error(pool, HTTP_NOT_FOUND, 0, NULL);
  
  
  
  1.89      +5 -5      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- mod_include.c	2001/01/20 05:18:04	1.88
  +++ mod_include.c	2001/01/20 21:42:18	1.89
  @@ -1268,6 +1268,7 @@
       request_rec *rr = NULL;
       int ret=0;
       char *error_fmt = NULL;
  +    apr_status_t rv = APR_SUCCESS;
   
       if (!strcmp(tag, "file")) {
           /* be safe; only files in this directory or below allowed */
  @@ -1284,7 +1285,8 @@
   
               if (rr->status == HTTP_OK && rr->finfo.protection != 0) {
                   to_send = rr->filename;
  -                if (apr_stat(finfo, to_send, rr->pool) != APR_SUCCESS) {
  +                if (apr_stat(finfo, to_send, 
  +                             APR_FINFO_NORM, rr->pool) != APR_SUCCESS) {
                       error_fmt = "unable to get information about \"%s\" "
                           "in parsed file %s";
                   }
  @@ -1297,10 +1299,8 @@
   
           if (error_fmt) {
               ret = -1;
  -            /* TODO: pass APLOG_NOERRNO if no apr_stat() failure; pass rv from apr_stat()
  -             * otherwise
  -             */
  -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error_fmt, to_send, r->filename);
  +            ap_log_rerror(APLOG_MARK, APLOG_ERR | (rv ? 0 : APLOG_NOERRNO),
  +                          rv, r, error_fmt, to_send, r->filename);
           }
   
           if (rr) ap_destroy_sub_req(rr);
  
  
  
  1.80      +8 -5      httpd-2.0/modules/generators/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_cgi.c	2001/01/19 07:04:20	1.79
  +++ mod_cgi.c	2001/01/20 21:42:18	1.80
  @@ -194,10 +194,12 @@
                     "%s: %s", error, r->filename);
   
       if (!conf->logname ||
  -        ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname), r->pool)
== APR_SUCCESS)
  +        ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
  +                   APR_FINFO_NORM, r->pool) == APR_SUCCESS)
            &&  (finfo.size > conf->logbytes)) ||
             (apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
  -                   APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS))
{
  +                   APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool)
  +              != APR_SUCCESS)) {
   	return ret;
       }
   
  @@ -244,7 +246,8 @@
       char time_str[APR_CTIME_LEN];
   
       if (!conf->logname ||
  -        ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname), r->pool)
== APR_SUCCESS)
  +        ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
  +                   APR_FINFO_NORM, r->pool) == APR_SUCCESS)
            &&  (finfo.size > conf->logbytes)) ||
            (apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
                     APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS))
{
  @@ -553,8 +556,8 @@
           apr_status_t rv;
   
           newfile = apr_pstrcat(r->pool, r->filename, ".EXE", NULL);
  -        if (((rv = apr_stat(&finfo, newfile, r->pool)) != APR_SUCCESS) || 
  -            (finfo.filetype != APR_REG)) {
  +        if (((rv = apr_stat(&finfo, newfile, APR_FINFO_TYPE, r->pool))
  +                != APR_SUCCESS) || (finfo.filetype != APR_REG)) {
               return log_scripterror(r, conf, HTTP_NOT_FOUND, rv,
                                      "script not found or unable to stat");
           } else {
  
  
  
  1.76      +9 -7      httpd-2.0/modules/http/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- http_request.c	2001/01/19 17:19:51	1.75
  +++ http_request.c	2001/01/20 21:42:18	1.76
  @@ -176,7 +176,7 @@
       else
           lastp = NULL;
   
  -    res = apr_lstat(&lfi, d, p);
  +    res = apr_lstat(&lfi, d, APR_FINFO_NORM, p);
   
       if (lastp)
           *lastp = '/';
  @@ -194,10 +194,11 @@
       if (!(opts & OPT_SYM_OWNER))
           return HTTP_FORBIDDEN;
   
  -    if (apr_stat(&fi, d, p) < 0)
  +    if (apr_stat(&fi, d, APR_FINFO_NORM, p) != APR_SUCCESS)
           return HTTP_FORBIDDEN;
   
  -    return (fi.user == lfi.user) ? OK : HTTP_FORBIDDEN;
  +    return ((fi.valid & lfi.valid & APR_FINFO_OWNER)
  +            && (fi.user == lfi.user)) ? OK : HTTP_FORBIDDEN;
   
   #endif
   }
  @@ -271,7 +272,7 @@
            * an APR_PATHINCOMPLETE result to indicate that we are staring at
            * an partial virtual root.  Only OS2/Win32/Netware need apply it :-)
            */
  -        rv = apr_stat(&r->finfo, path, r->pool);
  +        rv = apr_stat(&r->finfo, path, APR_FINFO_NORM, r->pool);
   
           if (cp != end)
               *cp = '/';
  @@ -283,8 +284,8 @@
                * argument starts with the component after that.
                */
               if (r->finfo.filetype == APR_DIR && last_cp) {
  -                r->finfo.protection = 0;   /* No such file... */
  -                r->finfo.filetype = APR_NOFILE;   /* No such file... */
  +                r->finfo.protection = 0;  /* XXX: Wrong test for no such file... */
  +                r->finfo.filetype = APR_NOFILE;  /* No such file... */
                   cp = last_cp;
               }
   
  @@ -967,7 +968,8 @@
           rnew->filename = ap_make_full_path(rnew->pool, fdir, new_file);
           ap_parse_uri(rnew, rnew->uri);    /* fill in parsed_uri values */
   
  -        if (apr_stat(&rnew->finfo, rnew->filename, rnew->pool) != APR_SUCCESS)
{
  +        if (apr_stat(&rnew->finfo, rnew->filename,
  +                     APR_FINFO_NORM, rnew->pool) != APR_SUCCESS) {
               rnew->finfo.protection = 0;
           }
   
  
  
  
  1.49      +2 -1      httpd-2.0/modules/mappers/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_negotiation.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- mod_negotiation.c	2001/01/19 07:04:22	1.48
  +++ mod_negotiation.c	2001/01/20 21:42:19	1.49
  @@ -1469,7 +1469,8 @@
           char *fullname = ap_make_full_path(neg->pool, neg->dir_name,
                                              variant->file_name);
   
  -        if (apr_stat(&statb, fullname, neg->pool) == APR_SUCCESS) {
  +        if (apr_stat(&statb, fullname,
  +                     APR_FINFO_NORM, neg->pool) == APR_SUCCESS) {
               /* Note, precision may be lost */
               variant->bytes = (float) statb.size;
           }
  
  
  
  1.62      +19 -12    httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- mod_rewrite.c	2001/01/19 07:04:22	1.61
  +++ mod_rewrite.c	2001/01/20 21:42:19	1.62
  @@ -497,7 +497,8 @@
       newmap->fpout = NULL;
   
       if (newmap->checkfile && (sconf->state == ENGINE_ENABLED)
  -        && (apr_stat(&st, newmap->checkfile, cmd->pool) != APR_SUCCESS))
{
  +        && (apr_stat(&st, newmap->checkfile, APR_FINFO_NORM, 
  +                     cmd->pool) != APR_SUCCESS)) {
           return apr_pstrcat(cmd->pool,
                             "RewriteMap: map file or program not found:",
                             newmap->checkfile, NULL);
  @@ -2119,14 +2120,14 @@
   
       rc = 0;
       if (strcmp(p->pattern, "-f") == 0) {
  -        if (apr_stat(&sb, input, r->pool) == APR_SUCCESS) {
  +        if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
               if (sb.filetype == APR_REG) {
                   rc = 1;
               }
           }
       }
       else if (strcmp(p->pattern, "-s") == 0) {
  -        if (apr_stat(&sb, input, r->pool) == APR_SUCCESS) {
  +        if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
               if ((sb.filetype == APR_REG) && sb.size > 0) {
                   rc = 1;
               }
  @@ -2134,7 +2135,7 @@
       }
       else if (strcmp(p->pattern, "-l") == 0) {
   #if !defined(OS2)
  -        if (apr_lstat(&sb, input, r->pool) == APR_SUCCESS) {
  +        if (apr_lstat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
               if (sb.filetype == APR_LNK) {
                   rc = 1;
               }
  @@ -2142,7 +2143,7 @@
   #endif
       }
       else if (strcmp(p->pattern, "-d") == 0) {
  -        if (apr_stat(&sb, input, r->pool) == APR_SUCCESS) {
  +        if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
               if (sb.filetype == APR_DIR) {
                   rc = 1;
               }
  @@ -2179,7 +2180,8 @@
               /* file exists for any result up to 2xx, no redirects */
               if (rsub->status < 300 &&
                   /* double-check that file exists since default result is 200 */
  -                apr_stat(&sb, rsub->filename, r->pool) == APR_SUCCESS) {
  +                apr_stat(&sb, rsub->filename, APR_FINFO_NORM, 
  +                         r->pool) == APR_SUCCESS) {
                   rc = 1;
               }
   
  @@ -2661,7 +2663,8 @@
           s = &entries[i];
           if (strcmp(s->name, name) == 0) {
               if (s->type == MAPTYPE_TXT) {
  -                if ((rv = apr_stat(&st, s->checkfile, r->pool)) != APR_SUCCESS)
{
  +                if ((rv = apr_stat(&st, s->checkfile, 
  +                                   APR_FINFO_NORM, r->pool)) != APR_SUCCESS) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                                    "mod_rewrite: can't access text RewriteMap "
                                    "file %s", s->checkfile);
  @@ -2698,7 +2701,8 @@
               }
               else if (s->type == MAPTYPE_DBM) {
   #ifndef NO_DBM_REWRITEMAP
  -                if ((rv = apr_stat(&st, s->checkfile, r->pool)) != APR_SUCCESS)
{
  +                if ((rv = apr_stat(&st, s->checkfile,
  +                                   APR_FINFO_NORM, r->pool)) != APR_SUCCESS) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                                    "mod_rewrite: can't access DBM RewriteMap "
                                    "file %s", s->checkfile);
  @@ -2760,7 +2764,8 @@
                   }
               }
               else if (s->type == MAPTYPE_RND) {
  -                if ((rv = apr_stat(&st, s->checkfile, r->pool)) != APR_SUCCESS)
{
  +                if ((rv = apr_stat(&st, s->checkfile,
  +                                   APR_FINFO_NORM, r->pool)) != APR_SUCCESS) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                                    "mod_rewrite: can't access text RewriteMap "
                                    "file %s", s->checkfile);
  @@ -3596,7 +3601,8 @@
               }
           }
           else {
  -            if (apr_stat(&finfo, r->filename, r->pool) == APR_SUCCESS) {
  +            if (apr_stat(&finfo, r->filename,
  +                         APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
                   if ((pw = getpwuid(finfo.user)) != NULL) {
                       result = pw->pw_name;
                   }
  @@ -3611,7 +3617,8 @@
               }
           }
           else {
  -            if (apr_stat(&finfo, r->filename, r->pool) == 0) {
  +            if (apr_stat(&finfo, r->filename,
  +                         APR_FINFO_NORM, r->pool) == 0) {
                   if ((gr = getgrgid(finfo.group)) != NULL) {
                       result = gr->gr_name;
                   }
  @@ -4034,7 +4041,7 @@
       if ((cp = strchr(curpath+1, '/')) != NULL) {
           *cp = '\0';
       }
  -    if (apr_stat(sb, curpath, NULL) == 0) {
  +    if (apr_stat(sb, curpath, APR_FINFO_NORM, NULL) == APR_SUCCESS) {
           return 1;
       }
       else {
  
  
  
  1.31      +2 -1      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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_userdir.c	2001/01/19 07:04:23	1.30
  +++ mod_userdir.c	2001/01/20 21:42:19	1.31
  @@ -344,7 +344,8 @@
            * used, for example, to run a CGI script for the user.
            */
           if (filename && (!*userdirs || 
  -            apr_stat(&statbuf, filename, r->pool) == APR_SUCCESS)) {
  +            apr_stat(&statbuf, filename, 
  +                     APR_FINFO_NORM, r->pool) == APR_SUCCESS)) {
               r->filename = apr_pstrcat(r->pool, filename, dname, NULL);
   	    /* when statbuf contains info on r->filename we can save a syscall
   	     * by copying it to r->finfo
  
  
  
  1.36      +1 -1      httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- proxy_util.c	2001/01/19 07:04:25	1.35
  +++ proxy_util.c	2001/01/20 21:42:19	1.36
  @@ -1271,7 +1271,7 @@
       len = 2;
       apr_send(fp, CRLF, &len);
       /* send data */
  -    apr_getfileinfo(&finfo, cachefp);
  +    apr_getfileinfo(&finfo, APR_FINFO_NORM, cachefp);
       if(!r->header_only && ap_send_fd(cachefp, r, offset, finfo.size, &len))
           return HTTP_INTERNAL_SERVER_ERROR;
       return OK;
  
  
  
  1.33      +2 -1      httpd-2.0/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- unixd.c	2001/01/20 06:05:15	1.32
  +++ unixd.c	2001/01/20 21:42:19	1.33
  @@ -230,7 +230,8 @@
   
       /* Check for suexec */
       unixd_config.suexec_enabled = 0;
  -    if ((apr_stat(&wrapper, SUEXEC_BIN, ptemp)) != APR_SUCCESS) {
  +    if ((apr_stat(&wrapper, SUEXEC_BIN, 
  +                  APR_FINFO_NORM, ptemp)) != APR_SUCCESS) {
           return;
       }
   
  
  
  
  1.35      +2 -1      httpd-2.0/os/win32/mod_isapi.c
  
  Index: mod_isapi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/win32/mod_isapi.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- mod_isapi.c	2001/01/19 07:04:27	1.34
  +++ mod_isapi.c	2001/01/20 21:42:20	1.35
  @@ -1238,7 +1238,8 @@
       char *fspec;
       
       fspec = ap_os_case_canonical_filename(cmd->pool, filename);
  -    if (apr_stat(&tmp, fspec, cmd->temp_pool) != APR_SUCCESS) { 
  +    if (apr_stat(&tmp, fspec, 
  +                 APR_FINFO_NORM, cmd->temp_pool) != APR_SUCCESS) { 
   	ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
   	    "ISAPI: unable to stat(%s), skipping", filename);
   	return NULL;
  
  
  
  1.102     +1 -1      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- config.c	2001/01/19 13:43:38	1.101
  +++ config.c	2001/01/20 21:42:20	1.102
  @@ -1284,7 +1284,7 @@
       if ((ap_server_pre_read_config->nelts
   	 || ap_server_post_read_config->nelts)
   	&& !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) {
  -	if (apr_stat(&finfo, fname, p) != APR_SUCCESS)     
  +	if (apr_stat(&finfo, fname, APR_FINFO_NORM, p) != APR_SUCCESS)
   	    return;
       }
   
  
  
  
  1.82      +2 -1      httpd-2.0/server/log.c
  
  Index: log.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/log.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- log.c	2001/01/18 23:52:03	1.81
  +++ log.c	2001/01/20 21:42:20	1.82
  @@ -520,7 +520,8 @@
   
       fname = ap_server_root_relative(p, fname);
       mypid = getpid();
  -    if (mypid != saved_pid && apr_stat(&finfo, fname, p) == APR_SUCCESS) {
  +    if (mypid != saved_pid 
  +         && apr_stat(&finfo, fname, APR_FINFO_NORM, p) == APR_SUCCESS) {
         /* WINCH and HUP call this on each restart.
          * Only warn on first time through for this pid.
          *
  
  
  
  1.94      +3 -3      httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- util.c	2001/01/20 06:05:15	1.93
  +++ util.c	2001/01/20 21:42:20	1.94
  @@ -895,7 +895,7 @@
       if (status != APR_SUCCESS)
           return status;
   
  -    status = apr_getfileinfo(&finfo, file);
  +    status = apr_getfileinfo(&finfo, APR_FINFO_NORM, file);
       if (status != APR_SUCCESS)
           return status;
   
  @@ -1679,7 +1679,7 @@
   {
       apr_finfo_t finfo;
   
  -    if (apr_stat(&finfo, path, p) == -1)
  +    if (apr_stat(&finfo, path, APR_FINFO_NORM, p) != APR_SUCCESS)
   	return 0;		/* in error condition, just return no */
   
       return (finfo.filetype == APR_DIR);
  @@ -1689,7 +1689,7 @@
   {
       apr_finfo_t finfo;
   
  -    if (apr_lstat(&finfo, path, p) == -1)
  +    if (apr_lstat(&finfo, path, APR_FINFO_NORM, p) != APR_SUCCESS)
   	return 0;		/* in error condition, just return no */
   
       return (finfo.filetype == APR_DIR);
  
  
  
  1.32      +2 -2      httpd-2.0/server/mpm/beos/beos.c
  
  Index: beos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- beos.c	2001/01/19 07:04:31	1.31
  +++ beos.c	2001/01/20 21:42:20	1.32
  @@ -1003,8 +1003,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.138     +2 -2      httpd-2.0/server/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/dexter/dexter.c,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- dexter.c	2001/01/19 07:04:32	1.137
  +++ dexter.c	2001/01/20 21:42:21	1.138
  @@ -1347,8 +1347,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.58      +2 -2      httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mpmt_beos.c	2001/01/19 07:04:32	1.57
  +++ mpmt_beos.c	2001/01/20 21:42:21	1.58
  @@ -1015,8 +1015,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.133     +2 -2      httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- mpmt_pthread.c	2001/01/19 07:04:33	1.132
  +++ mpmt_pthread.c	2001/01/20 21:42:21	1.133
  @@ -1364,8 +1364,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.36      +2 -2      httpd-2.0/server/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- perchild.c	2001/01/19 07:04:33	1.35
  +++ perchild.c	2001/01/20 21:42:21	1.36
  @@ -1719,8 +1719,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.145     +2 -2      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- prefork.c	2001/01/19 07:04:34	1.144
  +++ prefork.c	2001/01/20 21:42:22	1.145
  @@ -1715,8 +1715,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.72      +2 -2      httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- spmt_os2.c	2001/01/19 07:04:34	1.71
  +++ spmt_os2.c	2001/01/20 21:42:22	1.72
  @@ -1496,8 +1496,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.127     +2 -2      httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- mpm_winnt.c	2001/01/19 07:04:34	1.126
  +++ mpm_winnt.c	2001/01/20 21:42:22	1.127
  @@ -2299,8 +2299,8 @@
       }
   
       fname = ap_server_root_relative(cmd->pool, arg);
  -    if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) || 
  -        (finfo.filetype != APR_DIR)) {
  +    if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS) 
  +        || (finfo.filetype != APR_DIR)) {
   	return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, 
   			  " does not exist or is not a directory", NULL);
       }
  
  
  
  1.53      +3 -3      httpd-2.0/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/ab.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- ab.c	2001/01/19 07:04:36	1.52
  +++ ab.c	2001/01/20 21:42:23	1.53
  @@ -903,14 +903,14 @@
   static void copyright(void)
   {
       if (!use_html) {
  -        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.52 $>
apache-2.0");
  +        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.53 $>
apache-2.0");
           printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
           printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
           printf("\n");
       }
       else {
           printf("<p>\n");
  -        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.52 $");
  +        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.53 $");
           printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
           printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
           printf("</p>\n<p>\n");
  @@ -1002,7 +1002,7 @@
           return rv;
       }
   
  -    apr_getfileinfo(&finfo, postfd);
  +    apr_getfileinfo(&finfo, APR_FINFO_NORM, postfd);
       postlen = finfo.size;
       postdata = (char *)malloc(postlen);
       if (!postdata) {
  
  
  
  1.32      +1 -1      httpd-2.0/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- htpasswd.c	2001/01/19 07:04:36	1.31
  +++ htpasswd.c	2001/01/20 21:42:23	1.32
  @@ -357,7 +357,7 @@
       apr_finfo_t sbuf;
       apr_status_t check;
   
  -    check = apr_stat(&sbuf, fname, NULL);
  +    check = apr_stat(&sbuf, fname, APR_FINFO_NORM, NULL);
       return (check ? 0 : 1);
   }
   
  
  
  

Mime
View raw message