chiark / gitweb /
David Herrmann [Fri, 22 Nov 2013 08:19:00 +0000 (09:19 +0100)]
macro: fix assert_cc() fallback
We need two-level macro-expansion, otherwise __LINE__ will not get
evaluated.
Marcel Holtmann [Sat, 21 Sep 2013 18:45:05 +0000 (11:45 -0700)]
hwdb: Update database of Bluetooth company identifiers
Lennart Poettering [Fri, 22 Nov 2013 03:01:46 +0000 (04:01 +0100)]
bus: rework sd_bus_error APIs
All calls that set a sd_bus_error structure will now return the same
error converted to a negative errno. This may be used as syntactic sugar
to return from a function and setting a bus_error structure in one go.
Also, translate all Linux Exyz (EIO, EINVAL, EUCLEAN, EPIPE, ...)
automatically into counterparts in the (new) "Posix.Error." namespace.
If we fail to allocate memory for the components of a sd_bus_error
automatically reset it to an OOM error which we always can write.
David Strauss [Mon, 11 Nov 2013 09:03:31 +0000 (19:03 +1000)]
cgroups: Cache controller masks and optimize queues.
Lennart Poettering [Fri, 22 Nov 2013 00:51:19 +0000 (01:51 +0100)]
bus: deal with duplicate values from enumerators
Lennart Poettering [Fri, 22 Nov 2013 00:28:45 +0000 (01:28 +0100)]
event: rename sd_event_get() to sd_event_source_get_event()
Lennart Poettering [Fri, 22 Nov 2013 00:21:59 +0000 (01:21 +0100)]
bus: add calls to query attached objects
Lennart Poettering [Fri, 22 Nov 2013 00:14:57 +0000 (01:14 +0100)]
bus: also add error parameter to object find and enumerator callbacks
Just in order to bring things inline with the method and property
callbacks.
Lennart Poettering [Thu, 21 Nov 2013 22:36:51 +0000 (23:36 +0100)]
bus: restore selinux access control to PID 1 for properties
Lennart Poettering [Thu, 21 Nov 2013 21:07:51 +0000 (22:07 +0100)]
timer: make timer accuracy configurable
And make it default to 1min
Kay Sievers [Thu, 21 Nov 2013 20:56:18 +0000 (21:56 +0100)]
build-sys: enable gcc Link Time Optimization when optimization is enabled
Lennart Poettering [Thu, 21 Nov 2013 20:36:04 +0000 (21:36 +0100)]
core: actually make SwitchRoot() bus call do the deed
Lennart Poettering [Thu, 21 Nov 2013 20:32:23 +0000 (21:32 +0100)]
core: fix serilization of ListJobs() response
Lennart Poettering [Thu, 21 Nov 2013 20:17:34 +0000 (21:17 +0100)]
core: fix serialization of client tracker
Lennart Poettering [Thu, 21 Nov 2013 19:49:04 +0000 (20:49 +0100)]
core: fix deserialization of StartTransientUnit() parameters
Lennart Poettering [Thu, 21 Nov 2013 19:18:59 +0000 (20:18 +0100)]
bus: properly serialize unit file change list
Lennart Poettering [Thu, 21 Nov 2013 19:05:49 +0000 (20:05 +0100)]
logind,machined,run: properly invoke StartTransientUnit() bus call
Lennart Poettering [Thu, 21 Nov 2013 18:34:37 +0000 (19:34 +0100)]
bus: rework message handlers to always take an error argument
Message handler callbacks can be simplified drastically if the
dispatcher automatically replies to method calls if errors are returned.
Thus: add an sd_bus_error argument to all message handlers. When we
dispatch a message handler and it returns negative or a set sd_bus_error
we send this as message error back to the client. This means errors
returned by handlers by default are given back to clients instead of
rippling all the way up to the event loop, which is desirable to make
things robust.
As a side-effect we can now easily turn the SELinux checks into normal
function calls, since the method call dispatcher will generate the right
error replies automatically now.
Also, make sure we always pass the error structure to all property and
method handlers as last argument to follow the usual style of passing
variables for return values as last argument.
Lennart Poettering [Thu, 21 Nov 2013 18:32:33 +0000 (19:32 +0100)]
hostnamed: modernizations
Lennart Poettering [Thu, 21 Nov 2013 18:31:46 +0000 (19:31 +0100)]
manager: always sort environment block, it's prettier
Lennart Poettering [Thu, 21 Nov 2013 01:17:24 +0000 (02:17 +0100)]
bus: the :no-sender hack is now unnecessary, since the new library doesn't require this anymore
Tom Gundersen [Thu, 21 Nov 2013 20:04:04 +0000 (21:04 +0100)]
networkd: make sure Network and Link can always be freed
Also, don't fail a link just because we can't find its MAC address.
Tom Gundersen [Thu, 21 Nov 2013 19:47:34 +0000 (20:47 +0100)]
networkd: avoid segfault
Daniel Mack [Thu, 21 Nov 2013 19:26:10 +0000 (20:26 +0100)]
src/core/selinux-access: #include <sys/socket.h>
Fixes the following build errors on Fedora 20:
CC src/core/libsystemd_core_la-selinux-access.lo
src/core/selinux-access.c: In function 'get_audit_data':
src/core/selinux-access.c:245:22: error: storage size of 'ucred' isn't known
struct ucred ucred;
^
src/core/selinux-access.c:259:9: warning: implicit declaration of function 'getsockopt' [-Wimplicit-function-declaration]
r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
^
src/core/selinux-access.c:259:28: error: 'SOL_SOCKET' undeclared (first use in this function)
r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
^
src/core/selinux-access.c:259:28: note: each undeclared identifier is reported only once for each function it appears in
src/core/selinux-access.c:259:40: error: 'SO_PEERCRED' undeclared (first use in this function)
r = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len);
^
src/core/selinux-access.c:245:22: warning: unused variable 'ucred' [-Wunused-variable]
struct ucred ucred;
^
make[2]: *** [src/core/libsystemd_core_la-selinux-access.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Kay Sievers [Thu, 21 Nov 2013 19:16:56 +0000 (20:16 +0100)]
bus: update kdbus.h
Václav Pavlín [Thu, 21 Nov 2013 14:28:02 +0000 (15:28 +0100)]
man: suggest using hash= atribut for swap in example
(#883941)
Tom Gundersen [Thu, 21 Nov 2013 14:30:08 +0000 (15:30 +0100)]
networkd: don't filter on udev tags
This removed the requirement for devices to be tagged with
'systemd-networkd' before they will be visible to networkd.
Still, as by default we don't ship any .network files, network
devices will simply be tracked, but not touched, unless the
admin configures things explicitly.
Tom Gundersen [Thu, 21 Nov 2013 11:35:46 +0000 (12:35 +0100)]
efi-boot-generator: don't mount /boot eagerly
Lennart Poettering [Thu, 21 Nov 2013 01:14:05 +0000 (02:14 +0100)]
bus: fix seriliazation of activation errors
Lennart Poettering [Thu, 21 Nov 2013 01:11:06 +0000 (02:11 +0100)]
bus: rename SD_BUS_ERROR_MAKE to SD_BUS_ERROR_MAKE_CONST to indicate it only works for const strings
Lennart Poettering [Thu, 21 Nov 2013 00:51:16 +0000 (01:51 +0100)]
bus: let's simplify things by getting rid of unnecessary bus parameters
Lennart Poettering [Thu, 21 Nov 2013 00:03:26 +0000 (01:03 +0100)]
bus: add API calls to escape string components of objects paths
Lennart Poettering [Wed, 20 Nov 2013 23:46:13 +0000 (00:46 +0100)]
sd-event: try to move timer wakeups to the same spot within each minute
Lennart Poettering [Wed, 20 Nov 2013 23:06:11 +0000 (00:06 +0100)]
socket: fix segfault
Lennart Poettering [Wed, 20 Nov 2013 21:11:10 +0000 (22:11 +0100)]
valgrind: make running PID 1 in valgrind useful
Since valgrind only generates useful output on exit() (rather than
exec()) we need to explicitly exit when valgrind is detected.
Lennart Poettering [Wed, 20 Nov 2013 21:10:42 +0000 (22:10 +0100)]
nspawn: add new --drop-capability= switch
Lennart Poettering [Wed, 20 Nov 2013 17:20:23 +0000 (18:20 +0100)]
event: make sure to possibly disarm the timerfds before we reenter epoll_wait
Lennart Poettering [Wed, 20 Nov 2013 17:19:05 +0000 (18:19 +0100)]
event: don't disarm invalid timerfd
Lennart Poettering [Wed, 20 Nov 2013 17:18:09 +0000 (18:18 +0100)]
bus: make sure an additional ref to a busevent source doesn't cause the event source to be triggered again
Lennart Poettering [Wed, 20 Nov 2013 17:07:07 +0000 (18:07 +0100)]
event: whenever a time source changes pending state reshuffle elapsation prioqs
Lennart Poettering [Wed, 20 Nov 2013 15:39:22 +0000 (16:39 +0100)]
event: when we change the io events to watch we need to figure out if a an event is pending again
Lennart Poettering [Wed, 20 Nov 2013 02:58:05 +0000 (03:58 +0100)]
sd-event: fix comparison functions
Lennart Poettering [Wed, 20 Nov 2013 02:44:11 +0000 (03:44 +0100)]
manager: don't do plymouth in a container
Given that plymouth listens on an abstract namespace socket and if
CLONE_NEWNET is not used the abstract namespace is shared with the host
we might actually end up send plymouth data to the host.
Lennart Poettering [Tue, 19 Nov 2013 20:37:32 +0000 (21:37 +0100)]
busctl: when no match is specified, add default match
Lennart Poettering [Tue, 19 Nov 2013 20:35:31 +0000 (21:35 +0100)]
bus: add color and indentation to bus_message_dump()
Lennart Poettering [Tue, 19 Nov 2013 20:12:59 +0000 (21:12 +0100)]
core: convert PID 1 to libsystemd-bus
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.
This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:
- Synthesizing of "Disconnected" messages when bus connections are
severed.
- Support for attaching multiple vtables for the same interface on the
same path.
This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.
As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information.
Lennart Poettering [Tue, 19 Nov 2013 20:02:59 +0000 (21:02 +0100)]
hashmap: be a bit more conservative with pre-allocating hash tables and items
Lennart Poettering [Tue, 19 Nov 2013 20:02:16 +0000 (21:02 +0100)]
install: when determining where default.target points to, accept a file instead of a symlink, too
Lennart Poettering [Tue, 19 Nov 2013 20:01:24 +0000 (21:01 +0100)]
test: exit early if we would conflict with running user systemd
Lennart Poettering [Tue, 19 Nov 2013 00:23:08 +0000 (01:23 +0100)]
bus: add sd_bus_send_to() API call
Lennart Poettering [Tue, 19 Nov 2013 00:21:27 +0000 (01:21 +0100)]
bus: bump serial number counter when sending already sealed messages
Lennart Poettering [Tue, 19 Nov 2013 00:19:02 +0000 (01:19 +0100)]
bus: sd_bus_error_setxyz calls should always return the error as errno style negative int
Lennart Poettering [Tue, 19 Nov 2013 00:15:31 +0000 (01:15 +0100)]
libudev: always return NULL in _unref() APIs
Returning anything else but NULL would suggest the caller's reference
might still be valid, but it isn't, because the caller just invoked
_unref() after all.
This turns the return value into a typesafe shortcut that allows
unreffing and resetting a reference in one line. In contrast to
solutions for this which take a pointer to a pointer to accomplish the
same this solution is just syntactic sugar the developer can make use of
but doesn't have to, and this is particularly useful when immediately
unreffing objects returned by function calls.
Lennart Poettering [Tue, 19 Nov 2013 00:14:21 +0000 (01:14 +0100)]
libudev: always return valid negative error codes on API functions
Lennart Poettering [Tue, 19 Nov 2013 00:13:42 +0000 (01:13 +0100)]
calendar: support 'yearly' and 'annually' names the same way as cron
Lennart Poettering [Tue, 19 Nov 2013 00:12:03 +0000 (01:12 +0100)]
hwclock: modernizations
Lennart Poettering [Tue, 19 Nov 2013 00:10:40 +0000 (01:10 +0100)]
macro: add _unlikely_() to assert_return()
As the name indicates assert_return() is really just for assertions,
i.e. where it's a programming error if the assertion does not hold.
Hence it is safe to add _unlikely_() decorators for the expression to
check.
Lennart Poettering [Tue, 19 Nov 2013 00:10:22 +0000 (01:10 +0100)]
macro: change assert_cc() so that it can appear outside of functions
Lennart Poettering [Tue, 19 Nov 2013 00:09:48 +0000 (01:09 +0100)]
include: make direct includion of _sd-common.h harder
Lennart Poettering [Tue, 19 Nov 2013 00:09:12 +0000 (01:09 +0100)]
install: use const where we can
Tom Gundersen [Wed, 20 Nov 2013 16:51:42 +0000 (17:51 +0100)]
conf-parser: don't leak section names
If we encounter an unknown section, we must free the previous section before
clearing the pointer.
David Herrmann [Wed, 20 Nov 2013 06:54:24 +0000 (07:54 +0100)]
event: clear pending-state when re-arming timers
If a timer fires and is marked pending, but an application re-arms it
before it is dispatched, we now clear the pending state.
This fixes a bug where an application arms a timer, which fires and is
marked pending. But before it is dispatched, the application loses
interest in it and disables it. Now if the timer is re-armed and
re-enabled later, it will be immediately dispatched as it is still marked
pending.
This behavior is unexpected, so avoid it by clearing pending state when
re-arming timers. Note that applications have no way to clear pending
state themselves, so there's no current workaround.
David Herrmann [Wed, 20 Nov 2013 15:18:37 +0000 (16:18 +0100)]
bus: fix error-path in bus_map_all_properties()
We shouldn't return positive integers on errors. Fix the typo by removing
the negation.
Thomas Hindoe Paaboel Andersen [Tue, 19 Nov 2013 20:12:38 +0000 (21:12 +0100)]
bus/rtnl: silence clang warnings
Tom Gundersen [Mon, 18 Nov 2013 10:54:09 +0000 (11:54 +0100)]
networkd: make sure Links and Networks are freed
Jose Ignacio Naranjo [Sun, 17 Nov 2013 20:11:34 +0000 (21:11 +0100)]
keymap: Add Toshiba Satellite U940
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Zbigniew Jędrzejewski-Szmek [Mon, 18 Nov 2013 18:42:57 +0000 (13:42 -0500)]
localed: match converted keymaps before legacy
Before, X11 keymap fr-pc105-oss would be converted to fr,
even though fr-oss exists. Now, if
/usr/lib/kbd/keymaps/xkb/<layout>[-<variant>].map[.gz] exists,
<layout>[-<variant>] will be used as the console keymap,
falling back to the legacy mappings otherwise.
% sudo localectl set-x11-keymap pl pc105
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: pl (was pl2 before)
X11 Layout: pl
X11 Model: pc105
% sudo localectl set-x11-keymap fr pc105 oss
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: fr-oss (was fr before)
X11 Layout: fr
X11 Model: pc105
X11 Variant: oss
% sudo localectl set-x11-keymap fr pc105
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: fr
X11 Layout: fr
X11 Model: pc105
% sudo localectl set-x11-keymap gb
% localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: gb (was uk before)
X11 Layout: gb
Zbigniew Jędrzejewski-Szmek [Mon, 18 Nov 2013 15:19:29 +0000 (10:19 -0500)]
localed: use _cleanup_
Karel Zak [Mon, 18 Nov 2013 13:48:16 +0000 (14:48 +0100)]
Remove duplicate includes
Shawn Landden [Mon, 18 Nov 2013 15:58:43 +0000 (07:58 -0800)]
use #pragma once instead of foo*foo define guards
Thomas Hindoe Paaboel Andersen [Mon, 18 Nov 2013 21:57:56 +0000 (22:57 +0100)]
remove unused variables
Kay Sievers [Mon, 18 Nov 2013 00:30:57 +0000 (01:30 +0100)]
bus: TIMESTAMP is optional kdbus metadata now, NAMES are always added
Shawn Landden [Sat, 16 Nov 2013 21:18:13 +0000 (13:18 -0800)]
core/socket: fix SO_REUSEPORT
Shawn Landden [Sat, 16 Nov 2013 21:18:12 +0000 (13:18 -0800)]
core/socket: use _cleanup_free_
Tom Gundersen [Thu, 14 Nov 2013 15:22:51 +0000 (16:22 +0100)]
networkd: make all calls async
Tom Gundersen [Sun, 17 Nov 2013 20:01:20 +0000 (21:01 +0100)]
networkd: store netmask and mac address explicitly
Kay Sievers [Sun, 17 Nov 2013 21:35:58 +0000 (22:35 +0100)]
bus: CREDS and NAMES are optional kdbus metadata now
Sylvain Plantefeve [Sun, 17 Nov 2013 16:22:14 +0000 (11:22 -0500)]
catalog: add French translation
Zbigniew Jędrzejewski-Szmek [Sat, 16 Nov 2013 22:29:28 +0000 (17:29 -0500)]
tmpfiles: adjust excludes for the new per-service private dirs
In
d8c9d3a (systemd: use unit name in PrivateTmp directories)
I forgot to update the tmpfiles config.
Olivier Brunel [Thu, 14 Nov 2013 14:52:54 +0000 (15:52 +0100)]
Fix RemainAfterExit services keeping a hold on console
When a service exits succesfully and has RemainAfterExit set, its hold
on the console (in m->n_on_console) wasn't released since the unit state
didn't change.
Sylvain Plantefeve [Sat, 16 Nov 2013 16:56:14 +0000 (11:56 -0500)]
po: add French translation
Zbigniew Jędrzejewski-Szmek [Sat, 16 Nov 2013 00:00:01 +0000 (19:00 -0500)]
bash-completion: journalctl --file
Zbigniew Jędrzejewski-Szmek [Wed, 13 Nov 2013 03:05:16 +0000 (22:05 -0500)]
random-seed: improve debugging messages a bit
Zbigniew Jędrzejewski-Szmek [Wed, 13 Nov 2013 03:01:10 +0000 (22:01 -0500)]
fstab-generator: use RequiresOverridable for fsck units
This allows the user to disable fsck's by masking.
If fsck fails, emergency target is started, the user might mount the
unit using mount and disable fsck by masking the unit. In this case,
.mount will be active because the mount is detect through
/proc/self/mountinfo, but systemd-fsck@.service will still be in
failed mode. This results in a funny situation where
$ systemctl show -p ActiveState local-fs.target yyy.mount
ActiveState=active
ActiveState=active
$ sudo systemctl start local-fs.target
[sudo] password for test:
Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2013 23:54:10 +0000 (19:54 -0400)]
core: some more _cleanup_free_
Zbigniew Jędrzejewski-Szmek [Tue, 12 Nov 2013 05:53:59 +0000 (00:53 -0500)]
fsck,fstab-generator: be lenient about missing fsck.<type>
If fstab contains 1 for passno, treat this as an error, but only warn
briefly. If fstab doesn't contain this information, don't complain at
all.
Patch is complicated a bit by the fact that we might have the fstype specified
in fstab or on /proc/cmdline, in which case we can check if we have the appropriate
fsck tool, or not specified, or specified as auto, in which case we have to look
and check the type of the filesystem ourselves. It cannot be done before the
device appears, so it is too early in the generator phase, and it must be done
directly in fsck service.
Zbigniew Jędrzejewski-Szmek [Tue, 12 Nov 2013 04:32:31 +0000 (23:32 -0500)]
fsck: modernization
Dave Reisner [Sat, 16 Nov 2013 03:44:15 +0000 (22:44 -0500)]
ycm_extra_conf: include src/systemd for headers
Dave Reisner [Sat, 16 Nov 2013 03:38:12 +0000 (22:38 -0500)]
build: use printf to generate symbol tests
echo is basically unportable, so use printf instead.
Tom Gundersen [Fri, 15 Nov 2013 12:47:12 +0000 (13:47 +0100)]
build-sys: don't mix dynamic and static libs
Tom Gundersen [Thu, 14 Nov 2013 18:23:39 +0000 (19:23 +0100)]
rtnl: add event loop integration
Tom Gundersen [Thu, 14 Nov 2013 21:19:19 +0000 (22:19 +0100)]
bus: typo
Fix a couple of 'void' that should have been 'sd_bus'.
Tom Gundersen [Tue, 29 Oct 2013 22:50:07 +0000 (23:50 +0100)]
loopback-setup: move to rtnl
This should be equivalent to the old behavior.
Tom Gundersen [Wed, 13 Nov 2013 22:18:20 +0000 (23:18 +0100)]
rtnl: add call_async and call_async_cancel
They work in the same way as the sd-bus equivalents.
Zbigniew Jędrzejewski-Szmek [Thu, 14 Nov 2013 05:08:36 +0000 (00:08 -0500)]
Update TODO
Olivier Brunel [Fri, 20 Sep 2013 20:18:30 +0000 (22:18 +0200)]
Fix possible lack of status messages on shutdown/reboot
Since
31a7eb86 the output on console can be disabled to avoid colliding with
gettys. However, it could also lead to a lack of messages during
shutdown/reboot.
Olivier Brunel [Fri, 20 Sep 2013 20:18:29 +0000 (22:18 +0200)]
Only disable output on console during boot if needed
If there are no more jobs on console, no need/we shouldn't disable output.
Olivier Brunel [Fri, 20 Sep 2013 20:18:28 +0000 (22:18 +0200)]
Resolve /dev/console to the active tty instead of just "tty0"
When resolving /dev/console one would often get "tty0" meaning the active VT.
Resolving to the actual tty (e.g. "tty1") will notably help on boot when
determining whether or not PID1 can output to the console.
Marko Myllynen [Thu, 14 Nov 2013 04:02:23 +0000 (23:02 -0500)]
zsh-completion: add bootctl
Marko Myllynen [Wed, 13 Nov 2013 09:06:13 +0000 (11:06 +0200)]
man: add bootctl(8)
https://bugzilla.redhat.com/show_bug.cgi?id=
1014303