chiark / gitweb /
8 years agobuild-sys: ship missing unit file
Lennart Poettering [Tue, 26 Mar 2013 01:48:25 +0000 (02:48 +0100)]
build-sys: ship missing unit file

8 years agounits: downgrade dependency on by basic...
Lennart Poettering [Tue, 26 Mar 2013 01:32:20 +0000 (02:32 +0100)]
units: downgrade dependency on by

There isn't really any need to require any targets but
from, so downgrade,,

8 years agobus: when we are talking to a bus, SCM_CREDS/SCM_SECLABEL are not very useful
Lennart Poettering [Tue, 26 Mar 2013 00:58:14 +0000 (01:58 +0100)]
bus: when we are talking to a bus, SCM_CREDS/SCM_SECLABEL are not very useful

8 years agobus: automatically generate minimal introspection data to find installed objects
Lennart Poettering [Tue, 26 Mar 2013 00:54:37 +0000 (01:54 +0100)]
bus: automatically generate minimal introspection data to find installed objects

8 years agobus: rename send_hello flag to bus_cient
Lennart Poettering [Mon, 25 Mar 2013 23:36:43 +0000 (00:36 +0100)]
bus: rename send_hello flag to bus_cient

This way we can hide more than just the hello logic behind this flag,
for example, later on automatic match management.

8 years agobuild-sys: create kernel/install.d directories
Kay Sievers [Tue, 26 Mar 2013 00:00:14 +0000 (01:00 +0100)]
build-sys: create kernel/install.d directories

8 years agoNEWS: update
Kay Sievers [Mon, 25 Mar 2013 23:41:07 +0000 (00:41 +0100)]
NEWS: update

8 years agocryptsetup-generator: let's be a bit more efficient with strv_extend()
Lennart Poettering [Mon, 25 Mar 2013 22:49:41 +0000 (23:49 +0100)]
cryptsetup-generator: let's be a bit more efficient with strv_extend()

8 years agocryptsetup-generator: add a missing OOM check
Lennart Poettering [Mon, 25 Mar 2013 22:49:13 +0000 (23:49 +0100)]
cryptsetup-generator: add a missing OOM check

8 years agoupdate NEWS
Lennart Poettering [Mon, 25 Mar 2013 22:48:08 +0000 (23:48 +0100)]
update NEWS

8 years agoprepare NEWS for 199
Lennart Poettering [Mon, 25 Mar 2013 22:05:21 +0000 (23:05 +0100)]
prepare NEWS for 199

8 years agoman: properly document the system targets that are also available for the user instance
Lennart Poettering [Mon, 25 Mar 2013 21:32:59 +0000 (22:32 +0100)]
man: properly document the system targets that are also available for the user instance

8 years agoman: rearrange systemd.special(7) to clarify which units are passive and which ones...
Lennart Poettering [Mon, 25 Mar 2013 21:30:51 +0000 (22:30 +0100)]
man: rearrange systemd.special(7) to clarify which units are passive and which ones aren't

This also adds a short explanation paragraph for this.

8 years agounits: there is no point in pulling in ordering 'provides'-style targets
Lennart Poettering [Mon, 25 Mar 2013 21:10:32 +0000 (22:10 +0100)]
units: there is no point in pulling in ordering 'provides'-style targets

Units such as,,,,, are to be pulled in by the implementing services, and
that's there only purpose. They should not have any 'active component'
otherwise, so let's drop all further deps from these units.

8 years agoupdate TODO
Lennart Poettering [Mon, 25 Mar 2013 21:09:53 +0000 (22:09 +0100)]
update TODO

8 years agounits: introduce to pull in dependencies from remote mounts
Lennart Poettering [Mon, 25 Mar 2013 21:04:40 +0000 (22:04 +0100)]
units: introduce to pull in dependencies from remote mounts

This introduces independently of The former is only for pulling things in, the
latter only for ordering.

The new semantics: is pulled in automatically by all remote mounts.
Shall be used to pull in other units that want to run when at least one
remote mount is set up. Is not ordered against the actual mount units,
in order to allow activation of its dependencies even 'a posteriori',
i.e. when a mount is established outside of systemd and is only picked
up by it. needs to be pulled in automatically by the
implementing service, is otherwise not part of the initial transaction.
This is ordered before all remote mount units.

