daandemeyer / rpms / systemd

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