SHA256
1
0
forked from pool/systemd
systemd/fix-dir-noatime-tmpfiles.patch
Stephan Kulow 742890720c Accepting request 127019 from Base:System
- Add fix-dir-noatime-tmpfiles.patch: do not modify directory
  atime, which was preventing removing empty directories
  (bnc#751253, rh#810257).
- Add improve-restart-behaviour.patch: prevent deadlock during
  try-restart (bnc#743218).
- Add journal-bugfixes.patch: don't crash when rotating journal
  (bnc#768953) and prevent memleak at rotation time too.
- Add ulimit-support.patch: add support for system wide ulimit
  (bnc#744818).
- Add change-terminal.patch: use vt102 instead of vt100 as terminal
  for non-vc tty.
- Package various .wants directories, which were no longer packaged
  due to plymouth units being removed from systemd package.
- Fix buildrequires for manpages build. (forwarded request 127017 from fcrozat)

OBS-URL: https://build.opensuse.org/request/show/127019
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=103
2012-07-03 19:42:50 +00:00

42 lines
1.5 KiB
Diff

From de49f6dd99aca059da24c9afc672782f1768abd2 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Wed, 11 Apr 2012 21:33:12 +0200
Subject: [PATCH] tmpfiles: open directories with O_NOATIME to preserve
timestamp
Before:
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:32:48.444920237 +0200
# systemd-tmpfiles --clean
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:36:27.628925459 +0200
After:
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:32:48.444920237 +0200
# ./systemd-tmpfiles --clean
# stat /tmp/pulse-Du5ectm60QYM | grep 'Access: 20'
Access: 2012-04-11 21:32:48.444920237 +0200
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=810257
---
src/tmpfiles.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index 21bf44d..09eefcf 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -250,7 +250,7 @@ static int dir_cleanup(
DIR *sub_dir;
int q;
- sub_dir = xopendirat(dirfd(d), dent->d_name, O_NOFOLLOW);
+ sub_dir = xopendirat(dirfd(d), dent->d_name, O_NOFOLLOW|O_NOATIME);
if (sub_dir == NULL) {
if (errno != ENOENT) {
log_error("opendir(%s/%s) failed: %m", p, dent->d_name);
--
1.7.7