A service that wants to be pulled in and run before all remote mounts
should hence have:

a) -- so that it is pulled in

b) + -- so that
   it is ordered before the mount point, normally.

8 years agoRevert " want"
Lennart Poettering [Mon, 25 Mar 2013 20:29:58 +0000 (21:29 +0100)]
Revert " want"

This reverts commit 6bde0b3220e95a08cefb70846f73b2cf24b7734a.

We should not pull in unconditionally. It's
supposed to be pulled in by the implementors of it, rather then its

8 years agounits: and also, order all early-boot sockets before
Lennart Poettering [Mon, 25 Mar 2013 20:25:06 +0000 (21:25 +0100)]
units: and also, order all early-boot sockets before

8 years agounits: order all udev services before, too
Lennart Poettering [Mon, 25 Mar 2013 20:22:52 +0000 (21:22 +0100)]
units: order all udev services before, too

Not that it would matter much, but let's make things a bit more
systematic: early boot services shall order themselves before, and nothing else.

8 years agoupdate TODO
Lennart Poettering [Mon, 25 Mar 2013 20:21:51 +0000 (21:21 +0100)]
update TODO

8 years agounits: introduce new and to hook timer/path units into...
Lennart Poettering [Mon, 25 Mar 2013 20:20:08 +0000 (21:20 +0100)]
units: introduce new and to hook timer/path units into for boot

8 years agofstab-generator: add missing strempty() calls
Mantas Mikulėnas [Mon, 25 Mar 2013 19:10:29 +0000 (21:10 +0200)]
fstab-generator: add missing strempty() calls

8 years agobuild-sys: add missing sed substitution for DEBUGTTY
Kay Sievers [Mon, 25 Mar 2013 17:49:55 +0000 (18:49 +0100)]
build-sys: add missing sed substitution for DEBUGTTY

8 years agobuild-sys: configurable debug shell tty path
Umut Tezduyar [Thu, 14 Mar 2013 13:58:40 +0000 (14:58 +0100)]
build-sys: configurable debug shell tty path

8 years agofstab-generator: fix minor memory leak on error path
Lennart Poettering [Mon, 25 Mar 2013 17:19:52 +0000 (18:19 +0100)]
fstab-generator: fix minor memory leak on error path

8 years agofstab-generator: add missing OOM check
Lennart Poettering [Mon, 25 Mar 2013 17:18:57 +0000 (18:18 +0100)]
fstab-generator: add missing OOM check

8 years agofstab-generator: rename x-initrd-rootfs.mount to x-initrd.rootfs
Lennart Poettering [Mon, 25 Mar 2013 17:18:09 +0000 (18:18 +0100)]
fstab-generator: rename x-initrd-rootfs.mount to x-initrd.rootfs

This changes the fstab mount option x-initrd-rootfs.mount to
x-initrd.rootfs, in order to only use a single namespace "x-initrd." for
all mount options of the initrd.

8 years agoupdate TODO
Lennart Poettering [Mon, 25 Mar 2013 17:17:15 +0000 (18:17 +0100)]
update TODO

8 years agojournal: Add sync timer to journal server
Oleksii Shevchuk [Mon, 25 Mar 2013 16:49:03 +0000 (18:49 +0200)]
journal: Add sync timer to journal server

Add option to force journal sync with fsync. Default timeout is 5min.
Interval configured via SyncIntervalSec option at journal.conf. Synced
journal files will be marked as OFFLINE.

Manual sync can be performed via sending SIGUSR1.

8 years agoupdate TODO
Lennart Poettering [Mon, 25 Mar 2013 16:25:48 +0000 (17:25 +0100)]
update TODO

8 years agocore: ensure LSB Provides are handled correctly
Frederic Crozat [Thu, 21 Mar 2013 14:40:45 +0000 (15:40 +0100)]
core: ensure LSB Provides are handled correctly

Let's say you have two initscripts, A and B:

A contains in its LSB header:
Required-Start: C

and B contains in its LSB header:
Provides: C

When systemd is parsing /etc/rc.d/, depending on the file order, you
can end up with either:
- B is parsed first. An unit "C.service" will be "created" and will be
added as additional name to B.service, with unit_add_name. No bug.
- A is parsed first. An unit "C.service" is created for the
"Required-Start" dependency (it will have no file attached, since
nothing provides this dependency yet). Then B is parsed and when trying
to handle "Provides: C", unit_add_name is called but will fail, because
"C.service" already exists in manager->units. Therefore, a merge should
occur for that case.

