X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald.c;h=a6f27f6ef4cc86c765adfddc4a9b844db754c5ba;hb=9eb977db5b89b44f254ab40c1876a76b7d7ea2d0;hp=555d74f04985c911fe0c77262561118d26642a9a;hpb=3eff4208ffecedd778fec260f0d4b18e94dab443;p=elogind.git
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 555d74f04..a6f27f6ef 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"
@@ -1147,7 +1148,7 @@ static void process_native_message(
char *identifier = NULL, *message = NULL;
assert(s);
- assert(buffer || n == 0);
+ assert(buffer || buffer_size == 0);
p = buffer;
remaining = buffer_size;
@@ -2478,8 +2479,7 @@ static int open_proc_kmsg(Server *s) {
if (!s->import_proc_kmsg)
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;