Commit graph

3161 commits

Author SHA1 Message Date
Lennart Poettering a8573ccc35 pam: check environ[] for XDG_SEAT as fallback
This is useful for systems such as kmscon which want to invoke classic
/sbin/login but use it on multiple seats.
2012-10-01 14:50:05 -04:00
Daniel J Walsh d67227c8b9 selinux: fix various problems 2012-09-28 16:59:28 +02:00
Lennart Poettering 760c85c0bd journald: rework auto-rotation logic 2012-09-28 15:42:34 +02:00
Lennart Poettering 80d1c5988b journald: close sd_journal context after flushing to /var 2012-09-28 15:41:20 +02:00
Dave Reisner 1845fdd967 tmpfiles: restore previous behavior for F/f
d4e9eb91ea changed the behavior for the F and f actions, wrongly sending
them to glob_item(). Restore the old behavior and shortcut straight to
write_one_file().
2012-09-27 20:53:05 -04:00
Lennart Poettering bf5542f891 journal: add missing browse.html file 2012-09-28 00:59:10 +02:00
Lennart Poettering 7b17a7d72f journal: add minimal journal gateway daemon based on GNU libmicrohttpd
This minimal HTTP server can serve journal data via HTTP. Its primary
purpose is synchronization of journal data across the network. It serves
journal data in three formats:

       text/plain: the text format known from /var/log/messages
       application/json: the journal entries formatted as JSON
       application/vnd.fdo.journal: the binary export format of the journal

The HTTP server also serves a small HTML5 app that makes use of the JSON
serialization to present the journal data to the user.

Examples:

This downloads the journal in text format:

 # systemctl start systemd-journal-gatewayd.service
 # wget http://localhost:19531/entries

Same for JSON:

 # curl -H"Accept: application/json" http://localhost:19531/entries

Access via web browser:

 $ firefox http://localhost:19531/
2012-09-28 00:55:24 +02:00
Lennart Poettering be3ea5eaf2 sd-journal: properly parse cursor strings 2012-09-28 00:55:24 +02:00
Lennart Poettering 08ace05beb logs-show: various cleanups
Among other cleanups this introduces a threshold for the size of binary
blobs we serialize as integer arrays in the JSON output. THis can be
disabled via --all.
2012-09-28 00:55:24 +02:00
Lennart Poettering 8f14c8327b journalctl: add --cursor switch 2012-09-28 00:55:24 +02:00
Robert Milasan 2cf598fe02 udev: collect - use snprintf() 2012-09-27 15:51:58 +02:00
Lennart Poettering 31c460208d selinux: use standard D-Bus error id for access denied 2012-09-24 23:56:35 +02:00
Lennart Poettering cecd32f648 macro: increase VA_FORMAT_ADVANCE type array and hit assert when it is reached 2012-09-24 23:42:29 +02:00
Lennart Poettering 72f1d5a288 journal: also use new VA_FORMAT_ADVANCE() macro in sd_journal_send() 2012-09-24 23:42:03 +02:00
Lennart Poettering 963ddb917d log: fix repeated invocation of vsnprintf()/vaprintf() in log_struct()
https://bugs.freedesktop.org/show_bug.cgi?id=55213
2012-09-24 23:26:46 +02:00
Lennart Poettering 2a7b539a82 journald: always pass first entry timestamp back from journal_file_verify() 2012-09-24 15:02:43 +02:00
Mirco Tischler 73726ac898 journalctl: print correct timespan in verify
The old code used a timestamp to print a timespan for unsealed journalfiles,
incorrectly showing things like 2230 days of unsealed entries. Print the timespan
between the first and last entry instead.
2012-09-24 14:56:52 +02:00
Lennart Poettering 9086e840ff util: don't export parsed_columns 2012-09-24 14:43:07 +02:00
Mirco Tischler f1889c9119 journal: set seal even for readonly journalfiles
journalctl needs to know wether the file has been sealed to
be able to do verification.
2012-09-24 14:41:38 +02:00
Dave Reisner 585314e84c journalctl: reset cached column count on SIGWINCH
This requires a little bit of tip-toeing around to explicitly avoid
touching the environment from a sig handler. Instead, simply create a
function to reset the var to its "unset" state, allowing the next call
to columns() to recalculate and cache the new value.
2012-09-24 08:38:03 -04:00
Lennart Poettering dd144c63e2 mount: simplify device node conditions a bit 2012-09-24 12:48:46 +02:00
Lennart Poettering 63a8b2f947 mount: only run fsck for actual device nodes 2012-09-24 12:39:13 +02:00
Lennart Poettering a07fdfa376 main: don't try to mout cpuset with cpu+cpuacct anymore
Turns out cpuset needs explicit initialization before we could make use
of it. Thus mounting cpuset with cpu/cpuacct would make it impossible to
just create a group in "cpu" and start it.
2012-09-24 11:35:51 +02:00
Lennart Poettering 2a2507e60d journal: add missing test file 2012-09-24 10:18:10 +02:00
Lukas Nykryn 9c513fe009 udev: free fd before return in accelerometer.c 2012-09-23 14:24:44 +02:00
Lukas Nykryn ab261e1226 udev: free fd before return in scsi_serial.c 2012-09-23 14:24:43 +02:00
Václav Pavlín 0820a4f0f6 udev: free rule structure on error 2012-09-23 14:24:43 +02:00
Václav Pavlín cb32f0141e udev: check return value of write 2012-09-23 14:24:43 +02:00
Václav Pavlín 6bb2f0a08a udev: check return value of symlink 2012-09-23 14:24:43 +02:00
Václav Pavlín 029f4f21fc libudev: check return value of rename 2012-09-23 14:24:43 +02:00
Václav Pavlín 8dc8ef598d udev: check malloc return in collect/collect.c
Returns from no memory checks updated with log_oom call
2012-09-23 14:24:43 +02:00
Lennart Poettering e2c8b07dcb journal: bring mmap cache prototype in sync 2012-09-22 00:16:13 +02:00
Lennart Poettering e18021f7da journal: always keep marked mmap windows around 2012-09-21 23:37:06 +02:00
Eelco Dolstra 848af05524 missing: Fix compilation error due to wrong __NR_name_to_handle_at definition
"__NR_name_to_handle" should read "__NR_name_to_handle_at".  This
fixes a compilation error on systems with older kernel headers.
2012-09-21 22:51:48 +02:00
Lennart Poettering c2893c4b34 journald: log how big the journal files may grow 2012-09-21 22:50:26 +02:00
Lennart Poettering 1705594f59 journalctl: make the argument to -n optional 2012-09-21 22:33:02 +02:00
Lennart Poettering f801968466 journal: completely rework the mmap cache as I too dumb to actually understand it
Instead of doing hand optimized fd bisect arrays just use plain old
hashmaps. Now I can understand my own code again. Yay!