8 years agoudevd.c: set udev children_max according to CPU count
Harald Hoyer [Mon, 25 Mar 2013 12:02:05 +0000 (13:02 +0100)]
udevd.c: set udev children_max according to CPU count

Setting children_max according to RAM leads to too much concurrent I/O.

8 years agotimer: downgrade time change message to debug
Michal Schmidt [Mon, 25 Mar 2013 11:31:44 +0000 (12:31 +0100)]
timer: downgrade time change message to debug

The manager already prints "Time has been changed" at level info. It
seems too verbose to print the time change message additionally for
every waiting timer unit.

Downgrade the per-unit message to debug.

8 years agobus: split socket related code into bus-socket.[ch], to prepare for kdbus backend
Lennart Poettering [Mon, 25 Mar 2013 02:04:03 +0000 (03:04 +0100)]
bus: split socket related code into bus-socket.[ch], to prepare for kdbus backend

8 years agobus: implement 'unixexec:' protocol
Lennart Poettering [Mon, 25 Mar 2013 01:30:32 +0000 (02:30 +0100)]
bus: implement 'unixexec:' protocol

8 years agobus: make optional whether unix socket passing is negotiated and whether hello is...
Lennart Poettering [Sun, 24 Mar 2013 22:55:03 +0000 (23:55 +0100)]
bus: make optional whether unix socket passing is negotiated and whether hello is sent

This alos gets rid of explicit sd_open_fd() and sd_open_address()
constructors in favour of sd_new() + sd_new_start() where the
negotiation parameters may be set it in between.

8 years agobus: properly handle termination of connections
Lennart Poettering [Sun, 24 Mar 2013 22:54:44 +0000 (23:54 +0100)]
bus: properly handle termination of connections

8 years agobus: implement support for FD passing
Lennart Poettering [Sun, 24 Mar 2013 21:02:05 +0000 (22:02 +0100)]
bus: implement support for FD passing

8 years agoservice: no need to drop rc. prefix anymore
Miklos Vajna [Sun, 24 Mar 2013 09:06:38 +0000 (10:06 +0100)]
service: no need to drop rc. prefix anymore

This reverts commit f5c88ec1330b61787441156de7d764a140774bd2. It is no
longer necessary, and adds unnecessary magic.

8 years agojournald: remove unconditional log_*() use in the main loop
Kay Sievers [Sat, 23 Mar 2013 20:02:59 +0000 (21:02 +0100)]
journald: remove unconditional log_*() use in the main loop

Setting MaxRetentionSec= caused the kernel log to overflow and the
journal daemon to enter an endless loop.

Logging from the journald main loop gets directed to /dev/kmsg,
which wakes up journald again. We skip the import of this message
by checking for our own PID, but this still causes the main loop
to never go to sleep again because we never stopped logging from

8 years agoTODO: add journal MaxRetentionSec= bug
Kay Sievers [Sat, 23 Mar 2013 19:36:05 +0000 (20:36 +0100)]
TODO: add journal MaxRetentionSec= bug

Kay Sievers [Sat, 23 Mar 2013 15:27:28 +0000 (16:27 +0100)]

With the conversion from pci-db + usb-db to hwdb, the property
got accitentially renamed.

Move the name back to the long established identifier *MODEL*
instead of *PRODUCT*.

  $ git grep -l ID_MODEL_FROM_DATABASE

8 years agouaccess: remove needless usb_id call from udev rules
Kay Sievers [Sat, 23 Mar 2013 15:26:49 +0000 (16:26 +0100)]
uaccess: remove needless usb_id call from udev rules

8 years agoudevd: ensure static nodes are created before local-fs mount
Frederic Crozat [Thu, 21 Mar 2013 16:28:13 +0000 (17:28 +0100)]
udevd: ensure static nodes are created before local-fs mount

static nodes (like /dev/loop-control) are created when systemd-udevd
is started and needed to mount loopback devices. Therefore, should be only started after systemd-udevd is

8 years agoTODO: add "dead" device node ACL handling
Kay Sievers [Sat, 23 Mar 2013 13:01:44 +0000 (14:01 +0100)]
TODO: add "dead" device node ACL handling

