X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald.c;h=2e2d30f8e8df4a7a63f29c9fc1f24504dd140ed3;hb=2abf99ac076299d80ed595fa4ae5cc46bb455975;hp=555d74f04985c911fe0c77262561118d26642a9a;hpb=3eff4208ffecedd778fec260f0d4b18e94dab443;p=elogind.git diff --git a/src/journal/journald.c b/src/journal/journald.c index 555d74f04..2e2d30f8e 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -6,16 +6,16 @@ Copyright 2011 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ @@ -35,6 +35,7 @@ #include #include +#include "mkdir.h" #include "hashmap.h" #include "journal-file.h" #include "socket-util.h" @@ -2479,7 +2480,7 @@ static int open_proc_kmsg(Server *s) { return 0; - s->proc_kmsg_fd = open("/proc/kmsg", O_CLOEXEC|O_NONBLOCK|O_NOCTTY); + s->proc_kmsg_fd = open("/proc/kmsg", O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); if (s->proc_kmsg_fd < 0) { log_warning("Failed to open /proc/kmsg, ignoring: %m"); return 0;