1 diff -ur httpd-2.2.0.org/server/config.c httpd-2.2.0/server/config.c
2 --- httpd-2.2.0.org/server/config.c 2005-11-17 14:39:15.000000000 +0100
3 +++ httpd-2.2.0/server/config.c 2005-12-21 16:04:35.970963000 +0100
9 apr_array_header_t *candidates = NULL;
11 char *path = apr_pstrdup(p, fname);
12 @@ -1562,8 +1563,13 @@
14 candidates = apr_array_make(p, 1, sizeof(fnames));
15 while (apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp) == APR_SUCCESS) {
16 + slen = strlen(dirent.name);
17 /* strip out '.' and '..' */
18 - if (strcmp(dirent.name, ".")
19 + if (strcmp(dirent.name, ".") && (dirent.name)[slen-1] != '~'
20 + && (dirent.name)[0] != '.'
21 + && (slen < 8 || strcmp((dirent.name + slen - 7), ".rpmnew"))
22 + && (slen < 9 || ( strcmp((dirent.name + slen - 8), ".rpmorig")
23 + && strcmp((dirent.name + slen - 8), ".rpmsave")))
24 && strcmp(dirent.name, "..")) {
25 fnew = (fnames *) apr_array_push(candidates);
26 fnew->fname = ap_make_full_path(p, path, dirent.name);