X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead-collect.c;h=eac11e7e5c160477f6c8ba61fd4d2394a67b6b97;hp=3c48a02fc9e49dc9a92c3e43d4715a0dbcbfbbe9;hb=99e68c0b2d6ca9d491036920fcbca4c8d54404a8;hpb=2b583ce6576d4a074ce6f1570b3e60b65c64ae7d diff --git a/src/readahead-collect.c b/src/readahead-collect.c index 3c48a02fc..eac11e7e5 100644 --- a/src/readahead-collect.c +++ b/src/readahead-collect.c @@ -49,6 +49,7 @@ #include "sd-daemon.h" #include "ioprio.h" #include "readahead-common.h" +#include "virt.h" /* fixme: * @@ -383,6 +384,16 @@ static int collect(const char *root) { if (errno == EINTR || errno == EAGAIN) continue; + /* fanotify sometimes returns EACCES on read() + * where it shouldn't. For now let's just + * ignore it here (which is safe), but + * eventually this should be + * dropped when the kernel is fixed. + * + * https://bugzilla.redhat.com/show_bug.cgi?id=707577 */ + if (errno == EACCES) + continue; + log_error("Failed to read event: %m"); r = -errno; goto finish; @@ -646,6 +657,8 @@ int main(int argc, char *argv[]) { log_parse_environment(); log_open(); + umask(0022); + if ((r = parse_argv(argc, argv)) <= 0) return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;