chiark / gitweb /
elogind.git
6 years agoudev: use initialization instead of zeroing in one place
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:34:21 +0000 (19:34 -0400)]
udev: use initialization instead of zeroing in one place

6 years agoFix write-only use of a few variables
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:34:17 +0000 (19:34 -0400)]
Fix write-only use of a few variables

Since the invention of read-only memory, write-only memory has been
considered deprecated. Where appropriate, either make use of the
value, or avoid writing it, to make it clear that it is not used.

6 years agoIntroduce _cleanup_fdset_free_
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:33:48 +0000 (19:33 -0400)]
Introduce _cleanup_fdset_free_

6 years agobus: fix access to unitialized variable in error path
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:33:43 +0000 (19:33 -0400)]
bus: fix access to unitialized variable in error path

src/machine/machined-dbus.c:237:13: warning: Branch condition evaluates to a garbage value
        if (m)
            ^

6 years agodrop-ins: check return value
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:33:36 +0000 (19:33 -0400)]
drop-ins: check return value

If the function failed, nothing serious would happen
because unlink would probably return EFAULT, but this
would obscure the real error and is a bit sloppy.

6 years agojournald: use greedy_realloc in one place
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:33:30 +0000 (19:33 -0400)]
journald: use greedy_realloc in one place

6 years agodbus-common: avoid leak in error path
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:33:20 +0000 (19:33 -0400)]
dbus-common: avoid leak in error path

src/shared/dbus-common.c:968:33: warning: Potential leak of memory pointed to by 'l'
                        return -EINVAL;
                                ^~~~~~

6 years agoModernization
Zbigniew Jędrzejewski-Szmek [Sat, 12 Oct 2013 16:15:49 +0000 (12:15 -0400)]
Modernization

Fixes minor leak in error path in device.c.

6 years agoNever call qsort on potentially NULL arrays
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2013 23:33:13 +0000 (19:33 -0400)]
Never call qsort on potentially NULL arrays

This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero.

6 years agounicode: treat cute symbol block as fullwidth
Zbigniew Jędrzejewski-Szmek [Sun, 6 Oct 2013 01:44:31 +0000 (21:44 -0400)]
unicode: treat cute symbol block as fullwidth

UNICODE standards only talk about fullwidth characters for East
Asian scripts. But it seems that all those symbols are fullwidth
too.

6 years agotest: test for ellipsize
Shawn Landden [Sat, 21 Sep 2013 01:37:34 +0000 (18:37 -0700)]
test: test for ellipsize

6 years agoutil, utf8: make ellipsize take multi-byte characters into account
Shawn Landden [Sat, 21 Sep 2013 01:37:33 +0000 (18:37 -0700)]
util, utf8: make ellipsize take multi-byte characters into account

rename old versions to ascii_*

Do not take into account zerowidth characters, but do consider double-wide characters.
Import needed utf8 helper code from glib.

v3: rebase ontop of utf8 restructuring work

[zj: tweak the algorithm a bit, move new code to separate file]

6 years agoudevadm.xml: document --resolve-names option for test
Dave Reisner [Sun, 13 Oct 2013 21:42:51 +0000 (17:42 -0400)]
udevadm.xml: document --resolve-names option for test

And remove documentation of the --subsystem flag which doesn't actually
exist.

6 years agobus: properly implement logic for generating InterfacesAdded/InterfacesRemoved signal...
Lennart Poettering [Fri, 11 Oct 2013 21:22:29 +0000 (23:22 +0200)]
bus: properly implement logic for generating InterfacesAdded/InterfacesRemoved signals of ObjectManager

6 years agobus: in GetManagedObjects() only return each object once.
Lennart Poettering [Fri, 11 Oct 2013 21:21:22 +0000 (23:21 +0200)]
bus: in GetManagedObjects() only return each object once.

6 years agobus: unify code to find parents of an object path with
Lennart Poettering [Fri, 11 Oct 2013 21:20:54 +0000 (23:20 +0200)]
bus: unify code to find parents of an object path with

6 years agobus: properly generate GetAll reply
Lennart Poettering [Fri, 11 Oct 2013 21:19:40 +0000 (23:19 +0200)]
bus: properly generate GetAll reply

6 years agobus: add sd_bus_message_append_strv() to easily add a NULL terminated string array...
Lennart Poettering [Fri, 11 Oct 2013 21:02:47 +0000 (23:02 +0200)]
bus: add sd_bus_message_append_strv() to easily add a NULL terminated string array to a message

