Lennart Poettering 7e98ac
From 3afe3725fcf21fab7204243b9485a118e499b4a3 Mon Sep 17 00:00:00 2001
Lennart Poettering 7e98ac
From: Harald Hoyer <harald@redhat.com>
Lennart Poettering 7e98ac
Date: Wed, 25 May 2011 13:09:08 +0200
Lennart Poettering 7e98ac
Subject: [PATCH] readahead-collect: ignore EACCES for fanotify
Lennart Poettering 7e98ac
Lennart Poettering 7e98ac
At the start of auditd, we are temporarily not able to read
Lennart Poettering 7e98ac
from the fanotify fd. Ignoring it, seems to work.
Lennart Poettering 7e98ac
---
Lennart Poettering 7e98ac
 src/readahead-collect.c |    2 +-
Lennart Poettering 7e98ac
 1 files changed, 1 insertions(+), 1 deletions(-)
Lennart Poettering 7e98ac
Lennart Poettering 7e98ac
diff --git a/src/readahead-collect.c b/src/readahead-collect.c
Lennart Poettering 7e98ac
index 3c48a02..913a340 100644
Lennart Poettering 7e98ac
--- a/src/readahead-collect.c
Lennart Poettering 7e98ac
+++ b/src/readahead-collect.c
Lennart Poettering 7e98ac
@@ -380,7 +380,7 @@ static int collect(const char *root) {
Lennart Poettering 7e98ac
 
Lennart Poettering 7e98ac
                 if ((n = read(fanotify_fd, &data, sizeof(data))) < 0) {
Lennart Poettering 7e98ac
 
Lennart Poettering 7e98ac
-                        if (errno == EINTR || errno == EAGAIN)
Lennart Poettering 7e98ac
+                        if (errno == EINTR || errno == EAGAIN || errno == EACCES)
Lennart Poettering 7e98ac
                                 continue;
Lennart Poettering 7e98ac
 
Lennart Poettering 7e98ac
                         log_error("Failed to read event: %m");
Lennart Poettering 7e98ac
-- 
Lennart Poettering 7e98ac
1.7.5.2
Lennart Poettering 7e98ac