]> err.no Git - systemd/commitdiff
journald: add missing flag to open()
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Apr 2012 10:57:41 +0000 (12:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 12 Apr 2012 10:58:19 +0000 (12:58 +0200)
src/journal/journald.c

index 1549e6e03900a2151d0d3ac3bfbb9445493042cb..2e2d30f8e8df4a7a63f29c9fc1f24504dd140ed3 100644 (file)
@@ -2480,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;