6 years agobus: make sure introspection can be generated correctly with NULL method signatures
Lennart Poettering [Fri, 11 Oct 2013 21:01:35 +0000 (23:01 +0200)]
bus: make sure introspection can be generated correctly with NULL method signatures

6 years agobus: beef up parameter checking in vtable handling
Lennart Poettering [Fri, 11 Oct 2013 19:27:59 +0000 (21:27 +0200)]
bus: beef up parameter checking in vtable handling

6 years agobus: beef up parameter checking of convenience calls
Lennart Poettering [Fri, 11 Oct 2013 18:49:19 +0000 (20:49 +0200)]
bus: beef up parameter checking of convenience calls

6 years agobus: don't rely on gccisms/c11 in public header files.
Lennart Poettering [Fri, 11 Oct 2013 18:32:16 +0000 (20:32 +0200)]
bus: don't rely on gccisms/c11 in public header files.

One day sd-bus.h should become a public header file. We generally try to
be conservative in language features we use in public headers (much
unlike in private code), hence don't make use of anonymous unions in
structs for the vtable definitions.

6 years agobus: split up overly long sd-bus.c into three files
Lennart Poettering [Fri, 11 Oct 2013 18:18:10 +0000 (20:18 +0200)]
bus: split up overly long sd-bus.c into three files

6 years agobus: if a a Set() vtable callback of a writable is left NULL, try to do the right...
Lennart Poettering [Fri, 11 Oct 2013 18:02:16 +0000 (20:02 +0200)]
bus: if a a Set() vtable callback of a writable is left NULL, try to do the right thing automatically

6 years agobus: automatically do a NOP reply when a NULL callback is specified for a method...
Lennart Poettering [Fri, 11 Oct 2013 17:33:39 +0000 (19:33 +0200)]
bus: automatically do a NOP reply when a NULL callback is specified for a method in a vtable

Also, allow specifiying NULL as signature in vtables equivalent to ""
for empty parameter lists.

6 years agoAdd support for saving/restoring keyboard backlights
Bastien Nocera [Fri, 11 Oct 2013 07:45:32 +0000 (09:45 +0200)]
Add support for saving/restoring keyboard backlights

Piggy-backing on the display backlight code, this saves and restores
keyboard backlights on supported devices.

The detection code matches that of UPower:
http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c#n173

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

[tomegun: also work for devices named "{smc,samsung,asus}::kbd_backlight"]

6 years agoudev: usb_id - remove obsoleted bInterfaceSubClass == 5 match
Kay Sievers [Fri, 11 Oct 2013 09:23:34 +0000 (11:23 +0200)]
udev: usb_id - remove obsoleted bInterfaceSubClass == 5 match

bInterfaceSubClass == 5 is not a "floppy"; just identify the obsolete
QIC-157 interface as "generic".

6 years agosmack: minimize ifdef use, and move all labeling to smack-util.c
Kay Sievers [Fri, 11 Oct 2013 07:47:31 +0000 (09:47 +0200)]
smack: minimize ifdef use, and move all labeling to smack-util.c

6 years agobus: when NULL is specified as property callback, automatically handle serialization...
Lennart Poettering [Fri, 11 Oct 2013 04:10:15 +0000 (06:10 +0200)]
bus: when NULL is specified as property callback, automatically handle serialization on Get()

6 years agobus: make PropertiesChanged emission work
Lennart Poettering [Fri, 11 Oct 2013 03:22:00 +0000 (05:22 +0200)]
bus: make PropertiesChanged emission work

6 years agobus: decorate API calls with gcc attributes where appropriate
Lennart Poettering [Fri, 11 Oct 2013 03:21:08 +0000 (05:21 +0200)]
bus: decorate API calls with gcc attributes where appropriate

6 years agobus: allow specifying NULL as type string when we want to construct messages with...
Lennart Poettering [Fri, 11 Oct 2013 03:20:24 +0000 (05:20 +0200)]
bus: allow specifying NULL as type string when we want to construct messages with no payload

6 years agobus: make GetManagedObjects() work
Lennart Poettering [Fri, 11 Oct 2013 02:52:38 +0000 (04:52 +0200)]
bus: make GetManagedObjects() work

