summaryrefslogtreecommitdiff
path: root/src/journal/journal-verify.c
AgeCommit message (Collapse)Author
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
safe_close() automatically becomes a NOP when a negative fd is passed, and returns -1 unconditionally. This makes it easy to write lines like this: fd = safe_close(fd); Which will close an fd if it is open, and reset the fd variable correctly. By making use of this new scheme we can drop a > 200 lines of code that was required to test for non-negative fds or to reset the closed fd variable afterwards.
2014-01-27Replace mkostemp+unlink with open(O_TMPFILE)Zbigniew Jędrzejewski-Szmek
This will only work on Linux >= 3.11, and probably not on all filesystems. Fallback code is provided.
2014-01-11journal: fix access to munmapped memory in sd_journal_enumerate_uniqueZbigniew Jędrzejewski-Szmek
sd_j_e_u needs to keep a reference to an object while comparing it with possibly duplicate objects in other files. Because the size of mmap cache is limited, with enough files and object to compare to, at some point the object being compared would be munmapped, resulting in a segmentation fault. Fix this issue by turning keep_always into a reference count that can be increased and decreased. Other callers which set keep_always=true are unmodified: their references are never released but are ignored when the whole file is closed, which happens at some point. keep_always is increased in sd_j_e_u and later on released.
2014-01-05journal: Add missing byte order conversionsGeorge McCollister
Convert entry_array.items[0] to host byte order prior to passing it to chain_cache_put(). [zj: also use le64toh in journal-verify.c] https://bugs.freedesktop.org/show_bug.cgi?id=73194
2013-06-27journal-verify: Use proper printf placeholderJan Janssen
2013-06-22journal-verify: allow unlinked data entriesZbigniew Jędrzejewski-Szmek
Sometimes an entry is not successfully written, and we end up with data items which are "unlinked", not connected to, and not used by any entry. This will usually happen when we write to write a core dump, and the initial small data fields are written successfully, but the huge COREDUMP= field is not written. This situation is hard to avoid, but the results are mostly harmless. Thus only warn about unused data items. Also, be more verbose about why journal files failed verification. This should help diagnose journal failure modes without resorting to a hexadecimal editor. https://bugs.freedesktop.org/show_bug.cgi?id=65235 (esp. see system.journal attached to the bug report).
2013-06-10Use stdint.h macros instead of casts to print uint64_t valuesZbigniew Jędrzejewski-Szmek
Casts are visually heavy, and can obscure unwanted truncations.
2012-11-21journal: by default do not decompress dat objects larger than 64KLennart Poettering
This introduces a new data threshold setting for sd_journal objects which controls the maximum size of objects to decompress. This is relieves the library from having to decompress full data objects even if a client program is only interested in the initial part of them. This speeds up "systemd-coredumpctl" drastically when invoked without parameters.
2012-10-19util: unify usage of on_tty() in util.cLennart Poettering
2012-10-13journal-verify: get rid of an unused variableZbigniew Jędrzejewski-Szmek
When compiling without gcrypt, gcc emits an annoying warning.
2012-09-24journald: always pass first entry timestamp back from journal_file_verify()Lennart Poettering
2012-09-13journald: don't reposition window if we don't have toLennart Poettering
2012-08-25journal: add HAVE_XZ check to avoid build failureYin Kangkai
Without this, build fail with --disable-xz or xz not installed.
2012-08-21journalctl: be more friendly when informing about seal verificationLennart Poettering
2012-08-21journal: be more careful when keeping around mmaps we still needLennart Poettering
2012-08-21verify: optimize entry search a bit by using bisectionLennart Poettering
2012-08-21journal: automatically evolve FSS key even when nothing is loggedLennart Poettering
2012-08-20journal: add missing endianess conversionLennart Poettering
2012-08-20journal: make libgcrypt dependency optionalLennart Poettering
2012-08-20journal: use a macro to check for file header flagsLennart Poettering
2012-08-20journal: fix tag ordering checkLennart Poettering
2012-08-19journal: fix bisection algorithmLennart Poettering
2012-08-19journal: validate timestamps as wellLennart Poettering
2012-08-18journal: even more simple static object testsLennart Poettering
2012-08-18journal: refuse verification of files with unknown flagsLennart Poettering
2012-08-18jounral: write bit fiddling testLennart Poettering
This test goes through every single bit in a journal file, toggles it, and checks if this change is detected by the verification.
2012-08-18journal: fix verification without keyLennart Poettering
2012-08-18journald: add additional simple static tests to verifierLennart Poettering
2012-08-17journal: after verification output validated time rangeLennart Poettering
2012-08-17journal: reword verification messages a bitLennart Poettering
2012-08-17journal: ensure that entries and tags are properly orderedLennart Poettering
2012-08-17journal: show new header fields in header dumpLennart Poettering
2012-08-17journal: don't write tag objects if nothing has been written since the last timeLennart Poettering
2012-08-17man: add man pages for new FSS stuffLennart Poettering
2012-08-17journal: rework terminologyLennart Poettering
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.
2012-08-16journal: add FSPRG journal authenticationLennart Poettering
2012-08-16journal: fix tag sequence number verificationLennart Poettering
2012-08-16journalctl: immeidately terminate on invalid seedLennart Poettering
2012-08-16journal: parse fsprg seedLennart Poettering
2012-08-16journal: count number of entry arrays in headerLennart Poettering
2012-08-16journal: fix variable initializationLennart Poettering
2012-08-16journal: fix unitialized varLennart Poettering
2012-08-16journal: journal-send.h doesn't actually existLennart Poettering
2012-08-16journal: verify structural consistencyLennart Poettering
2012-08-16journal: add color to verification progress barLennart Poettering
2012-08-16journal: verify compressed objectsLennart Poettering
2012-08-16journal: verify hashes only during actual verification, not all the timeLennart Poettering
2012-08-16journal: split up journal-file.cLennart Poettering