summaryrefslogtreecommitdiff
path: root/src/journal/journal-def.h
Commit message (Collapse)AuthorAgeFilesLines
* docs: import journal file format docs from fdo wikiLennart Poettering2020-06-251-1/+1
| | | | Just an import, with no textual changes (some fixed URLs however)
* journal: support zstd compression for large objects in journal filesLennart Poettering2020-06-251-7/+17
|
* journal-file: when individual hash chains grow too large, rotateLennart Poettering2020-06-251-8/+15
| | | | | | | | | | | | Even with the new keyed hash table journal feature: if an attacker manages to get access to the journal file id it could synthesize records that result in hash collisions. Let's rotate automatically when we notice that, so that a new journal file ID is generated, our performance is restored and the attacker has to guess a new file ID before being able to trigger the issue again. That said, untrusted peers should never get access to journal files in the first case...
* journal: use a different hash function for each journal fileLennart Poettering2020-06-251-4/+8
| | | | | | | | | | | | | | This adds a new (incompatible) feature to journal files: if enabled the hash function used for the hash tables is no longer jenkins hash with a zero key, but siphash keyed by the file uuid that is included in the file header anyway. This should make our hash tables more robust against collision attacks, as long as the attacker has no read access to the journal files. We switch from jenkins to siphash simply because it's more well-known and we standardize for the rest of our codebase onto it. This is hardening in order to make collision attacks harder for clients that can forge log messages but have no read access to the logs. It has no effect on clients that have read access.
* journal: make signature arrays constLennart Poettering2020-06-251-2/+4
|
* journal: fix definition of _OBJECT_COMPRESSED_MAXLennart Poettering2020-06-251-7/+7
| | | | | | | | | | | The object flags field is a bitmask, hence don't sloppily define _OBJECT_COMPRESSED_MAX as one mor than the previous flag. That worked OK as long as we only had two flags, but will fall apart as soon as we have three. Let's fix this. (It's kinda sloppy how the string table is built here, as it will be quite sparse as soon as we have more enum entries, but let's keep it for now.)
* tree-wide: drop duplicated blank linesYu Watanabe2019-07-151-1/+0
| | | | | | | ``` $ for i in */*.[ch] */*/*.[ch]; do sed -e '/^$/ {N; s/\n$//g}' -i $i; done $ git checkout HEAD -- basic/linux shared/linux ```
* journal: drop _packed_ attribute in a few placesZbigniew Jędrzejewski-Szmek2019-02-041-53/+65
| | | | The justification is the safe as for the grandparent commit.
* tree-wide: drop empty lines in commentsYu Watanabe2018-07-231-1/+0
|
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-4/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* build-sys: use #if Y instead of #ifdef Y everywhereZbigniew Jędrzejewski-Szmek2017-10-041-4/+4
| | | | | | | | | | | | | | | The advantage is that is the name is mispellt, cpp will warn us. $ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/" $ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;' $ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g' $ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g' + manual changes to meson.build squash! build-sys: use #if Y instead of #ifdef Y everywhere v2: - fix incorrect setting of HAVE_LIBIDN2
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering2015-10-251-3/+2
| | | | | There are more than enough to deserve their own .c file, hence move them over.
* journal: fix size commentPeter Lemenkov2015-05-131-1/+1
| | | | Looks like sizeof(struct Header) is 240 not 224
* journal: have a named enum ObjectTypeMichal Schmidt2014-12-131-2/+2
|
* journal: consistently use OBJECT_<type> names instead of numbersMichal Schmidt2014-12-131-1/+1
| | | | | | Note that numbers 0 and -1 are both replaced with OBJECT_UNUSED, because they are treated the same everywhere (e.g. type_to_context() translates them both to 0).
* Always prefer our headers to system headersZbigniew Jędrzejewski-Szmek2014-07-311-1/+1
| | | | | | In practice this shouldn't make much difference, but sometimes our headers might be newer, and we want to test them.
* fix #ifdefRonny Chevalier2014-07-081-1/+1
|
* journal: add LZ4 as optional compressorZbigniew Jędrzejewski-Szmek2014-07-061-2/+26
| | | | | | | | | | | | | | Add liblz4 as an optional dependency when requested with --enable-lz4, and use it in preference to liblzma for journal blob and coredump compression. To retain backwards compatibility, XZ is used to decompress old blobs. Things will function correctly only with lz4-119. Based on the benchmarks found on the web, lz4 seems to be the best choice for "quick" compressors atm. For pkg-config status, see http://code.google.com/p/lz4/issues/detail?id=135.
* journal: move _packed_ attribute to the endZbigniew Jędrzejewski-Szmek2012-12-171-22/+22
| | | | | | | | | | | | GCC manual states that "For an enum, struct or union type, you may specify attributes either between the enum, struct or union tag and the name of the type, or just past the closing curly brace of the definition. The former syntax is preferred." This means that the attribute should not be located before 'struct'. Putting it between 'struct' and the name seems cluttered. Putting it at the end seems most readable. This avoids clang warnings.
* journal: use le64_t instead of uint64_t where this is appropriateLennart Poettering2012-10-211-2/+2
|
* journal: link up documentation with the file structure headerLennart Poettering2012-10-201-4/+11
|
* journal: even more simple static object testsLennart Poettering2012-08-181-0/+2
|
* journald: add additional simple static tests to verifierLennart Poettering2012-08-181-3/+4
|
* journal: rework terminologyLennart Poettering2012-08-171-8/+8
| | | | | | | | | | | | | | | | | | | | | | Let's clean up our terminology a bit. New terminology: FSS = Forward Secure Sealing FSPRG = Forward Secure Pseudo-Random Generator FSS is the combination of FSPRG and a HMAC. Sealing = process of adding authentication tags to the journal. Verification = process of checking authentication tags to the journal. Sealing Key = The key used for adding authentication tags to the journal. Verification Key = The key used for checking authentication tags of the journal. Key pair = The pair of Sealing Key and Verification Key Internally, the Sealing Key is the combination of the FSPRG State plus change interval/start time. Internally, the Verification Key is the combination of the FSPRG Seed plus change interval/start time.
* journal: add FSPRG journal authenticationLennart Poettering2012-08-161-0/+1
|
* journal: count number of entry arrays in headerLennart Poettering2012-08-161-0/+1
|
* journal: verify structural consistencyLennart Poettering2012-08-161-2/+2
|
* journal: implement basic journal file verification logicLennart Poettering2012-08-161-2/+2
|
* journal: include tag object header in hmacLennart Poettering2012-08-131-0/+3
|
* journald: initial version of FSPRG hookupLennart Poettering2012-08-131-12/+30
| | | | | | This adds forward-secure authentication of journal files. This patch includes key generation as well as tagging of journal files, Verification of journal files will be added in a later patch.
* use #pragma once instead of foo*foo #define guardsShawn Landden2012-07-191-4/+1
| | | | | | | | | | | | | | | | | #pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported in other compilers. I've been using and maintaining (rebasing) this patch for a while now, as it annoyed me to see #ifndef fooblahfoo, etc all over the place, almost arrogant about the annoyance of having to define all these names to perform a commen but neccicary functionality, when a completely superior alternative exists. I havn't sent it till now, cause its kindof a style change, and it is bad voodoo to mess with style that has been established by more established editors. So feel free to lambast me as a crazy bafoon. v2 - preserve externally used headers
* journal: automatically rotate journal files if the data hash table is full > 75%Lennart Poettering2012-07-171-2/+5
| | | | | | | Previously, when the main data hash table grows too full the performance simply started to decrease drastically. Instead, now simply rotate to a new journal file as the hash table gets to full, so that we can start with a new fresh empty hash table.
* journal: expose and make use of cutoff times of journalLennart Poettering2012-06-171-2/+2
| | | | | This helps explaining when the log output of "systemctl status" is incomplete because the logs got rotated since the service was started.
* journal: add basic object definition for signaturesLennart Poettering2012-06-171-0/+18
|
* journal: replace arena offset by header sizeLennart Poettering2012-06-171-1/+1
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-121-4/+4
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* add sparse support to detect endianness bugFrederic Crozat2012-03-221-37/+37
| | | | | | le16/32/64_t type should be used when storing little-endian value header to integrate with sparse from Josh Triplett <josh@joshtriplett.org>
* build-sys: move public header files into a dir of their ownLennart Poettering2012-01-051-1/+2
|
* journal: add inline compression support with XZLennart Poettering2011-12-211-1/+12
|
* journal: fix space reservation limit enforcementLennart Poettering2011-12-201-3/+0
|
* journal: implement multiple field matchesLennart Poettering2011-11-081-27/+39
|
* journal: properly implement matching with multiple matchesLennart Poettering2011-10-151-0/+1
|
* journal: implementation rotationLennart Poettering2011-10-131-0/+2
|
* journal: implement parallel traversal in clientLennart Poettering2011-10-081-2/+3
|
* journal: store XOR combination of entry data object hashes to identify hash ↵Lennart Poettering2011-10-071-0/+1
| | | | lines
* journal: add preliminary incomplete implementationLennart Poettering2011-10-071-0/+139