6 years agoevent: add apis to query the timestamp of the event currently processed
Lennart Poettering [Fri, 11 Oct 2013 02:36:02 +0000 (04:36 +0200)]
event: add apis to query the timestamp of the event currently processed

6 years agoevent: move all library calls over to new assert_return() macro
Lennart Poettering [Fri, 11 Oct 2013 00:11:30 +0000 (02:11 +0200)]
event: move all library calls over to new assert_return() macro

6 years agoevent: add sd_event_source_get_child_pid() call to query the PID of a child event...
Lennart Poettering [Thu, 10 Oct 2013 23:33:25 +0000 (01:33 +0200)]
event: add sd_event_source_get_child_pid() call to query the PID of a child event source

6 years agoevent: rename the "mute" field of event sources to "enabled"
Lennart Poettering [Thu, 10 Oct 2013 23:08:15 +0000 (01:08 +0200)]
event: rename the "mute" field of event sources to "enabled"

In addition, the states "UNMUTED" and "MUTED" become "ON" and "OFF".

This has the benefit that a possible value of this field is not
identical to its name, thus minimizing confusion.

6 years agoevent: implement quit handlers
Lennart Poettering [Thu, 10 Oct 2013 22:49:11 +0000 (00:49 +0200)]
event: implement quit handlers

Quit handlers are executed when an event loop is terminated via
sd_event_request_quit(). They are in a way atexit() handlers that are
executed in a well-defined environment, time and thread: from the event
loop thread when the event loop finishes.

6 years agomacro: add new assert_return() macro for early parameter checking in functions
Lennart Poettering [Thu, 10 Oct 2013 22:45:47 +0000 (00:45 +0200)]
macro: add new assert_return() macro for early parameter checking in functions

For the library functions we expose we currently repeatedly use checks
like the following:

if (!value_is_ok(parameter1))
        return -EINVAL;
if (!value_is_ok(parameter2))
        return -EINVAL;

And so on. Let's turn this into a macro:

assert_return(value_is_ok(parameter1), -EINVAL);
assert_return(value_is_ok(paramater2), -EINVAL);

This makes our code a bit shorter and simpler, and also allows us to add
a _unlikely_() around the check.

6 years agoevent: refuse operation if the caller tries to reuse an event loop after a fork()
Lennart Poettering [Thu, 10 Oct 2013 19:37:50 +0000 (21:37 +0200)]
event: refuse operation if the caller tries to reuse an event loop after a fork()

6 years agoevent: add timer accuracy/coalescing logic
Lennart Poettering [Thu, 10 Oct 2013 19:16:21 +0000 (21:16 +0200)]
event: add timer accuracy/coalescing logic

In order to improve energy consumption we should minimize our wake-ups
when handling timers.  Hence, for each timer take an accuracy value and
schedule the actual wake-up time somewhere between the specified time
and the specified timer plus the accuracy.

The specified time of timer event sources hence becomes the time the
handler is called the *earliest*, and the specified time plus the accuracy
the time by which it is called the *latest*, leaving the library the
freedom to schedule the wake-up somewhere inbetween.

If the accuracy is specified as 0 the default of 250ms will be used.

When scheduling timeouts we will now try to elapse them at the same
point within each second, across the entire system. We do this by using
a fixed perturbation value keyed off the boot id. If this point within a
second is not in the acceptable range, we try again with a fixed time
within each 250ms time step. If that doesn't work either, we wake up at
the last possible time.

6 years agosecurity: missing header inclusions
Lennart Poettering [Thu, 10 Oct 2013 19:13:31 +0000 (21:13 +0200)]
security: missing header inclusions

6 years agobus: fix duplicate comparisons
Tero Roponen [Thu, 10 Oct 2013 05:14:24 +0000 (08:14 +0300)]
bus: fix duplicate comparisons

Testing for y > x is the same as testing for x < y.

6 years agosecurity: rework selinux, smack, ima, apparmor detection logic
Lennart Poettering [Thu, 10 Oct 2013 14:35:44 +0000 (16:35 +0200)]
security: rework selinux, smack, ima, apparmor detection logic

Always cache the results, and bypass low-level security calls when the
respective subsystem is not enabled.

6 years agologin: make sd_session_get_vt() actually work
David Herrmann [Thu, 10 Oct 2013 11:11:27 +0000 (13:11 +0200)]
login: make sd_session_get_vt() actually work

