summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch')
-rw-r--r--app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch60
1 files changed, 38 insertions, 22 deletions
diff --git a/app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch b/app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch
index 8b114c1e237d..a76c80dd5fc7 100644
--- a/app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch
+++ b/app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch
@@ -1,30 +1,46 @@
---- tmpreaper.c.orig 2005-11-13 13:30:35.000000000 -0800
-+++ tmpreaper.c 2005-11-13 13:31:29.000000000 -0800
-@@ -464,13 +464,6 @@
+--- tmpreaper.c.orig 2006-12-05 10:55:58.000000000 -0800
++++ tmpreaper.c 2006-12-05 10:56:46.000000000 -0800
+@@ -467,6 +467,21 @@
continue;
}
-- if (S_ISDIR (sb.st_mode)) {
-- cleanupDirectory (ent->d_name, killTime, flags);
-- message (LOG_VERBOSE,
-- "(PID %u) Back from recursing down `%s'.\n",
-- (u_int) getpid(), ent->d_name);
-- }
--
- if (FLAGS_PROTECT_P (flags)) {
- skip = i = 0;
- do {
-@@ -486,6 +479,13 @@
- continue;
- }
-
-+ if (S_ISDIR (sb.st_mode)) {
-+ cleanupDirectory (ent->d_name, killTime, flags);
-+ message (LOG_VERBOSE,
-+ "(PID %u) Back from recursing down `%s'.\n",
-+ (u_int) getpid(), ent->d_name);
++ if (FLAGS_PROTECT_P (flags)) {
++ skip = i = 0;
++ do {
++ if (sb.st_ino == protect_table[i].inode) {
++ message (LOG_VERBOSE,
++ "Entry matching `--protect' pattern skipped. `%s'\n",
++ protect_table[i].name);
++ skip = 1;
++ break;
++ }
++ } while (protect_table[i++].name);
++ if (skip)
++ continue;
+ }
+
+ if (S_ISDIR (sb.st_mode)) {
+ char *dst;
+
+@@ -489,21 +504,6 @@
+ (u_int) getpid(), ent->d_name);
+ }
+
+- if (FLAGS_PROTECT_P (flags)) {
+- skip = i = 0;
+- do {
+- if (sb.st_ino == protect_table[i].inode) {
+- message (LOG_VERBOSE,
+- "Entry matching `--protect' pattern skipped. `%s'\n",
+- protect_table[i].name);
+- skip = 1;
+- break;
+- }
+- } while (protect_table[i++].name);
+- if (skip)
+- continue;
+- }
+-
/* Decide whether to remove the file or not */
/* check for mtime on directory instead of atime if requested */
if ( FLAGS_MTIME_P(flags) ||