b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
cf0fbc49e67b55f8d346fc94de28c90113505297 |
|
16-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: sort includes
Sort the includes accoding to the new coding style. |
709f6e46a35ec492b70eb92943d82a8d838ce918 |
|
05-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use the negative error codes returned by our functions
Our functions return negative error codes.
Do not rely on errno being set after calling our own functions. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
0d39fa9c69b97a2ceb156053deef69c0866c2b97 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move more file I/O related calls into fileio.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
0c4a83a259c2ff87df83f48cd7ceef37b8746f4f |
|
24-Oct-2015 |
Vito Caputo <vito.caputo@coreos.com> |
journal: s/Envalid/Invalid/ |
1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect. |
76ef789d264f9eb7d7624b994aa6eead1dacfac4 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: make use of log_error_errno() return value
Turns this:
r = -errno;
log_error_errno(errno, "foo");
into this:
r = log_error_errno(errno, "foo");
and this:
r = log_error_errno(errno, "foo");
return r;
into this:
return log_error_errno(errno, "foo"); |
e80acc51aeaf2d74cb4d6cecbcb6e18f74c22c05 |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: uppercase first character in verify error messages
In the english language the first character of a sentence is supposed to
be uppercase. Let's make sure this also applies to the journal
verification error messages. |
bca9e39dfadaefc4b02c0dd378adc3d6221071de |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: explain the error when we find a non-DATA object that is compressed
Only objects of type DATA may be compressed, generate a message about
that, like we do for all other errros. |
8dc37a85255f68d62f7af66696cbf6a66401fb2a |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: when verifying journal files, handle empty ones nicely
A journal file that carries no objects should be considered valid. |
dade37d403f1b8c1d7bb2efbe2361f2a3e999613 |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: avoid mapping empty data and field hash tables
When a new journal file is created we write the header first, then sync
and only then create the data and field hash tables in them. That means
to other processes it might appear that the files have a valid header
but not data and field hash tables. Our reader code should be able to
deal with this.
With this change we'll not map the two hash tables right-away after
opening a file for reading anymore (because that will of course fail if
the objects are missing), but delay this until the first time we access
them. On top of that, when we want to look something up in the hash
tables and we notice they aren't initialized yet, we consider them
empty.
This improves handling of some journal files reported in #487. |
45c047b227d96e98e7076c15ae774ff6390dc403 |
|
24-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
journal-verify: don't hit SIGFPE when determining progress
If we determine the progress based on a number of objects available,
don't blindly devide by the number of objects, given that it might be 0. |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
15411c0cb1192799b37ec8f25d6f30e8d7292fc6 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
d05089d86ef032b245c7f928e623b88c82998ab0 |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: consistently use OBJECT_<type> names instead of numbers
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). |
1b8951e5bd9b2bf1722098a861055cae0bb52088 |
|
13-Dec-2014 |
Michal Schmidt <mschmidt@redhat.com> |
journal: remove journal_file_object_keep/release functions
The only user is sd_journal_enumerate_unique() and, as explained in
the previous commit (fed67c38e3 "journal: map objects to context set by
caller, not by actual object type"), the use of them there is now
superfluous. Let's remove them.
This reverts major parts of commits:
ae97089d49 journal: fix access to munmapped memory in
sd_journal_enumerate_unique
06cc69d44c sd-journal: fix sd_journal_enumerate_unique skipping values
Tested with an "--enable-debug" build and "journalctl --list-boots".
It gives the expected number of results. Additionally, if I then revert
the previous commit ("journal: map objects to context set by caller, not
to actual object type"), it crashes with SIGSEGV, as expected. |
7517e17443225fafea86b21e42a36af69feb1dbc |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
journald: correct spacing near eol code comments |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
06cc69d44c8ff2b652527357f28acd4cbe77c814 |
|
10-Oct-2014 |
Jan Janssen <medhefgo@web.de> |
sd-journal: fix sd_journal_enumerate_unique skipping values
sd_journal_enumerate_unique will lock its mmap window to prevent it
from being released by calling mmap_cache_get with keep_always=true.
This call may return windows that are wider, but compatible with the
parameters provided to it.
This can result in a mismatch where the window to be released cannot
properly be selected, because we have more than one window matching the
parameters of mmap_cache_release. Therefore, introduce a release_cookie
to be used when releasing the window.
https://bugs.freedesktop.org/show_bug.cgi?id=79380 |
e8c108ca9f11a382742f212f5b42a02536b3d40f |
|
18-Sep-2014 |
Philippe De Swert <philippedeswert@gmail.com> |
journal: Do not count on the compiler initializing found_last to false
There is a very unlikely case where this can happen since gcc usually
does the sane thing. But let's make sure found_last is initialized anyway.
Fixes: CID#996386 |
fa1c4b518ec7d8ec2d647213ee651cde4d6c9d7e |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix misuse of uint64_t as size_t
They have different size on 32 bit, so they are really not interchangable. |
54f3ff079f05fd024ff3686eeea26ab705994494 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal/verify: flush progress bar, print offset in more places
Before, fragments of the progress bar would remain when
errors or warnings were printed. |
1ec7120e50bc084342f8c44aea771c79aaeb774d |
|
08-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal/compress: fix calls to decompress_blob |
d89c8fdf48c7bad5816b9f2e77e8361721f22517 |
|
07-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: add LZ4 as optional compressor
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. |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
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. |
8e33886ec582336564ae11b80023abe93d7599c0 |
|
28-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Replace mkostemp+unlink with open(O_TMPFILE)
This will only work on Linux >= 3.11, and probably not on all
filesystems. Fallback code is provided. |
ae97089d49d1795a35a443b7b830ee666028e733 |
|
11-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: fix access to munmapped memory in sd_journal_enumerate_unique
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. |
af13a6b0606f166c93cafc9892343f167f880281 |
|
05-Jan-2014 |
George McCollister <george.mccollister@gmail.com> |
journal: Add missing byte order conversions
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 |
aae72d6fa0910891aa446ec43c548512987d453a |
|
27-Jun-2013 |
Jan Janssen <medhefgo@web.de> |
journal-verify: Use proper printf placeholder |
92fba83e3a23ce7778a1bde67d277fdc97ab39f9 |
|
23-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-verify: allow unlinked data entries
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). |
507f22bd0172bff5e5d98145b1419bd472a2c57f |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use stdint.h macros instead of casts to print uint64_t values
Casts are visually heavy, and can obscure unwanted truncations. |
93b73b064c663d6248bebfbbbd82989b5ca10fc5 |
|
21-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: by default do not decompress dat objects larger than 64K
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. |
8481248b9fbddc6d5e6ff26eb23505ef13dc85f7 |
|
19-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
util: unify usage of on_tty() in util.c |
0ab5c3ed8750734124c7a1f7fb8a7944f71d6e25 |
|
13-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-verify: get rid of an unused variable
When compiling without gcrypt, gcc emits an annoying warning. |
2a7b539a82a45202c0e990c45da25ccdc487d633 |
|
24-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: always pass first entry timestamp back from journal_file_verify() |
5996c7c295e073ce21d41305169132c8aa993ad0 |
|
13-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: don't reposition window if we don't have to |
70f09301d5d47577cfa4fe70c7b3cba336529cdf |
|
25-Aug-2012 |
Yin Kangkai <kangkai.yin@intel.com> |
journal: add HAVE_XZ check to avoid build failure
Without this, build fail with --disable-xz or xz not installed. |
c0ca7aeec963207b6fa5ee39bd204cb26cba4023 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: be more friendly when informing about seal verification |
fcde238921b857679363a95488a5a5af1dc1f243 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: be more careful when keeping around mmaps we still need |
369f0589218a874a88bc69c5481d8f90f987b7dd |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
verify: optimize entry search a bit by using bisection |
89fef99014662a5a63e7deaedd6292b7fb4ab2f8 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: automatically evolve FSS key even when nothing is logged |
3e4b9b506d676d1cb8692306b38c05f8529e5cdb |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add missing endianess conversion |
feb12d3ed2c7f9132c64773c7c41b9e3a608a814 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: make libgcrypt dependency optional |
8088cbd3cfcf539c984d8042cd2b92ebbfda6d82 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: use a macro to check for file header flags |
f7fab8a5ae7a3b378040203821383f5a8fc91126 |
|
20-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix tag ordering check |
a2e99cdf94a8a0350ff13b241de07f34c015b1fc |
|
19-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix bisection algorithm |
fc89a13992384ab8d8fb0c937b021434123bbc49 |
|
19-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: validate timestamps as well |
fb9a24b6b1ed5b1f42e6e350ccdb7e11800a83bd |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: even more simple static object tests |
97147f8c1f63234470a7062d2ed0f999c0996d42 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: refuse verification of files with unknown flags |
b72631e59c1b9f62bcfaf1ce3f7e72e4a3beee89 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
jounral: write bit fiddling test
This test goes through every single bit in a journal file, toggles it,
and checks if this change is detected by the verification. |
c586dbf110abdbf0317bdd0f0a5900d709194409 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix verification without key |
db11ac1ab56bc13514a029e7d126c5efe2c68bc2 |
|
18-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: add additional simple static tests to verifier |
6c7be122acd666d4e93541179d89747aa12efb67 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: after verification output validated time range |
356fe3e6c623c831050c835782aec9e50f6262ba |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: reword verification messages a bit |
7b5fd91c543fe2d62d9decfa1737f8e17c0976b2 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: ensure that entries and tags are properly ordered |
3223f44f2312d01113a9c51f898528041cc7bd8d |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: show new header fields in header dump |
e627440b41bb0284e4892f7aa9d84c77972487e2 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: don't write tag objects if nothing has been written since the last time |
31094aae09dd5a773e1634334bcd12fc8834a030 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
man: add man pages for new FSS stuff |
baed47c3c20512507e497058d388782400a072f6 |
|
17-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: rework terminology
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. |
14d10188de1fd58e663d73683a400d8d7dc67dba |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add FSPRG journal authentication |
a8e5f51484ba832e299a38f2a54e455e445d2896 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix tag sequence number verification |
56e81f7ca8276e40f8c88c4c30713a5b54009613 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: immeidately terminate on invalid seed |
b7c9ae91d111b3e89d1ffc00e08f9ed97a8ff5db |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: parse fsprg seed |
2dee23ebe09965308c67a661ed0a8d2cc0ae1d5f |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: count number of entry arrays in header |
1137e6c73ba4456f6bb054a2a45f80972f568586 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix variable initialization |
2a7273ef923e23e8444d556ec8de420f39b1311f |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix unitialized var |
f5028bfaf06b58a59d45fcd875dced1413703999 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: journal-send.h doesn't actually exist |
86adf873be22a38dbc9c6e86124c30b6caecd185 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: verify structural consistency |
f9fffc31cdc4be7a0e4437837ae06a0c111fe020 |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: add color to verification progress bar |
fd5dc3204d350142a9105d3e9c83bf29d3a900ee |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: verify compressed objects |
f59a5f6b873d8bf994e2d85671f2554b9fdd62db |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: verify hashes only during actual verification, not all the time |
0284adc6a60ce0af1107cb0b50041a65d731f39e |
|
16-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: split up journal-file.c |