We use VTNR, not VTNr as key. Until now sd_session_get_vt() just returns
an error.

6 years agologin: fix invalid free() in sd_session_get_vt()
David Herrmann [Thu, 10 Oct 2013 11:09:37 +0000 (13:09 +0200)]
login: fix invalid free() in sd_session_get_vt()

We need to clear variables markes as _cleanup_free_. Otherwise, our
error-paths might corrupt random memory.

6 years agobus: add minimal event loop API
Lennart Poettering [Thu, 10 Oct 2013 02:40:28 +0000 (04:40 +0200)]
bus: add minimal event loop API

So far we tried to use epoll directly wherever we needed an event loop.
However, that has various shortcomings, such as the inability to handle
larger amounts of timers (since each timerfd costs one fd, which is a
very limited resource, usually bounded to 1024), and inability to do
priorisation between multiple queued events.

Let's add a minimal event loop API around epoll that is suitable for
implementation of our own daemons and maybe one day can become public
API for those who desire it.

This loop is part of libsystemd-bus, but may be used independently of
it.

6 years agojournald: remove rotated file from hashmap when rotation fails
Zbigniew Jędrzejewski-Szmek [Thu, 10 Oct 2013 02:13:13 +0000 (22:13 -0400)]
journald: remove rotated file from hashmap when rotation fails

Before, when the user journal file was rotated, journal_file_rotate
could close the old file and fail to open the new file. In that
case, we would leave the old (deallocated) file in the hashmap.
On subsequent accesses, we could retrieve this stale entry, leading
to a segfault.

When journal_file_rotate fails with the file pointer set to 0,
old file is certainly gone, and cannot be used anymore.

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

6 years agojournald: replace new+snprintf with asprintf
Zbigniew Jędrzejewski-Szmek [Thu, 10 Oct 2013 02:13:04 +0000 (22:13 -0400)]
journald: replace new+snprintf with asprintf

6 years agodo not accept "garbage" from acpi firmware performance data (FPDT)
Kay Sievers [Wed, 9 Oct 2013 23:38:11 +0000 (01:38 +0200)]
do not accept "garbage" from acpi firmware performance data (FPDT)

00000000  46 42 50 54 38 00 00 00  02 00 30 02 00 00 00 00  |FBPT8.....0.....|
00000010  23 45 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |#E..............|
00000020  f5 6a 51 00 00 00 00 00  00 00 00 00 00 00 00 00  |.jQ.............|
00000030  00 00 00 00 00 00 00 00  70 74 61 6c 58 00 00 00  |........ptalX...|

6 years agoSmack: Test if smack is enabled before mounting
Auke Kok [Wed, 9 Oct 2013 17:52:15 +0000 (10:52 -0700)]
Smack: Test if smack is enabled before mounting

Since on most systems with xattr systemd will compile with Smack
support enabled, we still attempt to mount various fs's with
Smack-only options.

Before mounting any of these Smack-related filesystems with
Smack specific mount options, check if Smack is functionally
active on the running kernel.

If Smack is really enabled in the kernel, all these Smack mounts
are now *fatal*, as they should be.

We no longer mount smackfs if systemd was compiled without
Smack support. This makes it easier to make smackfs mount
failures a critical error when Smack is enabled.

We no longer mount these filesystems with their Smack specific
options inside containers. There these filesystems will be
mounted with there non-mount smack options for now.

6 years agoudev: add SECLABEL{selinux}= support
Kay Sievers [Wed, 9 Oct 2013 15:31:00 +0000 (17:31 +0200)]
udev: add SECLABEL{selinux}= support

6 years agokeymap: Fix Samsung 900X[34]C
Martin Pitt [Wed, 9 Oct 2013 14:05:15 +0000 (16:05 +0200)]
keymap: Fix Samsung 900X[34]C

It appears that it's not really the 900 vs. 940 or the X3 vs X4, but the
A/B/C/D suffix after that which makes the difference between the keymaps. On a
NP900X3C-A04RU you get

   MODALIAS=dmi:bvn*:bvr*:bd*:svnSAMSUNGELECTRONICSCO.,LTD.:pn900X3C/900X3D/900X4C/900X4D:*

So change the matches to use AB vs. CDG as the differentiator.

Thanks to Anatoly Markov for reporting and testing!

