]> git.pld-linux.org Git - packages/apache.git/blame - apache-configdir_skip_backups.patch
- merged DEVEL, started SECURITY update to 1.3.26
[packages/apache.git] / apache-configdir_skip_backups.patch
CommitLineData
f1800b13
AF
1--- apache_1.3.17/src/main/http_config.c.wiget Thu May 10 14:41:08 2001
2+++ apache_1.3.17/src/main/http_config.c Thu May 10 15:42:12 2001
3@@ -1287,6 +1287,7 @@
4 DIR *dirp;
5 struct DIR_TYPE *dir_entry;
6 int current;
7+ size_t slen;
8 array_header *candidates = NULL;
9 fnames *fnew;
10
11@@ -1309,11 +1310,19 @@
12 }
13 candidates = ap_make_array(p, 1, sizeof(fnames));
14 while ((dir_entry = readdir(dirp)) != NULL) {
15+ slen = strlen(dir_entry->d_name);
16 /* strip out '.' and '..' */
17 if (strcmp(dir_entry->d_name, ".") &&
18- strcmp(dir_entry->d_name, "..")) {
19- fnew = (fnames *) ap_push_array(candidates);
20- fnew->fname = ap_make_full_path(p, fname, dir_entry->d_name);
21+ strcmp(dir_entry->d_name, "..") &&
22+ (dir_entry->d_name)[slen-1] != '~') {
23+ if (slen < 8 || strcmp((dir_entry->d_name + slen - 7), ".rpmnew")) {
24+ if (slen < 9 ||
25+ strcmp((dir_entry->d_name + slen - 8), ".rpmorig") &&
26+ strcmp((dir_entry->d_name + slen - 8), ".rpmsave")) {
27+ fnew = (fnames *) ap_push_array(candidates);
28+ fnew->fname = ap_make_full_path(p, fname, dir_entry->d_name);
29+ }
30+ }
31 }
32 }
33 ap_pclosedir(p, dirp);
This page took 0.080412 seconds and 4 git commands to generate.