platform/upstream/systemd.git
12 years agoselinux: rework selinux access check logic
Lennart Poettering [Tue, 2 Oct 2012 21:07:00 +0000 (17:07 -0400)]
selinux: rework selinux access check logic

a) Instead of parsing the bus messages inside of selinux-access.c
simply pass everything pre-parsed in the functions

b) implement the access checking with a macro that resolves to nothing
on non-selinux builds

c) split out the selinux checks into their own sources
selinux-util.[ch]

d) this unifies the job creation code behind the D-Bus calls
Manager.StartUnit() and Unit.Start().

12 years agoTODO
Lennart Poettering [Tue, 2 Oct 2012 17:11:26 +0000 (13:11 -0400)]
TODO

12 years agoupdate TODO
Kay Sievers [Tue, 2 Oct 2012 17:09:09 +0000 (19:09 +0200)]
update TODO

12 years agoupdate TODO
Kay Sievers [Tue, 2 Oct 2012 16:18:41 +0000 (18:18 +0200)]
update TODO

12 years agoupdate TODO
Kay Sievers [Tue, 2 Oct 2012 16:04:18 +0000 (18:04 +0200)]
update TODO

12 years agoman: fix invalid links to generator wiki pages
Dave Reisner [Tue, 2 Oct 2012 15:52:29 +0000 (11:52 -0400)]
man: fix invalid links to generator wiki pages

s/Generator/Generators/

12 years agojournald: assert target instead of page
Lukas Nykryn [Mon, 1 Oct 2012 07:53:33 +0000 (09:53 +0200)]
journald: assert target instead of page

page is a local, yet unitialized, variable.

12 years agoshared: fail mkdir_p if the target exists and is not a directory
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2012 12:42:10 +0000 (14:42 +0200)]
shared: fail mkdir_p if the target exists and is not a directory

This makes mkdir_p actually behave like mkdir -p.

12 years agonspawn: use automatic cleanup and provide debug info
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2012 08:58:31 +0000 (10:58 +0200)]
nspawn: use automatic cleanup and provide debug info

The documentation for --link-journal is also reworded.

12 years agotrivial: fix typo
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2012 07:38:37 +0000 (09:38 +0200)]
trivial: fix typo

12 years agoMinor typo
Tollef Fog Heen [Mon, 1 Oct 2012 19:48:15 +0000 (21:48 +0200)]
Minor typo

12 years agoBe consistent about "." vs no "." at the end of lines"
Tollef Fog Heen [Mon, 1 Oct 2012 19:40:58 +0000 (21:40 +0200)]
Be consistent about "." vs no "." at the end of lines"

12 years agopam: check environ[] for XDG_SEAT as fallback
Lennart Poettering [Mon, 1 Oct 2012 18:50:00 +0000 (14:50 -0400)]
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.

12 years agoselinux: fix various problems
Daniel J Walsh [Fri, 28 Sep 2012 14:26:59 +0000 (10:26 -0400)]
selinux: fix various problems

12 years agojournald: rework auto-rotation logic
Lennart Poettering [Fri, 28 Sep 2012 13:42:34 +0000 (15:42 +0200)]
journald: rework auto-rotation logic

12 years agojournald: close sd_journal context after flushing to /var
Lennart Poettering [Fri, 28 Sep 2012 13:41:20 +0000 (15:41 +0200)]
journald: close sd_journal context after flushing to /var

12 years agotmpfiles: restore previous behavior for F/f
Dave Reisner [Fri, 28 Sep 2012 00:48:13 +0000 (20:48 -0400)]
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().

12 years agoman: correct the default logging rate limit to actually say what the code implements v193
Lennart Poettering [Fri, 28 Sep 2012 00:18:55 +0000 (02:18 +0200)]
man: correct the default logging rate limit to actually say what the code implements

12 years agobuild-sys: prepare 193
Lennart Poettering [Thu, 27 Sep 2012 23:34:38 +0000 (01:34 +0200)]
build-sys: prepare 193

12 years agojournal: add missing browse.html file
Lennart Poettering [Thu, 27 Sep 2012 22:59:10 +0000 (00:59 +0200)]
journal: add missing browse.html file

12 years agojournal: add minimal journal gateway daemon based on GNU libmicrohttpd
Lennart Poettering [Thu, 27 Sep 2012 22:46:32 +0000 (00:46 +0200)]
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/

