summaryrefslogtreecommitdiff
path: root/src/journal
AgeCommit message (Collapse)Author
2013-03-06journal: properly advertise sd_journal_reliable_fdZbigniew Jędrzejewski-Szmek
sd_journal_reliable_fd was added in 85210bffd836, but it was exported under the wrong name. Not too many users I guess.
2013-03-05journal/tests: free allocated memory in testZbigniew Jędrzejewski-Szmek
2013-03-05journald: introduce new "systemd-journal" group and make it own the journal ↵Lennart Poettering
files Previously all journal files were owned by "adm". In order to allow specific users to read the journal files without granting it access to the full "adm" powers, introduce a new specific group for this. "systemd-journal" has to be created by the packaging scripts manually at installation time. It's a good idea to assign a static UID/GID to this group, since /var/log/journal might be shared across machines via NFS. This commit also grants read access to the journal files by default to members of the "wheel" and "adm" groups via file system ACLs, since these "almost-root" groups should be able to see what's going on on the system. These ACLs are created by "make install". Packagers probably need to duplicate this logic in their postinst scripts. This also adds documentation how to grant access to the journal to additional users or groups via fs ACLs.
2013-03-05journald: stpcpy() + mempcpy() are awesomeLennart Poettering
2013-03-05journald: drop splitting-by-audit entirelyLennart Poettering
Thinking about it we should probably not hide bugs by falling back to audit when we have our own session information anyway.
2013-03-05journald: be a bit more careful when spitting up journals by user idLennart Poettering
2013-03-05journald: check session owner UID rather then audit ID when splitting up ↵Lennart Poettering
journal files We should always go by our own cgroup hierarchy before using foreign schemes such as audit, so let's do that for the split out logic too.
2013-03-04journal: split journal uid only when audit uid data is validKay Sievers
2013-03-03journald: do not barf when setting RateLimitInterval=0Zbigniew Jędrzejewski-Szmek
Assertion 'interval > 0 || burst == 0' failed at src/journal/journald-rate-limit.c:78, function journal_rate_limit_new(). Aborting.
2013-03-01coredump: bump coredump truncation size from 24M to 768MLennart Poettering
In the long run we really should make this runtime configurable.
2013-03-01journalctl: add --user-unit= switchDaniel Wallace
Add --user-unit= to make it possible to query for user logs by the name of the service.
2013-03-01journalctl: add --reverse option to show the newest lines firstLukas Nykryn
2013-02-28Merge branch 'python-systemd-reader'Zbigniew Jędrzejewski-Szmek
* python-systemd-reader: python-systemd: rename Journal to Reader build-sys: upload python documentation to freedesktop.org systemd-python: add Journal class for reading journal python: build html docs using sphinx journalct: also print Python code in --new-id python: utilize uuid.UUID in logging python: add systemd.id128 module ... and 34 other commits In short: python module systemd.id128 is added, and existing systemd.journal gains a new class systemd.journal.Reader, which can be used to iterate over journal entries. Documentation is provided, and accessible under e.g. pydoc3 systemd.journal.Reader or firefox http://www.freedesktop.org/software/systemd/man/python-systemd/
2013-02-26log-show: look at everything in /run/log/journalZbigniew Jędrzejewski-Szmek
Logs written by journald from the initramfs may be written to a directory with the name created from a random machine-id. Afterwards, when the root filesystem has been mounted and machine-id reinitalized, logs will be written to the directory with a name created from the proper machine-id. When logs are flushed to /var/log/journal, everything is copied to one output directory. When journalctl without '-m' is run after the logs have been flushed to /var/log/journal, all messages are shown. However, when run while logs are still in /run/log/journal, those stored under the random machine-id will not be shown. Make journalctl behave the same regardless whether persistent storage has been enabled or not, and slurp all files from /run/log/journal even without '-m'.
2013-02-24journal: fix --untilPaul W. Frields
https://bugs.freedesktop.org/show_bug.cgi?id=58946
2013-02-22journalct: also print Python code in --new-idZbigniew Jędrzejewski-Szmek
2013-02-22journal: sd_journal_get_cursor should return 0 on successZbigniew Jędrzejewski-Szmek
Documentation states that 0 is correct, and all other similar functions return 0 on success. Pointed-out-by: Steven Hiscocks <steven-systemd@hiscocks.me.uk>
2013-02-14added some missing include for a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7Harald Hoyer
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13use streq instead of strcmpThomas Hindoe Paaboel Andersen
2013-02-13journal: Don't use loginuid if it's not validColin Walters
Code above this attempted to load loginuid, if this failed for whatever reason, we'd still end up using that value (0) in place of realuid. Fix this by setting a bool when we know the loginuid is valid. This fixes journal messages showing up in per-user journals in gnome-ostree (not configured with loginuid, but I'll shortly fix that).
2013-02-12journalctl: allow both "-n 55" and "-n55" on the command line, as equivalent ↵Lennart Poettering
syntaxes https://bugs.freedesktop.org/show_bug.cgi?id=60596
2013-02-08shared: conf-files - add root parameterKay Sievers
2013-02-07coredump: make use of the cleanup macrosMirco Tischler
2013-02-07journal: log user units for coredumps and show them in systemctl statusMirco Tischler
2013-01-28journalctl: allow --lines=0 i.e. only newZbigniew Jędrzejewski-Szmek
Makes it easier to watch just for new entries. Once scenario is where the user starts 'journalctl -qfn0' to watch for changes during some operation.
2013-01-18journal: log _SYSTEMD_USER_UNIT for user session unitsMirco Tischler
2013-01-18journal-gatewayd,man: document new HTTPS optionsZbigniew Jędrzejewski-Szmek
2013-01-18journal-gatewayd: return nice error on unsupported methodsZbigniew Jędrzejewski-Szmek
Returns "HTTP/1.0 406 Not Acceptable" instead of silently closing the connection.
2013-01-18journal-gatewayd: allow pipeliningZbigniew Jędrzejewski-Szmek
The request must not be answered immediately (at first call to response_handler()), but on the second. This is also important for authentication, which cannot be performed on the first call. Before: % wget -O/dev/null -S https://localhost:19531/ --2012-11-28 18:29:43-- https://localhost:19531/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:19531... connected. HTTP request sent, awaiting response... HTTP/1.1 301 Moved Permanently Connection: close Content-Length: 87 Location: /browse Content-Type: text/html Date: Wed, 28 Nov 2012 17:29:44 GMT Location: /browse [following] --2012-11-28 18:29:43-- https://localhost:19531/browse Connecting to localhost (localhost)|127.0.0.1|:19531... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Connection: close Content-Length: 23260 Content-Type: text/html Date: Wed, 28 Nov 2012 17:29:44 GMT Length: 23260 (23K) [text/html] After: % wget --no-check-certificate -O/dev/null -S https://localhost:19531/ --2012-11-28 18:30:05-- https://localhost:19531/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:19531... connected. HTTP request sent, awaiting response... HTTP/1.1 301 Moved Permanently Content-Length: 87 Location: /browse Content-Type: text/html Date: Wed, 28 Nov 2012 17:30:05 GMT Location: /browse [following] --2012-11-28 18:30:05-- https://localhost:19531/browse Reusing existing connection to localhost:19531. HTTP request sent, awaiting response... HTTP/1.1 200 OK Content-Length: 23260 Content-Type: text/html Date: Wed, 28 Nov 2012 17:30:06 GMT Length: 23260 (23K) [text/html]
2013-01-18journal-gatewayd: always log oom() in addition to returning errorZbigniew Jędrzejewski-Szmek
2013-01-18journal-gatewayd: redirect microhttpd messages to journalZbigniew Jędrzejewski-Szmek
A prefix ("microhttpd: ") is added to the log lines to make it easy to distinguish the source.
2013-01-18journal-gatewayd: SSL supportZbigniew Jędrzejewski-Szmek
For now the certificates are passed around as options to the program. This might not be the most convenient under "production", but makes for fairly easy testing.
2013-01-18journal-gatewayd: unify two code pathsZbigniew Jędrzejewski-Szmek
In preparation for adding more options, split out the option handling code.
2013-01-16systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is ↵Lukas Nykryn
specified New file output.h with output flags and modes. --full parameter also for cgls and loginctl. Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup, show_cgroup_and_extra, show_cgroup_and_extra_by_spec). get_process_cmdline with max_length == 0 will not ellipsize output. Replace LINE_MAX with 0 in some calls of get_process_cmdline. [zj: Default to --full when under pager for clgs. Drop '-f' since it wasn't documented and didn't actually work. Reindent a bit. ]
2013-01-15journalctl: quit on I/O errorDavid Herrmann
This makes journalctl quit on ferror() conditions on stdout. It fixes an annoying bug if you pipe its output through 'less' and press 'q'. Without this fix journalctl will continue reading all journal data until EOF which can take quite some time. For instance on my machine: david-nb ~ # time journalctl | wc -l 327240 real 1m13.039s user 1m0.217s sys 0m10.467s However, expected behavior is journalctl to quit when its pager closed the output pipe. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-10journald: use automatic cleanupZbigniew Jędrzejewski-Szmek
2013-01-04build-sys: drop all distribution specfic checksLennart Poettering
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2012-12-19coredumpctl: check return of strndupLukas Nykryn
2012-12-17journal: move _packed_ attribute to the endZbigniew Jędrzejewski-Szmek
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.
2012-11-25journal: fix warning about pointer arithmeticZbigniew Jędrzejewski-Szmek
../src/journal/journal-send.c: In function 'sd_journal_sendv': ../src/journal/journal-send.c:250:73: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
2012-11-25journal-gatewayd: minor cleanupZbigniew Jędrzejewski-Szmek
2012-11-23journal: fix SO_PASSSEC invocationLennart Poettering
Spotted by Lukas Nykryn
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-11-20journal: add sd_journal_get_catalog_for_message_id() as API to get catalog ↵Lennart Poettering
entry for any message ID without requiring an open journal file
2012-11-20journal-send: always send SYSLOG_IDENTIFIER, if we have itLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=872193
2012-11-20journal-send: unify a bit of codeLennart Poettering
2012-11-20journald: fix bad memory accessLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=875653
2012-11-17journalctl: add option to forgo ellipsizationZbigniew Jędrzejewski-Szmek
Sometimes it is better to see messages in full, and the existing set of options didn't allow this easily. E.g. now journalctl -f --full will behave like tail -f /var/log/messages of yore. Long option only for now, since small letters are becoming scarce, and this doesn't feel like a capital-letter-option. '-u' would be nice, and the above command would be spelled journalctl -fu
2012-11-16journal: use $(localstatedir)/lib/systemd/catalog for the catalogZbigniew Jędrzejewski-Szmek
The path doesn't change in the standard configuration. Also, give full path to the journalctl binary in the hook, since it might be installed outside of $PATH. Also, add uninstall hook to remove the binary catalog.