[systemd-devel] [PATCH] readahead-collect.c: ignore EPERM for fanotify

Harald Hoyer harald.hoyer at gmail.com
Tue May 24 12:01:49 PDT 2011


Am 24.05.2011 19:49, schrieb harald at redhat.com:
> From: Harald Hoyer<harald at redhat.com>
>
> There are files, which we are not allowed to read.
> Happens for example, if selinux is activated.
> ---
>   src/readahead-collect.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/readahead-collect.c b/src/readahead-collect.c
> index 3c48a02..b556706 100644
> --- a/src/readahead-collect.c
> +++ b/src/readahead-collect.c
> @@ -380,7 +380,7 @@ static int collect(const char *root) {
>
>                   if ((n = read(fanotify_fd,&data, sizeof(data)))<  0) {
>
> -                        if (errno == EINTR || errno == EAGAIN)
> +                        if (errno == EINTR || errno == EAGAIN || errno == EPERM)
>                                   continue;
>
>                           log_error("Failed to read event: %m");

hmm, of course this might not work, because we can't read the event.


More information about the systemd-devel mailing list