12 years agosd-journal: properly parse cursor strings
Lennart Poettering [Thu, 27 Sep 2012 21:28:54 +0000 (23:28 +0200)]
sd-journal: properly parse cursor strings

12 years agologs-show: various cleanups
Lennart Poettering [Thu, 27 Sep 2012 21:27:10 +0000 (23:27 +0200)]
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.

12 years agojournalctl: add --cursor switch
Lennart Poettering [Thu, 27 Sep 2012 21:25:23 +0000 (23:25 +0200)]
journalctl: add --cursor switch

12 years agoupdate TODO
Lennart Poettering [Thu, 27 Sep 2012 15:18:13 +0000 (17:18 +0200)]
update TODO

12 years agobuild-sys: bump revision
Lennart Poettering [Thu, 27 Sep 2012 15:18:08 +0000 (17:18 +0200)]
build-sys: bump revision

12 years agoudev: don't let systemd-udev-settle delay basic.target
Tom Gundersen [Thu, 27 Sep 2012 14:36:44 +0000 (16:36 +0200)]
udev: don't let systemd-udev-settle delay basic.target

It is no longer possible to manually enable systemd-udev-settle.service,
so its only use is by legacy services explicitly pulling it in. It makes
sense for these services to also explicitly order themselves after
udev-settle.service, which makes After=basic.target redundant.

This should reduce the negative effect on boot-time of having to enable
legacy services such as lvm.service.

12 years agoudev: collect - use snprintf()
Robert Milasan [Thu, 27 Sep 2012 13:51:58 +0000 (15:51 +0200)]
udev: collect - use snprintf()

12 years agoudev: remove Install section from systemd-udev-settle.service
Kay Sievers [Thu, 27 Sep 2012 13:16:03 +0000 (15:16 +0200)]
udev: remove Install section from systemd-udev-settle.service

Legacy tool on-demand pull-in the settling, it should never run
by default, nothing orders against is anyway.

12 years agobuild-sys: prepare release 192 v192
Lennart Poettering [Tue, 25 Sep 2012 20:23:57 +0000 (22:23 +0200)]
build-sys: prepare release 192

12 years agoselinux: use standard D-Bus error id for access denied
Lennart Poettering [Mon, 24 Sep 2012 21:56:35 +0000 (23:56 +0200)]
selinux: use standard D-Bus error id for access denied

12 years agomacro: increase VA_FORMAT_ADVANCE type array and hit assert when it is reached
Lennart Poettering [Mon, 24 Sep 2012 21:42:29 +0000 (23:42 +0200)]
macro: increase VA_FORMAT_ADVANCE type array and hit assert when it is reached

12 years agojournal: also use new VA_FORMAT_ADVANCE() macro in sd_journal_send()
Lennart Poettering [Mon, 24 Sep 2012 21:42:03 +0000 (23:42 +0200)]
journal: also use new VA_FORMAT_ADVANCE() macro in sd_journal_send()

12 years agolog: fix repeated invocation of vsnprintf()/vaprintf() in log_struct()
Lennart Poettering [Mon, 24 Sep 2012 21:22:19 +0000 (23:22 +0200)]
log: fix repeated invocation of vsnprintf()/vaprintf() in log_struct()

https://bugs.freedesktop.org/show_bug.cgi?id=55213

12 years agoupdate TODO
Lennart Poettering [Mon, 24 Sep 2012 20:46:22 +0000 (22:46 +0200)]
update TODO

12 years agorules: only mark MD disks, not partitions, with SYSTEMD_READY=0
Kay Sievers [Mon, 24 Sep 2012 12:55:25 +0000 (14:55 +0200)]
rules: only mark MD disks, not partitions, with SYSTEMD_READY=0

12 years agojournald: always pass first entry timestamp back from journal_file_verify()
Lennart Poettering [Mon, 24 Sep 2012 13:02:43 +0000 (15:02 +0200)]
journald: always pass first entry timestamp back from journal_file_verify()

12 years agojournalctl: print correct timespan in verify
Mirco Tischler [Sat, 22 Sep 2012 19:45:31 +0000 (21:45 +0200)]
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.

12 years agoutil: don't export parsed_columns
Lennart Poettering [Mon, 24 Sep 2012 12:43:07 +0000 (14:43 +0200)]
util: don't export parsed_columns

12 years agojournal: set seal even for readonly journalfiles
Mirco Tischler [Sat, 22 Sep 2012 19:45:30 +0000 (21:45 +0200)]
journal: set seal even for readonly journalfiles

