X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald-server.c;h=9709889e4acb07794dfae8adf307aa58d183798e;hb=bf3d3e2bb7ae2d3854be57f28dd1403c8f7e4c3c;hp=eac0a4ca67ede68e7dcd40ad70ee44c343e79fee;hpb=a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8;p=elogind.git diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index eac0a4ca6..9709889e4 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -680,7 +680,7 @@ static void dispatch_message_real( } #ifdef HAVE_SELINUX - if (use_selinux()) { + if (mac_selinux_use()) { if (label) { x = alloca(strlen("_SELINUX_CONTEXT=") + label_len + 1); @@ -1221,9 +1221,11 @@ static int dispatch_sigusr1(sd_event_source *es, const struct signalfd_siginfo * log_info("Received request to flush runtime journal from PID %"PRIu32, si->ssi_pid); - touch("/run/systemd/journal/flushed"); server_flush_to_var(s); server_sync(s); + server_vacuum(s); + + touch("/run/systemd/journal/flushed"); return 0; } @@ -1326,6 +1328,7 @@ static int server_parse_proc_cmdline(Server *s) { } else if (startswith(word, "systemd.journald")) log_warning("Invalid systemd.journald parameter. Ignoring."); } + /* do not warn about state here, since probably systemd already did */ return 0; } @@ -1474,15 +1477,14 @@ int server_init(Server *s) { server_parse_config_file(s); server_parse_proc_cmdline(s); if (!!s->rate_limit_interval ^ !!s->rate_limit_burst) { - log_debug("Setting both rate limit interval and burst from %llu,%u to 0,0", - (long long unsigned) s->rate_limit_interval, - s->rate_limit_burst); + log_debug("Setting both rate limit interval and burst from "USEC_FMT",%u to 0,0", + s->rate_limit_interval, s->rate_limit_burst); s->rate_limit_interval = s->rate_limit_burst = 0; } mkdir_p("/run/systemd/journal", 0755); - s->user_journals = hashmap_new(trivial_hash_func, trivial_compare_func); + s->user_journals = hashmap_new(NULL); if (!s->user_journals) return log_oom();