8 years agoTODO: update
Kay Sievers [Sat, 23 Mar 2013 12:34:13 +0000 (13:34 +0100)]
TODO: update

8 years agoUpdate user session unit template.
Auke Kok [Sat, 23 Mar 2013 04:43:31 +0000 (21:43 -0700)]
Update user session unit template.

While most folks will be using the derivative from user-session-units,
I'm updating this one to reflect some of the fixes and things to note
about user sessions:

- cgroup should be set with "%u" - username instead of %I
- set dbus path with %U explicitly too
- hint to folks that wish to use MEM_CG features in user sessions
- allow unit to be enabled for instances with systemctl enable

8 years agoconf-parser: when we parse a string list, always fill in something
Lennart Poettering [Sat, 23 Mar 2013 03:32:43 +0000 (04:32 +0100)]
conf-parser: when we parse a string list, always fill in something

Some code really wants to know whether there was a string list parsed,
so don't take the shortcut here, and always allocate a string list, even
if it is an empty one.

8 years agojournal: don't access j->files after use
Lennart Poettering [Sat, 23 Mar 2013 03:11:23 +0000 (04:11 +0100)]
journal: don't access j->files after use

8 years agoudevadm: place const in the right place
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2013 02:55:05 +0000 (22:55 -0400)]
udevadm: place const in the right place

Otherwise clang at least thinks that both consts apply to char.

8 years agobus: don't free an unallocated var
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2013 02:00:49 +0000 (22:00 -0400)]
bus: don't free an unallocated var

Also remove unused variable.

8 years agobus: move attribute to end of structure, so it is not ignored
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2013 01:58:43 +0000 (21:58 -0400)]
bus: move attribute to end of structure, so it is not ignored

src/libsystemd-bus/bus-message.h:41:1: warning: attribute 'packed' is ignored, place it after
      "struct" to apply attribute to type declaration [-Wignored-attributes]

8 years agoupdate TODO
Lennart Poettering [Sat, 23 Mar 2013 03:03:32 +0000 (04:03 +0100)]
update TODO

8 years agoupdate TODO
Lennart Poettering [Sat, 23 Mar 2013 02:19:50 +0000 (03:19 +0100)]
update TODO

8 years agounit: never retroactively start requisites
Lennart Poettering [Sat, 23 Mar 2013 02:16:17 +0000 (03:16 +0100)]
unit: never retroactively start requisites

Requesites are not supposed to be auto-started afterall, they are just
checks, so don't try to be smarter here than appropriate.

Based on a patch from Michal Schmidt.

8 years agoRevert "units: ignore systemd-sysctl on shutdown"
Lennart Poettering [Sat, 23 Mar 2013 02:10:41 +0000 (03:10 +0100)]
Revert "units: ignore systemd-sysctl on shutdown"

This reverts commit faeffa73a81ab5b59acfadeb571431fb0e42af70.

There isn't really much point in dropping the Conflicts= since shutting
down this service is basically free as it doesn't have anything running.

Also, the patch was incomplete, because was still listed
in Before=.

8 years agoadd --with-telinit=PATH configure option
Cristian Rodríguez [Sat, 23 Mar 2013 00:04:53 +0000 (21:04 -0300)]
add --with-telinit=PATH configure option

Distributions that never shipped upstart do not have
"telinit" in /lib/upstart/..

Defaults to /lib/upstart/telinit so there is no change
for systems existing installs.

8 years agojournalctl: various fixes to the access check logic
Lennart Poettering [Sat, 23 Mar 2013 00:12:22 +0000 (01:12 +0100)]
journalctl: various fixes to the access check logic

- Reword messages a bit

- Correct check whether EACCES is in the set of errors

- Don't complain if no journal files are found

- allocate Set object for errors lazily since in the best case we don't
  need it at all.

