daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
a4b143
From 1d007bd94d09c955d548f4425a591f5a3bf032e4 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
a4b143
index 5eca82a..ea99920 100644
a4b143
--- a/src/tmpfiles/tmpfiles.c
a4b143
+++ b/src/tmpfiles/tmpfiles.c
a4b143
@@ -273,12 +273,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