log_debug("Collecting...");
- if (access("/dev/.run/systemd/readahead/cancel", F_OK) >= 0) {
+ if (access("/run/systemd/readahead/cancel", F_OK) >= 0) {
log_debug("Collection canceled");
r = -ECANCELED;
goto finish;
}
- if (access("/dev/.run/systemd/readahead/done", F_OK) >= 0) {
+ if (access("/run/systemd/readahead/done", F_OK) >= 0) {
log_debug("Got termination request");
goto done;
}
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;
log_parse_environment();
log_open();
+ umask(0022);
+
if ((r = parse_argv(argc, argv)) <= 0)
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;