chiark / gitweb /
mkdir: append _label to all mkdir() calls that explicitly set the selinux context
[elogind.git] / src / journal / journald.c
index 8ce9ce858bc88e44a9b284675089961dce2310d6..e0e7cce1227d4aea19cc2934939efd56ae6445ee 100644 (file)
@@ -1827,7 +1827,7 @@ static void proc_kmsg_line(Server *s, const char *p) {
 
                 /* Avoid any messages we generated ourselves via
                  * log_info() and friends. */
-                if (is_us(pid))
+                if (pid && is_us(pid))
                         goto finish;
 
                 if (s->forward_to_syslog)
@@ -1973,7 +1973,7 @@ static int system_journal_open(Server *s) {
                         /* OK, we really need the runtime journal, so create
                          * it if necessary. */
 
-                        (void) mkdir_parents(fn, 0755);
+                        (void) mkdir_parents_label(fn, 0755);
                         r = journal_file_open_reliably(fn, O_RDWR|O_CREAT, 0640, NULL, &s->runtime_journal);
                         free(fn);