summaryrefslogtreecommitdiff
path: root/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch')
-rw-r--r--app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch b/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch
new file mode 100644
index 000000000000..9c07a4471e18
--- /dev/null
+++ b/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch
@@ -0,0 +1,46 @@
+--- tmpreaper-1.6.13+nmu1/tmpreaper.c.orig 2006-12-05 10:55:58.000000000 -0800
++++ tmpreaper-1.6.13+nmu1/tmpreaper.c 2006-12-05 10:56:46.000000000 -0800
+@@ -467,6 +467,21 @@
+ continue;
+ }
+
++ 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) ||