journalctl needs to know wether the file has been sealed to
be able to do verification.

12 years agojournalctl: reset cached column count on SIGWINCH
Dave Reisner [Sat, 22 Sep 2012 16:50:27 +0000 (12:50 -0400)]
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.

12 years agomount: simplify device node conditions a bit
Lennart Poettering [Mon, 24 Sep 2012 10:48:46 +0000 (12:48 +0200)]
mount: simplify device node conditions a bit

12 years agomount: only run fsck for actual device nodes
Lennart Poettering [Mon, 24 Sep 2012 10:39:13 +0000 (12:39 +0200)]
mount: only run fsck for actual device nodes

12 years agomain: don't try to mout cpuset with cpu+cpuacct anymore
Lennart Poettering [Mon, 24 Sep 2012 09:35:51 +0000 (11:35 +0200)]
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.

12 years agoRevert "comment out uncommitted test source code"
Lennart Poettering [Mon, 24 Sep 2012 08:19:23 +0000 (10:19 +0200)]
Revert "comment out uncommitted test source code"

This reverts commit b8bc868009372deb2f30263322572723e5968842.

Added the test file now.

12 years agojournal: add missing test file
Lennart Poettering [Mon, 24 Sep 2012 08:18:10 +0000 (10:18 +0200)]
journal: add missing test file

12 years agoNEWS: fix some typos
Lennart Poettering [Sun, 23 Sep 2012 17:19:22 +0000 (19:19 +0200)]
NEWS: fix some typos

12 years agocomment out uncommitted test source code
Kay Sievers [Sun, 23 Sep 2012 12:31:53 +0000 (14:31 +0200)]
comment out uncommitted test source code

12 years agoudev: free fd before return in accelerometer.c
Lukas Nykryn [Fri, 21 Sep 2012 11:03:00 +0000 (13:03 +0200)]
udev: free fd before return in accelerometer.c

12 years agoudev: free fd before return in scsi_serial.c
Lukas Nykryn [Fri, 21 Sep 2012 11:01:29 +0000 (13:01 +0200)]
udev: free fd before return in scsi_serial.c

12 years agoudev: free rule structure on error
Václav Pavlín [Fri, 21 Sep 2012 12:54:30 +0000 (14:54 +0200)]
udev: free rule structure on error

12 years agoudev: check return value of write
Václav Pavlín [Fri, 21 Sep 2012 11:51:45 +0000 (13:51 +0200)]
udev: check return value of write

12 years agoudev: check return value of symlink
Václav Pavlín [Fri, 21 Sep 2012 10:52:08 +0000 (12:52 +0200)]
udev: check return value of symlink

12 years agolibudev: check return value of rename
Václav Pavlín [Fri, 21 Sep 2012 10:40:29 +0000 (12:40 +0200)]
libudev: check return value of rename

12 years agoudev: check malloc return in collect/collect.c
Václav Pavlín [Fri, 21 Sep 2012 10:17:23 +0000 (12:17 +0200)]
udev: check malloc return in collect/collect.c

Returns from no memory checks updated with log_oom call

12 years agobash-completion: fix whitespace
Dave Reisner [Fri, 14 Sep 2012 02:54:01 +0000 (22:54 -0400)]
bash-completion: fix whitespace

Use spaces for indentation instead of tabs.

12 years agobash-completion: add rumidentary support for journalctl
Dave Reisner [Fri, 14 Sep 2012 02:49:42 +0000 (22:49 -0400)]
bash-completion: add rumidentary support for journalctl

12 years agojournal: bring mmap cache prototype in sync
Lennart Poettering [Fri, 21 Sep 2012 22:16:13 +0000 (00:16 +0200)]
journal: bring mmap cache prototype in sync

12 years agobuild-sys: prepare release 191 v191
Lennart Poettering [Fri, 21 Sep 2012 21:05:10 +0000 (23:05 +0200)]
build-sys: prepare release 191

12 years agojournal: always keep marked mmap windows around
Lennart Poettering [Fri, 21 Sep 2012 21:33:22 +0000 (23:33 +0200)]
journal: always keep marked mmap windows around

12 years agomissing: Fix compilation error due to wrong __NR_name_to_handle_at definition
Eelco Dolstra [Fri, 21 Sep 2012 16:55:51 +0000 (12:55 -0400)]
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.