- don't consider it an error if /run/log/journal doesn't exist (because
  that's the usual case actually, if storage is enabled)

8 years agodbus: Do send out "replies" to signals
Colin Walters [Fri, 22 Mar 2013 13:36:22 +0000 (09:36 -0400)]
dbus: Do send out "replies" to signals

Some parts of systemd (at least the DBus activation codepath) "reply"
to signals, which of course have the no-reply flag set.  We will be
defensive here and still send out a reply if we're passed a signal.

Regression introduced by: c6a818c82035da91e

Reported-by: Mantas Mikulėnas <>
Tested-by: Mantas Mikulėnas <>
8 years agoupdate TODO
Lennart Poettering [Fri, 22 Mar 2013 22:28:36 +0000 (23:28 +0100)]
update TODO

8 years agoexec: Assigning the empty string to CapabilityBoundSet= should drop all caps
Lennart Poettering [Fri, 22 Mar 2013 22:25:54 +0000 (23:25 +0100)]
exec: Assigning the empty string to CapabilityBoundSet= should drop all caps

Previously, it would set all caps, but it should drop them all, anything
else makes little sense.

Also, document that this works as it does, and what to do in order to
assign all caps to the bounding set.

8 years agoDrop trailing whitespace
Tollef Fog Heen [Fri, 22 Mar 2013 21:51:52 +0000 (22:51 +0100)]
Drop trailing whitespace

8 years agotimedated: extra overflow safety check when doing relative time changes
Lennart Poettering [Fri, 22 Mar 2013 20:35:53 +0000 (21:35 +0100)]
timedated: extra overflow safety check when doing relative time changes

Ensure clients don't overflow usec_t when doing relative time changes.
This is mostly just paranoia and protection against accidents, after all
clients are already authenticated, and they can se the time to any
value they wish anyway, but better be safe than sorry.

8 years agoupdate TODO
Lennart Poettering [Fri, 22 Mar 2013 20:17:53 +0000 (21:17 +0100)]
update TODO

8 years agotimedatectl: show CanNTP field
Lennart Poettering [Fri, 22 Mar 2013 20:17:45 +0000 (21:17 +0100)]
timedatectl: show CanNTP field

8 years agoudev: no need to output OOM, if we call log_oom() anyway
Lennart Poettering [Fri, 22 Mar 2013 20:05:42 +0000 (21:05 +0100)]
udev: no need to output OOM, if we call log_oom() anyway

8 years agomain: minor simplification
Lennart Poettering [Fri, 22 Mar 2013 14:05:51 +0000 (15:05 +0100)]
main: minor simplification

8 years agoudev/collect: avoid initalizing memory twice
Zbigniew Jędrzejewski-Szmek [Fri, 22 Mar 2013 00:05:42 +0000 (20:05 -0400)]
udev/collect: avoid initalizing memory twice

8 years agoutil: workaround two gcc warnings
Zbigniew Jędrzejewski-Szmek [Fri, 22 Mar 2013 03:24:30 +0000 (23:24 -0400)]
util: workaround two gcc warnings

gcc does not know that errno cannot be negative, and warns
about unitialized variables later on. Kill the warnings by
returning -errno only after checking that errno is positive.

8 years agojournalctl: be smarter about journal error checks
Zbigniew Jędrzejewski-Szmek [Mon, 11 Mar 2013 22:03:13 +0000 (18:03 -0400)]
journalctl: be smarter about journal error checks

There are many ways in which we can get those checks wrong, so it is
better to warn and then error out on a real access failure.

The error messages are wrapped to <80 lines, because their primary
use is to be displayed in the terminal, and it is easier to read them
this way. Reading them in the journal can be a bit trickier, but
this is a bug in logs-show.c.

8 years agobuild-sys: move acl searching code into libsystemd-acl
Zbigniew Jędrzejewski-Szmek [Fri, 22 Mar 2013 14:35:26 +0000 (14:35 +0000)]
build-sys: move acl searching code into libsystemd-acl

This loop over acls is a bit too much to keep inside
of another loop.

8 years agohostnamed: pretty_string_is_safe() already exists in string_has_cc(), so use that
Lennart Poettering [Fri, 22 Mar 2013 17:01:26 +0000 (18:01 +0100)]
hostnamed: pretty_string_is_safe() already exists in string_has_cc(), so use that

8 years agoutil: be more picky when validating hostnames
Lennart Poettering [Fri, 22 Mar 2013 16:59:49 +0000 (17:59 +0100)]
util: be more picky when validating hostnames

No longer allow dots at the beginning or end of host names, Or double

8 years agojournalctl: give a nice hint about group membership based on ACLs of /var/log/journal
Lennart Poettering [Fri, 22 Mar 2013 16:44:15 +0000 (17:44 +0100)]
journalctl: give a nice hint about group membership based on ACLs of /var/log/journal

If we notice that we unprivileged and not in any of the groups which
have access to /var/log/journal, print a nice message about which groups

This checks and prints all groups that are in the default ACL for
/var/log/journal, which is not necessarily correct for all journal
files, but pretty close.

8 years agocgroup: minor optimization
Lennart Poettering [Fri, 22 Mar 2013 05:01:04 +0000 (06:01 +0100)]
cgroup: minor optimization

8 years agobus: implement object handler registry
Lennart Poettering [Fri, 22 Mar 2013 04:58:47 +0000 (05:58 +0100)]
bus: implement object handler registry

8 years agomount: mount all cgroup controllers in containers, too
Lennart Poettering [Fri, 22 Mar 2013 03:42:48 +0000 (04:42 +0100)]
mount: mount all cgroup controllers in containers, too

8 years agomain: use strv_find() where we can
Lennart Poettering [Fri, 22 Mar 2013 03:42:26 +0000 (04:42 +0100)]
main: use strv_find() where we can

8 years agomain: don't mount cgroup controller unless PID == 1
Lennart Poettering [Fri, 22 Mar 2013 03:40:05 +0000 (04:40 +0100)]
main: don't mount cgroup controller unless PID == 1

This completes c1dae1b3c9729fb8ab749dd4e2dad07e0fad7ed8 in a way.

8 years agoFix vacuum logic error
Jan Alexander Steffens (heftig) [Wed, 20 Mar 2013 20:32:05 +0000 (21:32 +0100)]
Fix vacuum logic error

The vacuum code used to stop vacuuming after one deletion, even
when max_use was still exceeded.

Also make usage a uint64_t, as the code already pretends it is one.

Signed-off-by: Jan Alexander Steffens (heftig) <>
8 years agoman/shutdown: /etc/nologin is called /run/nologin now
Zbigniew Jędrzejewski-Szmek [Fri, 22 Mar 2013 02:47:32 +0000 (22:47 -0400)]
man/shutdown: /etc/nologin is called /run/nologin now

8 years agosystemd-python: allow retrieval of single fields
Zbigniew Jędrzejewski-Szmek [Thu, 21 Mar 2013 03:01:32 +0000 (23:01 -0400)]
systemd-python: allow retrieval of single fields

This can give huge efficiency gains, e.g. if only MESSAGE
is required and all other fields can be ignored.

8 years agosystemd-python: split out realtime and monotonic into separate functions
Zbigniew Jędrzejewski-Szmek [Wed, 20 Mar 2013 23:12:27 +0000 (19:12 -0400)]
systemd-python: split out realtime and monotonic into separate functions

This matches the C API more closely, and also enables the
user to get just partial information, should she desire to
do so.

Functions names in error messages are modified to not include
the class name, because Python uses just the function name
into functions declared as METH_NOARGS, and error messages
were inconsistent.

8 years agosystemd-python: implement _Reader.test_cursor
Zbigniew Jędrzejewski-Szmek [Wed, 20 Mar 2013 23:00:37 +0000 (19:00 -0400)]
systemd-python: implement _Reader.test_cursor

Getting the cursor is split out from .get_next() into
.get_cursor(). This mirrors the C API more closely, and
also makes things a bit faster if the cursor is not needed.

8 years agosystemd-python: cleanup up usec_t handling
Zbigniew Jędrzejewski-Szmek [Wed, 20 Mar 2013 22:40:05 +0000 (18:40 -0400)]
systemd-python: cleanup up usec_t handling

The behaviour wrt. seconds vs. microseconds was inconsistent.
Now _Reader always uses native units (us), while Reader always
uses seconds and accepts both floats and ints. This way the
conversion is always done in the Python layer, and the lower
level API allows access to the journal API without the potentially
lossy conversion between double and uint64_t.

8 years agosystemd-python: export sd_journal_get_usage
Zbigniew Jędrzejewski-Szmek [Wed, 20 Mar 2013 22:30:10 +0000 (18:30 -0400)]
systemd-python: export sd_journal_get_usage

8 years agoefivars: fix return code
Zbigniew Jędrzejewski-Szmek [Fri, 22 Mar 2013 00:55:17 +0000 (20:55 -0400)]
efivars: fix return code

Was returning 1 on read error.

8 years agoshutdownd: shut up bogus gcc warning
Zbigniew Jędrzejewski-Szmek [Thu, 21 Mar 2013 23:20:41 +0000 (19:20 -0400)]
shutdownd: shut up bogus gcc warning

This one is fake. But let's kill it, avoiding two condition checks
in the process.

src/shutdownd/shutdownd.c: In function 'when_wall':
src/shutdownd/shutdownd.c:182:44: warning: 'sub' may be used uninitialized in this function [-Wmaybe-uninitialized]
         return elapse > sub ? elapse - sub : 1;

8 years agobootchart: fix two unitialized memory frees
Zbigniew Jędrzejewski-Szmek [Thu, 21 Mar 2013 23:10:50 +0000 (19:10 -0400)]
bootchart: fix two unitialized memory frees

The new gcc isn't bad!

In file included from src/bootchart/svg.c:36:0:
src/bootchart/svg.c: In function 'svg_ps_bars':
./src/shared/util.h:524:13: warning: 'enc_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
         free(*(void**) p);
src/bootchart/svg.c:821:37: note: 'enc_name' was declared here
                 char _cleanup_free_*enc_name;
  CC     src/udev/mtd_probe/mtd_probe-probe_smartmedia.o
  XSLT     man/systemd.unit.5
In file included from src/bootchart/svg.c:36:0:
src/bootchart/svg.c: In function 'svg_pss_graph':
./src/shared/util.h:524:13: warning: 'enc_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
         free(*(void**) p);
src/bootchart/svg.c:395:37: note: 'enc_name' was declared here
                 char _cleanup_free_*enc_name;

8 years agoinitctl: fix return from unitialized memory in error path
Zbigniew Jędrzejewski-Szmek [Thu, 21 Mar 2013 23:06:55 +0000 (19:06 -0400)]
initctl: fix return from unitialized memory in error path

src/initctl/initctl.c: In function 'server_init':
src/initctl/initctl.c:282:13: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int r;

8 years agobuild-sys: use _FORTIFY_SOURCE with new gcc level -Og
Zbigniew Jędrzejewski-Szmek [Thu, 21 Mar 2013 18:53:12 +0000 (18:53 +0000)]
build-sys: use _FORTIFY_SOURCE with new gcc level -Og

8 years agobus: implicitly collect ucred/label information
Lennart Poettering [Fri, 22 Mar 2013 02:36:58 +0000 (03:36 +0100)]
bus: implicitly collect ucred/label information

8 years agobus: also finish connection before returning from sd_bus_get_unique_name()
Lennart Poettering [Fri, 22 Mar 2013 02:34:29 +0000 (03:34 +0100)]
bus: also finish connection before returning from sd_bus_get_unique_name()

8 years agobus: when parsing enforce maximum container depth
Lennart Poettering [Fri, 22 Mar 2013 01:32:34 +0000 (02:32 +0100)]
bus: when parsing enforce maximum container depth

8 years agobus: fix uninitialized variable
Lennart Poettering [Fri, 22 Mar 2013 01:20:39 +0000 (02:20 +0100)]
bus: fix uninitialized variable

8 years agobus: validate the hello response properly
Lennart Poettering [Fri, 22 Mar 2013 01:20:21 +0000 (02:20 +0100)]
bus: validate the hello response properly

8 years agobus: properly verify recursion depth of signatures
Lennart Poettering [Fri, 22 Mar 2013 01:19:49 +0000 (02:19 +0100)]
bus: properly verify recursion depth of signatures

8 years agobus: rework synchronization logic
Lennart Poettering [Fri, 22 Mar 2013 00:49:56 +0000 (01:49 +0100)]
bus: rework synchronization logic

Instead of allowing certain actions fail during authentication and
connection setup, implicitly synchronize on the connection to be set up
completely before returning.

8 years agobus: reuse more code
Lennart Poettering [Fri, 22 Mar 2013 00:49:13 +0000 (01:49 +0100)]
bus: reuse more code

8 years agobus: validate the entire header more closely
Lennart Poettering [Fri, 22 Mar 2013 00:15:20 +0000 (01:15 +0100)]
bus: validate the entire header more closely