6 years agoudev: reset Linux Security Module labels if no custom rules are given
Kay Sievers [Wed, 9 Oct 2013 02:17:39 +0000 (04:17 +0200)]
udev: reset Linux Security Module labels if no custom rules are given

6 years agobus: fix missing initialization
Lennart Poettering [Wed, 9 Oct 2013 02:04:10 +0000 (04:04 +0200)]
bus: fix missing initialization

6 years agotests: fix some memory leaks in tests
Lennart Poettering [Wed, 9 Oct 2013 02:04:04 +0000 (04:04 +0200)]
tests: fix some memory leaks in tests

6 years agojournald: fix minor memory leak
Lennart Poettering [Wed, 9 Oct 2013 02:03:45 +0000 (04:03 +0200)]
journald: fix minor memory leak

6 years agobuild-sys: add a makefile target to run all tests through valgrind
Lennart Poettering [Wed, 9 Oct 2013 02:02:54 +0000 (04:02 +0200)]
build-sys: add a makefile target to run all tests through valgrind

6 years agobuild-sys: add sd-bus-vtable.h header
Kay Sievers [Wed, 9 Oct 2013 01:39:57 +0000 (03:39 +0200)]
build-sys: add sd-bus-vtable.h header

6 years agobus: fix GetAll() userdata passing
Lennart Poettering [Wed, 9 Oct 2013 01:28:59 +0000 (03:28 +0200)]
bus: fix GetAll() userdata passing

6 years agobus: don't require that if a child object node exists its parent node must too
Lennart Poettering [Wed, 9 Oct 2013 01:27:22 +0000 (03:27 +0200)]
bus: don't require that if a child object node exists its parent node must too

6 years agobus: fix synthetic error messages
Lennart Poettering [Wed, 9 Oct 2013 01:26:34 +0000 (03:26 +0200)]
bus: fix synthetic error messages

6 years agolibsystemd-bus: add lightweight object vtable implementation for exposing objects...
Lennart Poettering [Wed, 9 Oct 2013 00:37:10 +0000 (02:37 +0200)]
libsystemd-bus: add lightweight object vtable implementation for exposing objects on the bus

This adds a lightweight scheme how to define interfaces in static fixed
arrays which then can be easily registered on a bus connection. This
makes it much easier to write bus services.

This automatically handles implementation of the Properties,
ObjectManager, and Introspection bus interfaces.

6 years agocore: unify the way we denote serialization attributes
Lennart Poettering [Tue, 8 Oct 2013 22:13:55 +0000 (00:13 +0200)]
core: unify the way we denote serialization attributes

6 years agosystemd: serialize/deserialize forbid_restart value
Sylvia Else [Mon, 7 Oct 2013 03:06:35 +0000 (23:06 -0400)]
systemd: serialize/deserialize forbid_restart value

The Service type's forbid_restart field was not preserved by
serialization/deserialization, so the fact that the service should not
be restarted after stopping was lost.

If a systemctl stop foo command has been given, but the foo service
has not yet stopped, and then the systemctl --system daemon-reload was
given, then when the foo service eventually stopped, systemd would
restart it.

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

6 years agojournalctl: flip to --full by default
Zbigniew Jędrzejewski-Szmek [Mon, 7 Oct 2013 01:55:18 +0000 (21:55 -0400)]
journalctl: flip to --full by default

We already shew lines in full when using a pager or not on a
tty. The commit disables ellipsization in the sole remaining case,
namely when --follow is used.

This has been a popular request for a long time, and indeed, full
output seems much more useful. Old behaviour can still be requested by
using --no-full. Old options retain their behaviour for compatiblity,
but aren't advertised as much. This change applies only to jornalctl,
not to systemctl, when ellipsization is useful to keep the layout.

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

6 years agoudev: support custom Linux Security Module labels for device nodes
Kay Sievers [Mon, 7 Oct 2013 23:59:10 +0000 (01:59 +0200)]
udev: support custom Linux Security Module labels for device nodes

6 years agoRun with a custom SMACK domain (label).
Auke Kok [Wed, 25 Sep 2013 22:49:42 +0000 (15:49 -0700)]
Run with a custom SMACK domain (label).

Allows the systemd --system process to change its current
SMACK label to a predefined custom label (usually "system")
at boot time.

This is needed to have a few system-generated folders and
sockets automatically be created with the right SMACK
label. Without that, processes either cannot communicate with
systemd or systemd fails to perform some actions.