As a side effect this should fix some bad memory accesses caused by
accesses after mmap(), introduced in 189.
2012-09-21 20:52:23 +02:00
Lennart Poettering aaeef05886 multi-seat-x: drop a lot of unnecessary code 2012-09-21 17:03:40 +02:00
Lennart Poettering 0187f62bb5 sysctl: always return the last error we encountered 2012-09-21 17:03:40 +02:00
Lennart Poettering 77e63fafa5 nspawn: document why we don't check resolv.conf mount errors 2012-09-21 16:55:56 +02:00
Lennart Poettering d40361453b nspawn: we can't overmount /etc/localtime anymore since it's usually a symlink now
Create the right symlink if possible for /etc/localtime
2012-09-21 16:54:54 +02:00
Lennart Poettering 4eeebf70aa hwclock: add missing OOM check 2012-09-21 16:29:09 +02:00
Lennart Poettering 8e7705e52a pam: document that we don't do error checking when parsing vtnr 2012-09-21 16:17:26 +02:00
Lennart Poettering 0559d3a58a journal: don't allow journal_file_open() to be called with ret being NULL 2012-09-21 16:16:39 +02:00
Lukas Nykryn 5d5e98eb8c login: missing break for getopt ARG_NO_ASK_PASSWORD in loginctl 2012-09-21 16:12:55 +02:00
Lukas Nykryn 089d4a08d0 sysctl: fix error code handling
After  if (r <= 0) r can't  be 0 so
if (k < 0 && r == 0) never happens.
2012-09-21 16:12:47 +02:00
Václav Pavlín d42c44fb6d modules-load: initalize files to null 2012-09-21 16:11:07 +02:00
Václav Pavlín f2cc3753ce locale: make sure that l is freed 2012-09-21 16:10:34 +02:00
Václav Pavlín ca4f2b6d6d login: check return value of session_get_idle_hint 2012-09-21 16:08:54 +02:00
Václav Pavlín 5a165aa6b9 logind: check return value, log warning on error 2012-09-21 16:04:48 +02:00