Commit 12e6d823 authored by Joe Orton's avatar Joe Orton
Browse files

Backport from HEAD:

* Makefile.in: Link httpd against user-supplied $(LIBS).

* modules/standard/mod_autoindex.c (index_directory): If stat() fails
for a particular dirent, ignore that entry rather than truncating the
directory listing.

PR: 7882, 17357
Reviewed by: stoddard, trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@104815 13f79535-47bb-0310-9956-ffa450edef68
parent aa8a8d7d
Loading
Loading
Loading
Loading
+8 −1
Changes for CHANGES: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
Changes with Apache 2.0.51
  *) mod_autoindex: Don't truncate the directory listing if a stat()
     call fails (for instance on a >2Gb file).  PR 17357.
     [Joe Orton]
  *) Makefile fix: httpd is linked against LIBS given to the
     'make' invocation.  PR 7882.  [Joe Orton]
  *) WinNT MPM: Fix a broken log message at termination.  PR 28063.
     [Eider Oliveira <eider bol.com.br>]
@@ -76,7 +83,7 @@ Changes with Apache 2.0.51
     This makes the cache work on Linux again. [Graham Leggett]
  *) Enable special ErrorDocument value 'default' which restores the
     canned server response for the scope of the directive
     canned server response for the scope of the directive.
     [Geoffrey Young, Andre Malo]
  *) work around MSIE Digest auth bug - if AuthDigestEnableQueryStringHack
+1 −1
Changes for Makefile.in: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ CLEAN_SUBDIRS = test

PROGRAM_NAME         = $(progname)
PROGRAM_SOURCES      = modules.c
PROGRAM_LDADD        = $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS)
PROGRAM_LDADD        = $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
PROGRAM_DEPENDENCIES = \
  $(BUILTIN_LIBS) \
  $(MPM_LIB) \
+1 −12
Changes for STATUS: 1 added line, 12 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/08/26 12:12:00 $]
Last modified at [$Date: 2004/08/26 13:01:17 $]

Release:

@@ -94,17 +94,6 @@ PATCHES TO BACKPORT FROM 2.1
       PR: 30134
       +1: jorton, trawick

    *) Build fix: ensure httpd is linked against user-supplied LIBS during make.
       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/Makefile.in?r1=1.138&r2=1.139
       PR: 7882
       +1: jorton, stoddard, trawick

    *) mod_autoindex: Don't truncate directory listing when a stat call fails.
       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/generators/mod_autoindex.c?r1=1.132&r2=1.133
       PR: 17357
       +1: jorton, stoddard (stat fails when file size > 2GB even if
           large file support is enabled), trawick

    *) unixd_accept: Eliminate now-unnecessary apr_os_sock_get() call.
       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/os/unix/unixd.c?r1=1.66&r2=1.67
       +1: jorton, trawick
+12 −3
Changes for modules/generators/mod_autoindex.c: 12 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2098,8 +2098,16 @@ static int index_directory(request_rec *r,
    fullpath = apr_palloc(r->pool, APR_PATH_MAX);
    dirpathlen = strlen(name);
    memcpy(fullpath, name, dirpathlen);
    while (apr_dir_read(&dirent, APR_FINFO_MIN | APR_FINFO_NAME,
                        thedir) == APR_SUCCESS) {

    do {
        status = apr_dir_read(&dirent, APR_FINFO_MIN | APR_FINFO_NAME, thedir);
        if (APR_STATUS_IS_INCOMPLETE(status)) {
            continue; /* ignore un-stat()able files */
        }
        else if (status != APR_SUCCESS) {
            break;
        }

        /* We want to explode symlinks here. */
        if (dirent.filetype == APR_LNK) {
            const char *savename;
@@ -2125,7 +2133,8 @@ static int index_directory(request_rec *r,
            head = p;
            num_ent++;
        }
    }
    } while (1);

    if (num_ent > 0) {
        ar = (struct ent **) apr_palloc(r->pool,
                                        num_ent * sizeof(struct ent *));