summaryrefslogtreecommitdiff
path: root/src/journal
Commit message (Collapse)AuthorAge
* journalctl: make --utc work everywhereJan Synacek2014-10-03
| | | | | | The --utc option was introduced by commit 9fd290443f5f99fca0dcd4216b1de70f7d3b8db1. Howerver, the implementation was incomplete.
* journalctl: add --utc optionJan Synacek2014-10-02
| | | | Introduce option to display time in UTC.
* journalctl: do not output --reboot-- markers when running non-interactivelyZbigniew Jędrzejewski-Szmek2014-09-29
| | | | They are not legal in the export format.
* journal: build fix when LZ4 is enabled but XZ is notGustavo Sverzut Barbieri2014-09-25
|
* test: warn if we could not parse the loop count argumentThomas Hindoe Paaboel Andersen2014-09-19
| | | | Found by coverity. Fixes: CID#1237512
* journal: Do not count on the compiler initializing found_last to falsePhilippe De Swert2014-09-18
| | | | | | | 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
* hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt2014-09-15
| | | | | | | | | It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
* journal: do not leak mmaps on OOMPhilippe De Swert2014-09-11
| | | | | | | After a section of memory is succesfully allocated, some of the following actions can still fail due to lack of memory. In this case -ENOMEM is returned without actually freeing the already mapped memory. Found with coverity. Fixes: CID#1237762
* journal: do not dereference already freed patternsPhilippe De Swert2014-09-11
| | | | | | | In case set_consume goes wrong, the pattern name has already been freed. So we do not try to print it in the logs, assuming the pattern addition print will be printed just before the failure anyway. Found with coverity. Fixes: CID#1237798
* journalctl: Allow to disable line cap with --lines=allJan Janssen2014-08-31
|
* test-compress: also test with incompressible inputsZbigniew Jędrzejewski-Szmek2014-08-30
|
* journal/compress: use LZ4_compress_continue()Evangelos Foutras2014-08-30
| | | | | | | | | | | We can't use LZ4_compress_limitedOutput_continue() because in the worst-case scenario the compressed output can be slightly bigger than the input block. This generally affects very few blocks and is no reason to abort the compression process. I ran into this when I noticed that Chromium core dumps weren't being compressed. After switching to LZ4_compress_continue() a ~330MB Chromium core dump gets compressed to ~17M.
* Fix a few more typosRuben Kerkhof2014-08-30
|
* sd-journal: verify that object start with the field nameZbigniew Jędrzejewski-Szmek2014-08-27
| | | | | | If the journal is corrupted, we might return an object that does not start with the expected field name and/or is shorter than it should.
* sd-journal: properly convert object->size on big endianZbigniew Jędrzejewski-Szmek2014-08-27
| | | | | | | mmap code crashes when attempting to map an object of zero size. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758392 https://bugs.freedesktop.org/show_bug.cgi?id=82894
* sd-journal: never log anything by default from a libraryLennart Poettering2014-08-26
|
* test-compress: make sure asserts with side effects use assert_se()Filipe Brandenburger2014-08-26
| | | | | | | | Otherwise the test fails when built with CPPFLAGS='-DNDEBUG' which disables assertions. Tested: - make check TESTS='test-compress' CPPFLAGS='-DNDEBUG'
* notify: send STOPPING=1 from our daemonsLennart Poettering2014-08-21
|
* journalctl: add "-t --identifier=STRING" optionHarald Hoyer2014-08-21
| | | | | | | | | | | | | | | This turns journalctl to the counterpart of systemd-cat. Messages sent with systemd-cat --identifier foo --prioritiy debug can now be shown with journalctl --identifier foo --prioritiy debug "--identifier" is not merged with "--unit" to make a clear distinction between syslog and systemd units. syslog identifiers can be chosen freely by anyone.
* coredump: display libdw fail string on stack trace failUmut Tezduyar Lindskog2014-08-15
| | | | | | - systemd[1]: hello.service: main process exited, code= dumped, status=3/QUIT - systemd-coredump[2541]: Failed to generate stack trace: Unwinding not supported for this architecture - systemd-coredump[2541]: Process 1024 (hello) of user 154 dumped core.
* journald: Fix off-by-one error in "Missed X kernel messages" warningEelco Dolstra2014-08-13
| | | | | | On receiving a message, "kernel_seqnum" is set to "serial + 1". So subtracting 1 will cause messages like "Missed 0 kernel messages", which should be "Missed 1 kernel messages".
* journald: remove redundant newlinesLennart Poettering2014-08-05
|
* journald: properly sum up entry size counterLennart Poettering2014-08-05
| | | | | We should read the entry size before moving to the next iovec, not after.
* Fix misuse of uint64_t as size_tZbigniew Jędrzejewski-Szmek2014-08-03
| | | | They have different size on 32 bit, so they are really not interchangable.
* Unify parse_argv styleZbigniew Jędrzejewski-Szmek2014-08-03
| | | | | | | | | | | | | | | | getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there.
* Always prefer our headers to system headersZbigniew Jędrzejewski-Szmek2014-07-31
| | | | | | In practice this shouldn't make much difference, but sometimes our headers might be newer, and we want to test them.
* Properly report invalid quoted stringsZbigniew Jędrzejewski-Szmek2014-07-31
| | | | | | | | $ systemd-analyze verify trailing-g.service [./trailing-g.service:2] Trailing garbage, ignoring. trailing-g.service lacks ExecStart setting. Refusing. Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument. Failed to create trailing-g.service/start: Invalid argument
* Reject invalid quoted stringsZbigniew Jędrzejewski-Szmek2014-07-31
| | | | | | | | | | | | | | | | | | | | | | String which ended in an unfinished quote were accepted, potentially with bad memory accesses. Reject anything which ends in a unfished quote, or contains non-whitespace characters right after the closing quote. _FOREACH_WORD now returns the invalid character in *state. But this return value is not checked anywhere yet. Also, make 'word' and 'state' variables const pointers, and rename 'w' to 'word' in various places. Things are easier to read if the same name is used consistently. mbiebl_> am I correct that something like this doesn't work mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"' mbiebl_> systemd seems to strip of the quotes mbiebl_> systemctl status shows mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint mbiebl_> which is pretty weird
* time-util: add and use USEC/NSEC_INFINIYKay Sievers2014-07-29
|
* journald: always add syslog facility for messages coming from kmsgMichal Sekletar2014-07-28
| | | | | | Set SYSLOG_FACILITY field for kernel log messages too. Setting only SYSLOG_IDENTIFIER="kernel" is not sufficient and tools reading journal maybe confused by missing SYSLOG_FACILITY field for kernel log messages.
* Add utility function to append root to pathZbigniew Jędrzejewski-Szmek2014-07-26
|
* Always check asprintf return codeKarel Zak2014-07-26
| | | | | | | There is a small number of the places in sources where we don't check asprintf() return code and assume that after error the function returns NULL pointer via the first argument. That's wrong, after error the content of pointer is undefined.
* journalctl,man: allow + only between termsZbigniew Jędrzejewski-Szmek2014-07-19
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1110712
* Small modernizationsZbigniew Jędrzejewski-Szmek2014-07-18
|
* Be more verbose when bind or listen failsZbigniew Jędrzejewski-Szmek2014-07-18
| | | | Also be more verbose in devnode_acl_all().
* man,journal: add note about sd_journal_get_cutoff_monotonic_usec return valueZbigniew Jędrzejewski-Szmek2014-07-18
| | | | Also modify the function itself to be a bit simpler to read.
* compress: fix return valueZbigniew Jędrzejewski-Szmek2014-07-18
|
* journal: reduce test-journal-send timeout from 10s to 1sDavid Herrmann2014-07-18
| | | | | | The sleep(10) in test-journal-send is quite aggressive. We need it only for the journal to get our cgroup information. But even that information is not vital to the test, so a sleep(1) should be just fine.
* journal/verify: flush progress bar, print offset in more placesZbigniew Jędrzejewski-Szmek2014-07-16
| | | | | Before, fragments of the progress bar would remain when errors or warnings were printed.
* Let config_parse open file where applicableZbigniew Jędrzejewski-Szmek2014-07-16
| | | | | | | | Special care is needed so that we get an error message if the file failed to parse, but not when it is missing. To avoid duplicating the same error check in every caller, add an additional 'warn' boolean to tell config_parse whether a message should be issued. This makes things both shorter and more robust wrt. to error reporting.
* test-compress-benchmark: add missing % before PRIu64 formatThomas Hindoe Paaboel Andersen2014-07-16
|
* test-compress-benchmark: silence warningsMarc-Antoine Perennou2014-07-15
| | | | and btw make it pass for 32bits where size_t != uint64_t
* Clear up confusion wrt. ENTRY_SIZE_MAX and DATA_SIZE_MAXZbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | | | | Define DATA_SIZE_MAX to mean the maximum size of a single field, and ENTRY_SIZE_MAX to mean the size of the whole entry, with some rough calculation of overhead over the payload. Check if entries are not too big when processing native journal messages.
* Constify ConfigTableItem tablesZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-upload: use journal as the sourceZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-remote: reject fields above maximum sizeZbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | | Also fix an infinite loop on E2BIG. Remember what range we already scanned for '\n', to avoid quadratic behaviour on long "text" fields.
* Move network-related journal programs to src/journal-remote/Zbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | | Directory src/journal has become one of the largest directories, and since systemd-journal-gatewayd, systemd-journal-remote, and forthcoming systemd-journal-upload are all closely related, create a separate directory for them.
* microhttp-util: rework gnutls loggingZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal: allow files with no data whatsoeverZbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | | If a file was opened for writing, and then closed immediately without actually writing any entries, on subsequent opening, it would be considered "corrupted". This should be totally fine, and even in read mode, an empty file can become non-empty later on.
* Fix build without any compression enabledZbigniew Jędrzejewski-Szmek2014-07-11
|