From: Yu Watanabe Date: Thu, 25 Jun 2026 15:08:41 +0000 (+0900) Subject: journal: use FSS_HEADER_SIGNATURE at one more place X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a97de75de768e6a16af0d897a720e027cf2e2115;p=thirdparty%2Fsystemd.git journal: use FSS_HEADER_SIGNATURE at one more place --- diff --git a/src/journal/journalctl-authenticate.c b/src/journal/journalctl-authenticate.c index b1ae033154d..721404a1f53 100644 --- a/src/journal/journalctl-authenticate.c +++ b/src/journal/journalctl-authenticate.c @@ -139,7 +139,7 @@ int action_setup_keys(void) { r, "Failed to set file attributes on a temporary file for '%s', ignoring: %m", path); struct FSSHeader h = { - .signature = { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' }, + .signature = FSS_HEADER_SIGNATURE, .machine_id = machine, .boot_id = boot, .header_size = htole64(sizeof(h)), diff --git a/src/libsystemd/sd-journal/journal-authenticate.c b/src/libsystemd/sd-journal/journal-authenticate.c index 2d652294950..db13dc1851e 100644 --- a/src/libsystemd/sd-journal/journal-authenticate.c +++ b/src/libsystemd/sd-journal/journal-authenticate.c @@ -392,7 +392,7 @@ int journal_file_fss_load(JournalFile *f) { if (header == MAP_FAILED) return -errno; - if (memcmp(header->signature, FSS_HEADER_SIGNATURE, 8) != 0) + if (memcmp(header->signature, (const uint8_t[]) FSS_HEADER_SIGNATURE, 8) != 0) return -EBADMSG; if (header->incompatible_flags != 0) diff --git a/src/libsystemd/sd-journal/journal-def.h b/src/libsystemd/sd-journal/journal-def.h index 84849a1e950..026aa4c9414 100644 --- a/src/libsystemd/sd-journal/journal-def.h +++ b/src/libsystemd/sd-journal/journal-def.h @@ -261,7 +261,7 @@ assert_cc(sizeof(struct Header) == sizeof(struct Header__packed)); assert_cc(sizeof(struct Header) == 272); #define FSS_HEADER_SIGNATURE \ - ((const char[]) { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' }) + { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' } struct FSSHeader { uint8_t signature[8]; /* "KSHHRHLP" */