ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
572a44
From 710be393ae8d15a274f376677aa68c27cd107356 Mon Sep 17 00:00:00 2001
a4b143
From: Kay Sievers <kay@vrfy.org>
a4b143
Date: Thu, 17 Oct 2013 03:20:46 +0200
a4b143
Subject: [PATCH] tmpfiles: log unaccessible FUSE mount points only as debug
a4b143
 message
a4b143
a4b143
---
a4b143
 src/tmpfiles/tmpfiles.c | 11 +++++++----
a4b143
 1 file changed, 7 insertions(+), 4 deletions(-)
a4b143
a4b143
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
572a44
index 8122d6a..239e56b 100644
a4b143
--- a/src/tmpfiles/tmpfiles.c
a4b143
+++ b/src/tmpfiles/tmpfiles.c
572a44
@@ -275,12 +275,15 @@ static int dir_cleanup(
a4b143
                         continue;
a4b143
 
a4b143
                 if (fstatat(dirfd(d), dent->d_name, &s, AT_SYMLINK_NOFOLLOW) < 0) {
a4b143
+                        if (errno == ENOENT)
a4b143
+                                continue;
a4b143
 
a4b143
-                        if (errno != ENOENT) {
a4b143
+                        /* FUSE, NFS mounts, SELinux might return EACCES */
a4b143
+                        if (errno == EACCES)
a4b143
+                                log_debug("stat(%s/%s) failed: %m", p, dent->d_name);
a4b143
+                        else
a4b143
                                 log_error("stat(%s/%s) failed: %m", p, dent->d_name);
a4b143
-                                r = -errno;
a4b143
-                        }
a4b143
-
a4b143
+                        r = -errno;
a4b143
                         continue;
a4b143
                 }
a4b143