From 5fa0a1c9a1cde134b43c3f32d396285c445a4797 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Jul 19 2011 20:31:26 +0000 Subject: Ignore EACCES on lstat() (caused e.g. by FUSE) --- diff --git a/ChangeLog b/ChangeLog index c132268..2ab6c93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-19 Miloslav Trmač + + * tmpwatch.c (cleanupDirectory): Ignore EACCES on lstat(), this can be + routinely returned by FUSE. + 2011-04-28 Miloslav Trmač * bind-mount.c (read_mount_entry): Fix an EOF check. diff --git a/tmpwatch.c b/tmpwatch.c index 755ccf3..0957146 100644 --- a/tmpwatch.c +++ b/tmpwatch.c @@ -352,7 +352,8 @@ cleanupDirectory(const char * fulldirname, const char *reldirname, if (!ent) break; if (lstat(ent->d_name, &sb)) { - if (errno != ENOENT) + /* FUSE mounts by different users return EACCES by default. */ + if (errno != ENOENT && errno != EACCES) message(LOG_ERROR, "failed to lstat %s/%s: %s\n", fulldirname, ent->d_name, strerror(errno)); continue;