6 years agoMount /run, /dev/shm usable to tasks when using SMACK.
Auke Kok [Thu, 26 Sep 2013 21:41:09 +0000 (14:41 -0700)]
Mount /run, /dev/shm usable to tasks when using SMACK.

Once systemd itself is running in a security domain for SMACK,
it will fail to start countless tasks due to missing privileges
for mounted and created directory structures. For /run and shm
specifically, we grant all tasks access.

These 2 mounts are allowed to fail, which will happen if the
system is not running a SMACK enabled kernel or security=none is
passed to the kernel.

6 years agoshared/util: fix off-by-one error in tag_to_udev_node
Dave Reisner [Sun, 6 Oct 2013 22:26:23 +0000 (18:26 -0400)]
shared/util: fix off-by-one error in tag_to_udev_node

Triggered false negatives when encoding a string which needed every
character to be escaped, e.g. "LABEL=/".

6 years agoutf8: fix utf8_is_printable
Zbigniew Jędrzejewski-Szmek [Sun, 6 Oct 2013 02:47:52 +0000 (22:47 -0400)]
utf8: fix utf8_is_printable

6 years agocore: do not add "what" to RequiresMountsFor for network mounts
Zbigniew Jędrzejewski-Szmek [Sat, 5 Oct 2013 17:09:43 +0000 (13:09 -0400)]
core: do not add "what" to RequiresMountsFor for network mounts

For cifs mount like //server/share, we would get
RequiresMountsFor=/server/share, which probably isn't
harmful, but quite confusing.

Unfortunately a bunch of static functions had to be moved
up, but patch is really one line.

6 years agomount: check for NULL before reading pm->what
Dave Reisner [Fri, 4 Oct 2013 22:22:40 +0000 (18:22 -0400)]
mount: check for NULL before reading pm->what

Since a57f7e2c828b85, a mount unit with garbage in it would cause
systemd to crash on loading it.

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

6 years agologind: fix bus introspection data for TakeControl()
Lennart Poettering [Fri, 4 Oct 2013 19:16:40 +0000 (21:16 +0200)]
logind: fix bus introspection data for TakeControl()

6 years agomanager: when verifying whether clients may change environment using selinux check...
Lennart Poettering [Fri, 4 Oct 2013 15:01:37 +0000 (17:01 +0200)]
manager: when verifying whether clients may change environment using selinux check for "reload" rather "reboot"

This appears to be a copy/paste error.

6 years agoupdate TODO
Lennart Poettering [Fri, 4 Oct 2013 15:01:32 +0000 (17:01 +0200)]
update TODO

6 years agosystemd: order remote mounts from mountinfo before remote-fs.target
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2013 02:15:08 +0000 (22:15 -0400)]
systemd: order remote mounts from mountinfo before remote-fs.target

Usually the network is stopped before filesystems are umounted.
Ordering network filesystems before remote-fs.target means that their
unmounting will be performed earlier, and can terminate sucessfully.

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

6 years agoIntroduce _cleanup_endmntent_
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2013 02:13:55 +0000 (22:13 -0400)]
Introduce _cleanup_endmntent_

6 years agogpt-auto-generator: exit immediately if in container
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2013 02:13:01 +0000 (22:13 -0400)]
gpt-auto-generator: exit immediately if in container

Otherwise we get an ugly warning when running systemd in
a container.

6 years agoexecute: more debugging messages
Zbigniew Jędrzejewski-Szmek [Wed, 28 Aug 2013 12:01:30 +0000 (08:01 -0400)]
execute: more debugging messages

6 years agoman: Improve the description of parameter X in tmpfiles.d page
Václav Pavlín [Thu, 3 Oct 2013 13:47:26 +0000 (15:47 +0200)]
man: Improve the description of parameter X in tmpfiles.d page

6 years agoexecute.c: always set $SHELL
Zbigniew Jędrzejewski-Szmek [Wed, 2 Oct 2013 11:23:10 +0000 (13:23 +0200)]
execute.c: always set $SHELL

In e6dca81 $SHELL was added to user@.service. Let's
instead provide it to all units which have a user.

6 years agotmpfiles.d: include setgid perms for /run/log/journal
Dave Reisner [Wed, 2 Oct 2013 19:35:16 +0000 (15:35 -0400)]
tmpfiles.d: include setgid perms for /run/log/journal

