chiark / gitweb /
journal: remove all of /run/log/journal when serializing, since the machine ID might...
[elogind.git] / src / journal / journald.c
index 17aac8877b778f663669617e16097bc6d4456aa2..3e7581815b562d849ea2698a605f501d0befa990 100644 (file)
@@ -868,7 +868,8 @@ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned
                         return;
         }
 
-        log_debug("Failed to forward syslog message: %m");
+        if (errno != ENOENT)
+                log_debug("Failed to forward syslog message: %m");
 }
 
 static void forward_syslog_raw(Server *s, int priority, const char *buffer, struct ucred *ucred, struct timeval *tv) {
@@ -2146,11 +2147,8 @@ finish:
         journal_file_close(s->runtime_journal);
         s->runtime_journal = NULL;
 
-        if (r >= 0) {
-                char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
-                sd_id128_to_string(machine, path + 17);
-                rm_rf(path, false, true, false);
-        }
+        if (r >= 0)
+                rm_rf("/run/log/journal", false, true, false);
 
         return r;
 }