12 years agojournald: log how big the journal files may grow
Lennart Poettering [Fri, 21 Sep 2012 20:50:26 +0000 (22:50 +0200)]
journald: log how big the journal files may grow

12 years agojournalctl: make the argument to -n optional
Lennart Poettering [Fri, 21 Sep 2012 20:33:02 +0000 (22:33 +0200)]
journalctl: make the argument to -n optional

12 years agojournal: completely rework the mmap cache as I too dumb to actually understand it
Lennart Poettering [Fri, 21 Sep 2012 18:52:23 +0000 (20:52 +0200)]
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.

12 years agomulti-seat-x: drop a lot of unnecessary code
Lennart Poettering [Fri, 21 Sep 2012 15:03:18 +0000 (17:03 +0200)]
multi-seat-x: drop a lot of unnecessary code

12 years agosysctl: always return the last error we encountered
Lennart Poettering [Fri, 21 Sep 2012 15:01:39 +0000 (17:01 +0200)]
sysctl: always return the last error we encountered

12 years agonspawn: document why we don't check resolv.conf mount errors
Lennart Poettering [Fri, 21 Sep 2012 14:55:56 +0000 (16:55 +0200)]
nspawn: document why we don't check resolv.conf mount errors

12 years agonspawn: we can't overmount /etc/localtime anymore since it's usually a symlink now
Lennart Poettering [Fri, 21 Sep 2012 14:54:54 +0000 (16:54 +0200)]
nspawn: we can't overmount /etc/localtime anymore since it's usually a symlink now

Create the right symlink if possible for /etc/localtime

12 years agohwclock: add missing OOM check
Lennart Poettering [Fri, 21 Sep 2012 14:29:09 +0000 (16:29 +0200)]
hwclock: add missing OOM check

12 years agopam: document that we don't do error checking when parsing vtnr
Lennart Poettering [Fri, 21 Sep 2012 14:17:22 +0000 (16:17 +0200)]
pam: document that we don't do error checking when parsing vtnr

12 years agojournal: don't allow journal_file_open() to be called with ret being NULL
Lennart Poettering [Fri, 21 Sep 2012 14:16:39 +0000 (16:16 +0200)]
journal: don't allow journal_file_open() to be called with ret being NULL

12 years agologin: missing break for getopt ARG_NO_ASK_PASSWORD in loginctl
Lukas Nykryn [Fri, 21 Sep 2012 10:33:32 +0000 (12:33 +0200)]
login: missing break for getopt ARG_NO_ASK_PASSWORD in loginctl

12 years agosysctl: fix error code handling
Lukas Nykryn [Fri, 21 Sep 2012 10:30:56 +0000 (12:30 +0200)]
sysctl: fix error code handling

After  if (r <= 0) r can't  be 0 so
if (k < 0 && r == 0) never happens.

12 years agomodules-load: initalize files to null
Václav Pavlín [Fri, 21 Sep 2012 13:03:28 +0000 (15:03 +0200)]
modules-load: initalize files to null

12 years agolocale: make sure that l is freed
Václav Pavlín [Fri, 21 Sep 2012 13:00:43 +0000 (15:00 +0200)]
locale: make sure that l is freed

12 years agologin: check return value of session_get_idle_hint
Václav Pavlín [Fri, 21 Sep 2012 11:38:40 +0000 (13:38 +0200)]
login: check return value of session_get_idle_hint

12 years agologind: check return value, log warning on error
Václav Pavlín [Fri, 21 Sep 2012 11:01:39 +0000 (13:01 +0200)]
logind: check return value, log warning on error

12 years agocgtop: missing '-'
Václav Pavlín [Fri, 21 Sep 2012 10:04:02 +0000 (12:04 +0200)]
cgtop: missing '-'

Return codes in systemd are negated and
if (r < 0)  if (r == ENOENT)
        was never true.

12 years agomulti-seat-x: drop framebuffer specific stuff, as we have a DRM driver now
Dave Airlie [Fri, 21 Sep 2012 13:53:10 +0000 (15:53 +0200)]
multi-seat-x: drop framebuffer specific stuff, as we have a DRM driver now

12 years agoRevert "multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat...
Lennart Poettering [Fri, 21 Sep 2012 13:51:04 +0000 (15:51 +0200)]
Revert "multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics on its own now"

This reverts commit 636d30a0895f17eca8313d50f9b2fc1ec5e128da.

Turns out we will need the multi-seat wrapper a bit longer, however
without the fb-specific bits in it.

