daandemeyer / rpms / systemd

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