chiark / gitweb /
Lennart Poettering [Sun, 14 Apr 2013 15:45:26 +0000 (17:45 +0200)]
bus: fix counting of argN= matches
Lennart Poettering [Sun, 14 Apr 2013 15:43:59 +0000 (17:43 +0200)]
util: introduce alloca0() and use it at a number of places
Kay Sievers [Sun, 14 Apr 2013 14:28:34 +0000 (16:28 +0200)]
bus: zero data structure and catch up with error value change
Lennart Poettering [Sun, 14 Apr 2013 01:20:12 +0000 (03:20 +0200)]
kdbus: also parse cmdline message attribute
Lennart Poettering [Sun, 14 Apr 2013 01:19:51 +0000 (03:19 +0200)]
kdbus: make name acquirement ioctls valgrind clean
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 01:02:03 +0000 (21:02 -0400)]
Include <fcntl.h> instead of <sys/fcntl.h>
<fcntl.h> is POSIX. On Linux, <sys/fcntl.h> simply includes
<fcntl.h>, so there should be on difference. On Android
likewise, except that there is some more stuff. QNX has
only <fcntl.h>.
https://bugs.freedesktop.org/show_bug.cgi?id=63423
Zbigniew Jędrzejewski-Szmek [Sun, 14 Apr 2013 00:22:53 +0000 (20:22 -0400)]
fileio: in envfiles, do not skip lines following empty lines
https://bugs.freedesktop.org/show_bug.cgi?id=63477
Zbigniew Jędrzejewski-Szmek [Fri, 12 Apr 2013 23:19:48 +0000 (19:19 -0400)]
Remove a few NULLs
Just {} is used in a lot of places now, and there's nothing
special abose those few.
Lennart Poettering [Sat, 13 Apr 2013 19:53:11 +0000 (21:53 +0200)]
kdbus: parse even more kernel meta data fields
Lennart Poettering [Sat, 13 Apr 2013 18:12:27 +0000 (20:12 +0200)]
kdbus: update to newest kdbus API
Mirco Tischler [Fri, 12 Apr 2013 23:03:49 +0000 (01:03 +0200)]
journal: fix broken tags _SOURCE_REALTIME_TIMESTAMP and _MACHINE_ID
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 22:59:18 +0000 (18:59 -0400)]
systemctl: new verb 'list-sockets'
LISTEN UNIT ACTIVATES
/dev/initctl systemd-initctl.socket systemd-initctl.service
/dev/log systemd-journald.socket systemd-journald.service
...
[::]:19531 systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
17 sockets listed.
Pass --all to see loaded but inactive sockets, too.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 22:58:45 +0000 (18:58 -0400)]
util: add wrapper for realloc to avoid specyfing type
Lennart Poettering [Fri, 12 Apr 2013 20:51:23 +0000 (22:51 +0200)]
kdbus: make our little test pass cleanly again
Lennart Poettering [Fri, 12 Apr 2013 20:48:34 +0000 (22:48 +0200)]
kbdus: add null bloom filter to our messages
This makes things work again with the requirements of the kernel on
bloom filters.
Lennart Poettering [Fri, 12 Apr 2013 19:45:14 +0000 (21:45 +0200)]
kdbus: use a valid service name for testing
Lennart Poettering [Fri, 12 Apr 2013 19:44:55 +0000 (21:44 +0200)]
kdbus: update kdbus.h from upstream
Lennart Poettering [Fri, 12 Apr 2013 19:44:14 +0000 (21:44 +0200)]
kdbus: make sure msg structure is properly initialized
Lennart Poettering [Fri, 12 Apr 2013 19:43:50 +0000 (21:43 +0200)]
bus: don't calculate kmsg message too large
Lennart Poettering [Fri, 12 Apr 2013 18:17:15 +0000 (20:17 +0200)]
bus: add kdbus test for name registry
Lennart Poettering [Fri, 12 Apr 2013 18:17:00 +0000 (20:17 +0200)]
dbus: fill in kdbus sender+destination from kdbus data
Kay Sievers [Fri, 12 Apr 2013 19:04:02 +0000 (21:04 +0200)]
bus: rename KDBUS_CMD_FNAME_POLICY_NONE -> KDBUS_CMD_FNAME_POLICY_OPEN
Kay Sievers [Fri, 12 Apr 2013 18:32:19 +0000 (20:32 +0200)]
bus: test - re-enable check for returned error
Kay Sievers [Fri, 12 Apr 2013 18:08:28 +0000 (20:08 +0200)]
bus: align the buffer we pass to the kernel
Kay Sievers [Fri, 12 Apr 2013 14:45:37 +0000 (16:45 +0200)]
bus: create kdbus bus without an active policy
Lennart Poettering [Fri, 12 Apr 2013 01:08:14 +0000 (03:08 +0200)]
bus: implement basic name registration with kdbus
Tom Gundersen [Thu, 11 Apr 2013 19:14:40 +0000 (21:14 +0200)]
tmpfiles: create static device nodes before udev is started
Since v183, the contents of /usr/lib/udev/devices is no longer copied to /dev
on boot, rather systemd-tmpfiles should be used instead. However, as
systemd-tmpfiles --create is only ran long after udevd has been started, it is
no longer possible to use udev rules to assign permissions to the static nodes.
This calls systemd-tmpfiles --create early, before udev is started, and
restricts the call to /dev, which is known to be mounted already.
In the future, this could also take over the creation of static device nodes
from systemd-udevd.
Lennart Poettering [Fri, 12 Apr 2013 00:24:28 +0000 (02:24 +0200)]
bus: be nice to people who don't have kdbus in their kernels
Lennart Poettering [Fri, 12 Apr 2013 00:21:57 +0000 (02:21 +0200)]
bus: make sure things still compile fine without valgrind's headers installed
Lennart Poettering [Fri, 12 Apr 2013 00:19:26 +0000 (02:19 +0200)]
bus: make the kdbus code valgrind clean
Lennart Poettering [Thu, 11 Apr 2013 23:57:53 +0000 (01:57 +0200)]
bus: parse and expose kdbus message timestamps
Lennart Poettering [Thu, 11 Apr 2013 23:49:52 +0000 (01:49 +0200)]
bus: also parse PID starttime out of kdbus message
Lennart Poettering [Thu, 11 Apr 2013 23:45:18 +0000 (01:45 +0200)]
bus: parse uid/gid/pid/tid meta data from kdbus messages
Lennart Poettering [Thu, 11 Apr 2013 23:16:40 +0000 (01:16 +0200)]
bus: make kdbus work so that we can exchange real messages
We have ignition, we have tremendous fire!
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 23:02:37 +0000 (19:02 -0400)]
hwclock: use _cleanup_ to simplify function
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 22:57:42 +0000 (18:57 -0400)]
errno is positive
Make sure we compare errno against positive error codes.
The ones in hwclock.c and install.c can have an impact, the
rest are unlikely to be hit or in code that isn't widely
used.
Also check that errno > 0, to help gcc know that we are
returning a negative error code.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 22:11:47 +0000 (18:11 -0400)]
systemctl: show the name of failing unit in red
It makes it easier to pick out problematic unit
names from a long list.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Apr 2013 02:40:58 +0000 (22:40 -0400)]
systemctl: allow multiple arguments to --type
This mirrors --property, and is generally useful.
New functionality is used in bash completion.
In case of zsh completion, new functionality is less useful
because of caching. Nevertheless, zsh completion for restart
is made to behave more-or-less the same as bash completion.
At least sockets can be restarted.
Lennart Poettering [Thu, 11 Apr 2013 22:43:57 +0000 (00:43 +0200)]
bus: fix formatting of bus address
Lennart Poettering [Thu, 11 Apr 2013 22:43:42 +0000 (00:43 +0200)]
bus: fix kdbus ioctl invocation
Lennart Poettering [Thu, 11 Apr 2013 22:43:29 +0000 (00:43 +0200)]
bus: properly check if kdbus connection worked
Lennart Poettering [Thu, 11 Apr 2013 22:43:12 +0000 (00:43 +0200)]
bus: fill in unique name when using kdbus
Lennart Poettering [Thu, 11 Apr 2013 22:26:12 +0000 (00:26 +0200)]
bus: add kdbus test case
Lennart Poettering [Thu, 11 Apr 2013 21:09:29 +0000 (23:09 +0200)]
bus: basic implementation of kdbus client side
Lennart Poettering [Thu, 11 Apr 2013 00:09:53 +0000 (02:09 +0200)]
update TODO
Lennart Poettering [Thu, 11 Apr 2013 00:09:36 +0000 (02:09 +0200)]
bus: calculate iovec for messages only when we need it
Lennart Poettering [Thu, 11 Apr 2013 00:07:14 +0000 (02:07 +0200)]
macro: make sure ALIGN() can be calculated constant by the compiler
If we pass a constant value to ALIGN() gcc should have the chance to
calculate the value during compilation rather than runtime, so let's
avoid a static inline call if we can.
Kay Sievers [Thu, 11 Apr 2013 17:56:34 +0000 (19:56 +0200)]
TODO: update
Zbigniew Jędrzejewski-Szmek [Wed, 10 Apr 2013 23:31:58 +0000 (19:31 -0400)]
shell-completion: show failed units as candidates for start
Also show disabled units as candidates for reenable,
since it works and one may want to do enable-or-reenable
in one line.
Zbigniew Jędrzejewski-Szmek [Wed, 10 Apr 2013 23:06:00 +0000 (19:06 -0400)]
shell-completion: replace printf with echo
It is faster to use a bash built-in, then to invoke an external
program. The problem of unit names starting with a dash is solved
by prepending a space. Spaces are ignored anyway.
For zsh, replace echo "$unit", which is vulnerable to dashes,
with echo " $unit".
Zbigniew Jędrzejewski-Szmek [Wed, 10 Apr 2013 22:30:19 +0000 (18:30 -0400)]
systemctl: ellipsize job list only when necessary, highlight running
I was debugging systemd waiting on a missing disk, and noticed
that the job listing could use some polishing. Jobs that are
actually running are highlighted, so it's easier to see what
very actually waiting for.
Also, the needed widths are precalculated, to use available columns
more ecomically.
Zbigniew Jędrzejewski-Szmek [Wed, 10 Apr 2013 22:58:44 +0000 (18:58 -0400)]
udev/ata_id: use initalization instead of explicit zeroing
Lukas Nykryn [Wed, 10 Apr 2013 10:54:02 +0000 (12:54 +0200)]
libsystemd-bus: initalize handle_cmsg to false
Lukas Nykryn [Wed, 10 Apr 2013 10:54:00 +0000 (12:54 +0200)]
tty-ask-password-agent: free passwords
Lukas Nykryn [Wed, 10 Apr 2013 10:53:58 +0000 (12:53 +0200)]
journalctl: check return of strjoin
Zbigniew Jędrzejewski-Szmek [Sat, 6 Apr 2013 02:24:10 +0000 (22:24 -0400)]
Use initalization instead of explicit zeroing in more places
Lennart Poettering [Wed, 10 Apr 2013 21:21:53 +0000 (23:21 +0200)]
localctl: skip locale entries with non-UTF8 names
glibc should place these in the locale archive. For now, let's just skip
them from our output, since they are aliases anyway.
https://bugs.freedesktop.org/show_bug.cgi?id=63389
Lennart Poettering [Wed, 10 Apr 2013 21:04:20 +0000 (23:04 +0200)]
bus: when we unmarshal an fd it should stay owned by the message object
If the user wants the fd to stay valid he should keep a reference to the
message object or duplicate the fd.
This unifies behaviour of demarshalling data fields and unix fds.
Fedora systemd team [Wed, 10 Apr 2013 07:49:24 +0000 (09:49 +0200)]
logind: avoid creating stale session state files
There were old session state files accumulating in /run/systemd/session.
They confused e.g. "reboot", which thought there were still users logged
in. The files got created like this:
session_stop(Session *s) ->
...
unlink(s->state_file);
...
seat_set_active(s->seat, NULL) ->
session_save(...); /* re-creates the state file we just
unlinked */
Fix it simply by clearing the s->started flag earlier to prevent
any further writes of the state file (session_save() checks the flag).
Lennart Poettering [Tue, 9 Apr 2013 20:20:05 +0000 (22:20 +0200)]
update TODO
Lennart Poettering [Tue, 9 Apr 2013 20:18:16 +0000 (22:18 +0200)]
logind: introduce an explicit session class for cronjobs and similar
cronjobs are neither interactive user session, nor lock screens, nor
login screens, hence they should get their own class.
Lennart Poettering [Tue, 9 Apr 2013 19:31:16 +0000 (21:31 +0200)]
update TODO
Lennart Poettering [Tue, 9 Apr 2013 19:28:11 +0000 (21:28 +0200)]
bus: also remove recursive invocation of message_append_ap()
Lennart Poettering [Tue, 9 Apr 2013 19:03:12 +0000 (21:03 +0200)]
bus: implement message_read_ap() non-recursively
As it turns out if you pass a va_list to a function its state becomes
undefined after that function returns, and this actually does break on
x86-32.
Hence, let's reimplement message_read_ap() without the use of recursion.
Instead we now build our own stack of types in an array so that we can
decode the entire parameter list in a single stackframe.
Lennart Poettering [Tue, 9 Apr 2013 17:05:49 +0000 (19:05 +0200)]
units: fix some left-over mentions of remote-fs-setup.target
Lennart Poettering [Tue, 9 Apr 2013 16:29:24 +0000 (18:29 +0200)]
shutdown: print a nice message before returning to initrd
Martin Pitt [Tue, 9 Apr 2013 13:44:41 +0000 (15:44 +0200)]
keymap: Fix typo in previous commit
Pali Rohar [Tue, 9 Apr 2013 13:32:22 +0000 (15:32 +0200)]
keymap: Add HP EliteBook 8460p
Taken from
https://code.launchpad.net/~pali/ubuntu/raring/udev/hp-elitebook-8460p/+merge/157420
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Michael Biebl [Tue, 9 Apr 2013 13:26:39 +0000 (15:26 +0200)]
libudev: Move -lrt to Libs.private
It's only needed for static linking.
https://bugs.freedesktop.org/show_bug.cgi?id=63309
Lennart Poettering [Mon, 8 Apr 2013 20:43:52 +0000 (22:43 +0200)]
machine-id: fix missing initialization
Lennart Poettering [Mon, 8 Apr 2013 20:24:19 +0000 (22:24 +0200)]
build-sys: prepare 201
Lennart Poettering [Mon, 8 Apr 2013 19:22:14 +0000 (21:22 +0200)]
shutdown: print a message when storage is finalized
Lennart Poettering [Mon, 8 Apr 2013 18:32:03 +0000 (20:32 +0200)]
journald: bring max coredump size in sync with max entry size
Lennart Poettering [Mon, 8 Apr 2013 18:29:52 +0000 (20:29 +0200)]
update TODO
Lennart Poettering [Mon, 8 Apr 2013 17:42:58 +0000 (19:42 +0200)]
cgroup: clean-ups
Lennart Poettering [Mon, 8 Apr 2013 17:42:48 +0000 (19:42 +0200)]
analyze: various cleanups
Lennart Poettering [Mon, 8 Apr 2013 17:42:29 +0000 (19:42 +0200)]
analyze: fix OOM handling + fix memory leak
Lennart Poettering [Mon, 8 Apr 2013 17:42:02 +0000 (19:42 +0200)]
analyze: add missing --help text entries
Lennart Poettering [Mon, 8 Apr 2013 17:11:05 +0000 (19:11 +0200)]
man: be clearer that it's not OK to manipulate systemd's own cgroup hirearchy
Łukasz Stelmach [Sat, 6 Apr 2013 13:40:56 +0000 (15:40 +0200)]
systemd-analyze: filter dot output
Make "systemd-analyze dot" output only lines with units matching
given glob(7) patterns. Add --from-pattern and --to-pattern options.
Without any patterns all relationships are printed as before.
A relationship must match the follwing expression:
(isempty(from) || from[0] || from[1] || .. || from[n]) &&
(isempty(to) || to[0] || to[1] || .. || to[n]) &&
(isempty(P) || P[0] || P[1] || ... || P[n])
where from[] and to[] are lists of patterns provided with subsequent
--from-pattern and --to-pattern respectively. P[] is a list of additional
patterns provided after the "dot" subcommand.
Harald Hoyer [Mon, 8 Apr 2013 17:59:20 +0000 (19:59 +0200)]
udev/udev-ctrl.c:udev_ctrl_new_from_fd() enable SO_PASSCRED
Avoid "sender uid=65534, message ignored" case, where no credentials can
be read on the sender side.
Seems, the server socket does not enable credential receiving fast
enough, and the message from the client (without credential) sometimes
is queued before the credential passing was active.
Ronny Chevalier [Mon, 8 Apr 2013 16:22:44 +0000 (18:22 +0200)]
dbus-manager: fix variable type introspection
Lennart Poettering [Mon, 8 Apr 2013 16:22:47 +0000 (18:22 +0200)]
cgroup: always keep access mode of 'tasks' and 'cgroup.procs' files in cgroup directories in sync
Marc-Antoine Perennou [Tue, 26 Mar 2013 17:11:31 +0000 (18:11 +0100)]
kernel-install: don't make unused parameter mandatory
We only use the image name in the case we're adding a kernel
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Kay Sievers [Mon, 8 Apr 2013 14:52:20 +0000 (16:52 +0200)]
TODO: update
Lennart Poettering [Mon, 8 Apr 2013 13:48:12 +0000 (15:48 +0200)]
journald: no need to free audit vars
Lennart Poettering [Mon, 8 Apr 2013 13:46:32 +0000 (15:46 +0200)]
journald: drop two more memory allocations
Lennart Poettering [Mon, 8 Apr 2013 13:38:27 +0000 (15:38 +0200)]
journald: get rid of one more memory allocation
Holger Hans Peter Freyther [Sat, 6 Apr 2013 08:20:35 +0000 (10:20 +0200)]
journald: Do not dynamically allocate _UID/_GID/_PID strings
Avoid the dynamic allocation for the _UID, _GID, and _PID strings.
The maximum size of the string can be determined at compile time.
The code has only been compile tested.
Holger Hans Peter Freyther [Sat, 6 Apr 2013 08:20:34 +0000 (10:20 +0200)]
journald: Do not always record _AUDIT_SESSION and _AUDIT_LOGINUID
When systemd was compiled without audit support, do not collect the
audit session and loginuid in the journal. This is saving a couple of
syscalls and memory allocations per log message.
Holger Hans Peter Freyther [Sat, 6 Apr 2013 08:05:59 +0000 (10:05 +0200)]
util: Avoid memory allocations for formatting paths
Avoid memory allocations to construct the path for files in the
procfs. The procfs paths are way shorter than the PATH_MAX so we
can use snprintf on a string located on the stack. This shows up
as a win on x86 using the benchmark program below.
$ make libsystemd-shared.la; gcc -O2 -Isrc/systemd/ -Isrc/ \
-o simple-perf-test simple-perf-test.c \
.libs/libsystemd-shared.a -lrt
#include "shared/util.h"
void test_once(void) {
pid_t pid = getpid();
char *tmp = NULL;
get_process_comm(pid, &tmp);
free(tmp);
tmp = NULL;
get_process_cmdline(pid, 0, 1, &tmp);
free(tmp);
is_kernel_thread(pid);
tmp = NULL;
get_process_exe(pid, &tmp);
free(tmp);
}
int main(int argc, char **argv)
{
int i;
for (i = 0; i < 50000; ++i)
test_once();
}
Lennart Poettering [Mon, 8 Apr 2013 13:23:43 +0000 (15:23 +0200)]
update TODO
Lennart Poettering [Mon, 8 Apr 2013 13:23:12 +0000 (15:23 +0200)]
cgtop: print absolute CPU times with format_timespan
Harald Hoyer [Mon, 8 Apr 2013 12:05:24 +0000 (14:05 +0200)]
Do not serialize environment, when switching root
When switching root, i.e. LANG can be set to the locale of the initramfs
or "C", if it was unset. When systemd deserializes LANG in the real root
this would overwrite the setting previously gathered by locale_set().
To reproduce, boot with an initramfs without locale.conf or change
/etc/locale.conf to a different language than the initramfs and check a
daemon started by systemd:
$ tr "$\000" '\n' </proc/$(pidof sshd)/environ | grep LANG
LANG=C
To prevent that, serialization of environment variables is skipped, when
serializing for switching root.
https://bugzilla.redhat.com/show_bug.cgi?id=949525
Simon McVittie [Fri, 5 Apr 2013 12:35:22 +0000 (13:35 +0100)]
sd-daemon.c: allow use of -lrt to be avoided
In recent glibc, many commonly-used librt functions have moved
from librt to libc. This results in dbus' configure.ac
concluding that we don't need to link in librt. However,
sd-daemon.c needs it for mq_getattr(), causing the build
to fail.
dbus doesn't use POSIX message queues, so I'd prefer to be
able to avoid "if on Linux, link librt for sd-daemon.c".
Marius Vollmer [Mon, 8 Apr 2013 08:19:44 +0000 (11:19 +0300)]
journal: Fix typo
This would break backwards skipping.
https://bugs.freedesktop.org/show_bug.cgi?id=63250
Steven Hiscocks [Sat, 6 Apr 2013 22:46:44 +0000 (18:46 -0400)]
systemd-python: fix wait bug
Kay Sievers [Sat, 6 Apr 2013 00:56:04 +0000 (02:56 +0200)]
dbus-loop.c: fix variable initialization
Fix for:
b92bea5d2a9481de69bb627a7b442a9f58fca43d
Causing:
systemd-logind[265]: Assertion 'd = event.data.ptr' failed at src/shared/dbus-loop.c:233, function bus_loop_dispatch(). Aborting.
Zbigniew Jędrzejewski-Szmek [Mon, 25 Mar 2013 01:06:27 +0000 (21:06 -0400)]
Use _cleanup_ when reading config files
Zbigniew Jędrzejewski-Szmek [Sun, 24 Mar 2013 23:09:19 +0000 (19:09 -0400)]
Add _cleanup_globfree_
Fixes a memleak in error path in exec_context_load_environment.