12 years agologind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey=
Lennart Poettering [Fri, 21 Sep 2012 13:44:14 +0000 (15:44 +0200)]
logind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey=

The kernel and X11 distuingish these two, and Thinkpad keys have both,
hence we really should distinguish them too.

12 years agomulti-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics...
Lennart Poettering [Fri, 21 Sep 2012 10:46:22 +0000 (12:46 +0200)]
multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics on its own now

12 years agocore: call va_end in all cases
Lukas Nykryn [Fri, 21 Sep 2012 08:23:08 +0000 (10:23 +0200)]
core: call va_end in all cases

12 years agoshared: call va_end in all cases
Lukas Nykryn [Fri, 21 Sep 2012 08:22:46 +0000 (10:22 +0200)]
shared: call va_end in all cases

12 years agologind: allow users to override their own suspend/sleep inhibitors
Lennart Poettering [Fri, 21 Sep 2012 09:57:48 +0000 (11:57 +0200)]
logind: allow users to override their own suspend/sleep inhibitors

12 years agoupdate TODO
Lennart Poettering [Thu, 20 Sep 2012 21:00:44 +0000 (23:00 +0200)]
update TODO

12 years agofix typo in NEWS
Lennart Poettering [Thu, 20 Sep 2012 20:50:26 +0000 (22:50 +0200)]
fix typo in NEWS

12 years agoupdate TODO v190
Lennart Poettering [Thu, 20 Sep 2012 18:52:19 +0000 (20:52 +0200)]
update TODO

12 years agotimedated: /etc/sysconfig/clock is dead on Fedora, remove it
Lennart Poettering [Thu, 20 Sep 2012 18:51:18 +0000 (20:51 +0200)]
timedated: /etc/sysconfig/clock is dead on Fedora, remove it

12 years agotypo fix
Lennart Poettering [Thu, 20 Sep 2012 17:58:31 +0000 (19:58 +0200)]
typo fix

12 years agofix typos
Lennart Poettering [Thu, 20 Sep 2012 17:12:23 +0000 (19:12 +0200)]
fix typos

12 years agoupdate TODO
Lennart Poettering [Thu, 20 Sep 2012 17:00:26 +0000 (19:00 +0200)]
update TODO

12 years agobuild-sys: prepare v190
Lennart Poettering [Thu, 20 Sep 2012 16:54:20 +0000 (18:54 +0200)]
build-sys: prepare v190

12 years agoutil: fix overflow checks
Lennart Poettering [Thu, 20 Sep 2012 15:53:03 +0000 (17:53 +0200)]
util: fix overflow checks

12 years agobuild-sys: require certain version of libselinux
Jan Engelhardt [Thu, 20 Sep 2012 08:20:49 +0000 (10:20 +0200)]
build-sys: require certain version of libselinux

./.libs/libsystemd-core.a(libsystemd_core_la-selinux-access.o):
In function "selinux_access_check":
src/core/selinux-access.c:487: undefined reference to
"selinux_check_access"

12 years agoutil: overflow hardening
Lennart Poettering [Thu, 20 Sep 2012 09:08:27 +0000 (11:08 +0200)]
util: overflow hardening

12 years agoutil: make sure heap allocators fail when array allocations are out of bounds
Lennart Poettering [Wed, 19 Sep 2012 22:02:01 +0000 (00:02 +0200)]
util: make sure heap allocators fail when array allocations are out of bounds

https://bugzilla.redhat.com/show_bug.cgi?id=858777

12 years agojournald: don't accept arbitrarily sized journal data fields
Lennart Poettering [Wed, 19 Sep 2012 20:51:28 +0000 (22:51 +0200)]
journald: don't accept arbitrarily sized journal data fields

https://bugzilla.redhat.com/show_bug.cgi?id=858746

12 years agoutil: define union dirent_storage and make use of it everywhere
Lennart Poettering [Wed, 19 Sep 2012 20:21:09 +0000 (22:21 +0200)]
util: define union dirent_storage and make use of it everywhere

Make sure to allocate enough space for readdir_r().

https://bugzilla.redhat.com/show_bug.cgi?id=858754

12 years agoutil: fix bad strstrip() return value in normalize_env_assignment()
Lennart Poettering [Wed, 19 Sep 2012 20:01:31 +0000 (22:01 +0200)]
util: fix bad strstrip() return value in normalize_env_assignment()

https://bugzilla.redhat.com/show_bug.cgi?id=858780