From 934cf0a9c7b7f01f5a5aafb03bef4b7b5b0b14c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 30 Mar 2020 13:49:05 +0200 Subject: [PATCH 1/3] sd-bus: simplify bus_maybe_reply_error sd_bus_reply_method_errno already does the same two checks (sd_bus_error_is_set(error), r < 0) internally. But it did them in opposite order. The effect is the same, because sd_bus_reply_method_errno falls back to sd_bus_reply_method_error, but it seems inelegant. So let's simplify bus_maybe_reply_error() to offload the job fully to sd_bus_reply_method_errno(). No functional change. --- src/libsystemd/sd-bus/bus-internal.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c index d5f8c6db647..5c3e955c20c 100644 --- a/src/libsystemd/sd-bus/bus-internal.c +++ b/src/libsystemd/sd-bus/bus-internal.c @@ -314,13 +314,9 @@ char *bus_address_escape(const char *v) { int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error) { assert(m); - if (r < 0) { + if (sd_bus_error_is_set(error) || r < 0) { if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL) sd_bus_reply_method_errno(m, r, error); - - } else if (sd_bus_error_is_set(error)) { - if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL) - sd_bus_reply_method_error(m, error); } else return r; From 82b2281dd54b2b83c53ccbaf73b6ca9b687e0b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 30 Mar 2020 22:02:13 +0200 Subject: [PATCH 2/3] journal-remote: fix description of option We use whatever compression is configured, most often not XZ. --- src/journal-remote/journal-remote-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c index 88e42d3a984..551b84130dd 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -786,7 +786,7 @@ static int help(void) { " --listen-http=ADDR Listen for HTTP connections at ADDR\n" " --listen-https=ADDR Listen for HTTPS connections at ADDR\n" " -o --output=FILE|DIR Write output to FILE or DIR/external-*.journal\n" - " --compress[=BOOL] XZ-compress the output journal (default: yes)\n" + " --compress[=BOOL] Use compression in the output journal (default: yes)\n" " --seal[=BOOL] Use event sealing (default: no)\n" " --key=FILENAME SSL key in PEM format (default:\n" " \"" PRIV_KEY_FILE "\")\n" From e6a4e25a829470c055a1195a8e97834408138c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 31 Mar 2020 22:26:59 +0200 Subject: [PATCH 3/3] man: add note that --no-hostname has limited effect Clearly there is some confusion about the intent of this option, let's add a short note. https://bugzilla.redhat.com/show_bug.cgi?id=1819313 --- man/journalctl.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/man/journalctl.xml b/man/journalctl.xml index 2a685d1ee65..1e5f95e19d4 100644 --- a/man/journalctl.xml +++ b/man/journalctl.xml @@ -398,8 +398,8 @@ - A comma separated list of the fields which should be included in the output. This only has an - effect for the output modes which would normally show all fields (, + A comma separated list of the fields which should be included in the output. This has an + effect only for the output modes which would normally show all fields (, , , , and ). The __CURSOR, __REALTIME_TIMESTAMP, __MONOTONIC_TIMESTAMP, and _BOOT_ID fields are always @@ -416,8 +416,13 @@ - Don't show the hostname field of log messages originating from the local host. This switch only - has an effect on the family of output modes (see above). + Don't show the hostname field of log messages originating from the local host. This + switch has an effect only on the family of output modes (see above). + + + Note: this option does not remove occurrences of the hostname from log entries themselves, so + it does not prevent the hostname from being visible in the logs. +