4608af4333d0f7f5 set permissions for journal storage on persistent disk
but not the volatile storage.

ref: https://bugs.archlinux.org/task/37170

6 years agonspawn: always copy /etc/resolv.conf rather than bind mount
Lennart Poettering [Wed, 2 Oct 2013 17:40:43 +0000 (19:40 +0200)]
nspawn: always copy /etc/resolv.conf rather than bind mount

We were already creating the file if it was missing, and this way
containers can reconfigure the file without running into problems.

This also makes resolv.conf handling more alike to handling of
/etc/localtime, which is also not a bind mount.

6 years agomkdir: pass a proper function pointer to mkdir_safe_internal
Lennart Poettering [Wed, 2 Oct 2013 17:38:52 +0000 (19:38 +0200)]
mkdir: pass a proper function pointer to mkdir_safe_internal

6 years agostrv: don't access potentially NULL string arrays
Lennart Poettering [Wed, 2 Oct 2013 17:38:28 +0000 (19:38 +0200)]
strv: don't access potentially NULL string arrays

6 years agoefi: never call qsort on potentially NULL arrays
Lennart Poettering [Wed, 2 Oct 2013 17:38:09 +0000 (19:38 +0200)]
efi: never call qsort on potentially NULL arrays

6 years agomodules-load: fix error handling
Lennart Poettering [Wed, 2 Oct 2013 17:37:44 +0000 (19:37 +0200)]
modules-load: fix error handling

6 years agodbus: fix return value of dispatch_rqueue()
Lennart Poettering [Wed, 2 Oct 2013 17:37:30 +0000 (19:37 +0200)]
dbus: fix return value of dispatch_rqueue()

6 years agobus: fix potentially uninitialized memory access
Lennart Poettering [Wed, 2 Oct 2013 17:37:11 +0000 (19:37 +0200)]
bus: fix potentially uninitialized memory access

6 years agojournald: add missing error check
Lennart Poettering [Wed, 2 Oct 2013 17:36:43 +0000 (19:36 +0200)]
journald: add missing error check

6 years agocryptsetup: fix OOM handling when parsing mount options
Lennart Poettering [Wed, 2 Oct 2013 17:36:28 +0000 (19:36 +0200)]
cryptsetup: fix OOM handling when parsing mount options

6 years agosystemctl: fix name mangling for sysv units
Václav Pavlín [Wed, 2 Oct 2013 14:42:42 +0000 (16:42 +0200)]
systemctl: fix name mangling for sysv units

6 years agoacpi: make sure we never free an uninitialized pointer
Lennart Poettering [Wed, 2 Oct 2013 12:03:56 +0000 (14:03 +0200)]
acpi: make sure we never free an uninitialized pointer

6 years agofix lingering references to /var/lib/{backlight,random-seed}
Dave Reisner [Wed, 2 Oct 2013 11:46:24 +0000 (07:46 -0400)]
fix lingering references to /var/lib/{backlight,random-seed}

This should have been part of ef5bfcf668e6029faa78534dfe.

6 years agoacpi-fptd: fix memory leak in acpi_get_boot_usec
Lukas Nykryn [Wed, 2 Oct 2013 11:39:49 +0000 (13:39 +0200)]
acpi-fptd: fix memory leak in acpi_get_boot_usec

6 years agocgroup: there's no point in labelling cgroupfs dirs, so let's not do that v208
Lennart Poettering [Wed, 2 Oct 2013 02:54:07 +0000 (04:54 +0200)]
cgroup: there's no point in labelling cgroupfs dirs, so let's not do that

This allows us to get rid of the dep on libsystemd-label for cgroup
management.

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

6 years agobuild-sys: mkdir.[ch] should be in libsystemd-shared
Lennart Poettering [Wed, 2 Oct 2013 02:52:48 +0000 (04:52 +0200)]
build-sys: mkdir.[ch] should be in libsystemd-shared

Otherwise, why is mkdir-label.[ch] split out?

6 years agobuild-ss: prepare new release
Lennart Poettering [Wed, 2 Oct 2013 01:02:25 +0000 (03:02 +0200)]
build-ss: prepare new release

6 years agohashmap: randomize hash functions a bit
Lennart Poettering [Tue, 1 Oct 2013 21:11:23 +0000 (23:11 +0200)]
hashmap: randomize hash functions a bit