chiark / gitweb /
elogind.git
7 years agobus: fix kdbus ioctl invocation
Lennart Poettering [Thu, 11 Apr 2013 22:43:42 +0000 (00:43 +0200)]
bus: fix kdbus ioctl invocation

7 years agobus: properly check if kdbus connection worked
Lennart Poettering [Thu, 11 Apr 2013 22:43:29 +0000 (00:43 +0200)]
bus: properly check if kdbus connection worked

7 years agobus: fill in unique name when using kdbus
Lennart Poettering [Thu, 11 Apr 2013 22:43:12 +0000 (00:43 +0200)]
bus: fill in unique name when using kdbus

7 years agobus: add kdbus test case
Lennart Poettering [Thu, 11 Apr 2013 22:26:12 +0000 (00:26 +0200)]
bus: add kdbus test case

7 years agobus: basic implementation of kdbus client side
Lennart Poettering [Thu, 11 Apr 2013 21:09:29 +0000 (23:09 +0200)]
bus: basic implementation of kdbus client side

7 years agoupdate TODO
Lennart Poettering [Thu, 11 Apr 2013 00:09:53 +0000 (02:09 +0200)]
update TODO

7 years agobus: calculate iovec for messages only when we need it
Lennart Poettering [Thu, 11 Apr 2013 00:09:36 +0000 (02:09 +0200)]
bus: calculate iovec for messages only when we need it

7 years agomacro: make sure ALIGN() can be calculated constant by the compiler
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.

7 years agoTODO: update
Kay Sievers [Thu, 11 Apr 2013 17:56:34 +0000 (19:56 +0200)]
TODO: update

7 years agoshell-completion: show failed units as candidates for start
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.

7 years agoshell-completion: replace printf with echo
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".

7 years agosystemctl: ellipsize job list only when necessary, highlight running
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.

7 years agoudev/ata_id: use initalization instead of explicit zeroing
Zbigniew Jędrzejewski-Szmek [Wed, 10 Apr 2013 22:58:44 +0000 (18:58 -0400)]
udev/ata_id: use initalization instead of explicit zeroing

7 years agolibsystemd-bus: initalize handle_cmsg to false
Lukas Nykryn [Wed, 10 Apr 2013 10:54:02 +0000 (12:54 +0200)]
libsystemd-bus: initalize handle_cmsg to false

7 years agotty-ask-password-agent: free passwords
Lukas Nykryn [Wed, 10 Apr 2013 10:54:00 +0000 (12:54 +0200)]
tty-ask-password-agent: free passwords

7 years agojournalctl: check return of strjoin
Lukas Nykryn [Wed, 10 Apr 2013 10:53:58 +0000 (12:53 +0200)]
journalctl: check return of strjoin

7 years agoUse initalization instead of explicit zeroing in more places
Zbigniew Jędrzejewski-Szmek [Sat, 6 Apr 2013 02:24:10 +0000 (22:24 -0400)]
Use initalization instead of explicit zeroing in more places

7 years agolocalctl: skip locale entries with non-UTF8 names
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

7 years agobus: when we unmarshal an fd it should stay owned by the message object
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.

7 years agologind: avoid creating stale session state files
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).

7 years agoupdate TODO
Lennart Poettering [Tue, 9 Apr 2013 20:20:05 +0000 (22:20 +0200)]
update TODO

7 years agologind: introduce an explicit session class for cronjobs and similar
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.

7 years agoupdate TODO
Lennart Poettering [Tue, 9 Apr 2013 19:31:16 +0000 (21:31 +0200)]
update TODO

7 years agobus: also remove recursive invocation of message_append_ap()
Lennart Poettering [Tue, 9 Apr 2013 19:28:11 +0000 (21:28 +0200)]
bus: also remove recursive invocation of message_append_ap()

7 years agobus: implement message_read_ap() non-recursively
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.

7 years agounits: fix some left-over mentions of remote-fs-setup.target
Lennart Poettering [Tue, 9 Apr 2013 17:05:49 +0000 (19:05 +0200)]
units: fix some left-over mentions of remote-fs-setup.target

7 years agoshutdown: print a nice message before returning to initrd
Lennart Poettering [Tue, 9 Apr 2013 16:29:24 +0000 (18:29 +0200)]
shutdown: print a nice message before returning to initrd

7 years agokeymap: Fix typo in previous commit
Martin Pitt [Tue, 9 Apr 2013 13:44:41 +0000 (15:44 +0200)]
keymap: Fix typo in previous commit

7 years agokeymap: Add HP EliteBook 8460p
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>
7 years agolibudev: Move -lrt to Libs.private
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

7 years agomachine-id: fix missing initialization v201
Lennart Poettering [Mon, 8 Apr 2013 20:43:52 +0000 (22:43 +0200)]
machine-id: fix missing initialization

7 years agobuild-sys: prepare 201
Lennart Poettering [Mon, 8 Apr 2013 20:24:19 +0000 (22:24 +0200)]
build-sys: prepare 201

7 years agoshutdown: print a message when storage is finalized
Lennart Poettering [Mon, 8 Apr 2013 19:22:14 +0000 (21:22 +0200)]
shutdown: print a message when storage is finalized

7 years agojournald: bring max coredump size in sync with max entry size
Lennart Poettering [Mon, 8 Apr 2013 18:32:03 +0000 (20:32 +0200)]
journald: bring max coredump size in sync with max entry size

7 years agoupdate TODO
Lennart Poettering [Mon, 8 Apr 2013 18:29:52 +0000 (20:29 +0200)]
update TODO

7 years agocgroup: clean-ups
Lennart Poettering [Mon, 8 Apr 2013 17:42:58 +0000 (19:42 +0200)]
cgroup: clean-ups

7 years agoanalyze: various cleanups
Lennart Poettering [Mon, 8 Apr 2013 17:42:48 +0000 (19:42 +0200)]
analyze: various cleanups

7 years agoanalyze: fix OOM handling + fix memory leak
Lennart Poettering [Mon, 8 Apr 2013 17:42:29 +0000 (19:42 +0200)]
analyze: fix OOM handling + fix memory leak

7 years agoanalyze: add missing --help text entries
Lennart Poettering [Mon, 8 Apr 2013 17:42:02 +0000 (19:42 +0200)]
analyze: add missing --help text entries

7 years agoman: be clearer that it's not OK to manipulate systemd's own cgroup hirearchy
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

7 years agosystemd-analyze: filter dot output
Ł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.

7 years agoudev/udev-ctrl.c:udev_ctrl_new_from_fd() enable SO_PASSCRED
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.

7 years agodbus-manager: fix variable type introspection
Ronny Chevalier [Mon, 8 Apr 2013 16:22:44 +0000 (18:22 +0200)]
dbus-manager: fix variable type introspection

7 years agocgroup: always keep access mode of 'tasks' and 'cgroup.procs' files in cgroup directo...
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

7 years agokernel-install: don't make unused parameter mandatory
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>
7 years agoTODO: update
Kay Sievers [Mon, 8 Apr 2013 14:52:20 +0000 (16:52 +0200)]
TODO: update

7 years agojournald: no need to free audit vars
Lennart Poettering [Mon, 8 Apr 2013 13:48:12 +0000 (15:48 +0200)]
journald: no need to free audit vars

7 years agojournald: drop two more memory allocations
Lennart Poettering [Mon, 8 Apr 2013 13:46:32 +0000 (15:46 +0200)]
journald: drop two more memory allocations

7 years agojournald: get rid of one more memory allocation
Lennart Poettering [Mon, 8 Apr 2013 13:38:27 +0000 (15:38 +0200)]
journald: get rid of one more memory allocation

7 years agojournald: Do not dynamically allocate _UID/_GID/_PID strings
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.

7 years agojournald: Do not always record _AUDIT_SESSION and _AUDIT_LOGINUID
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.

7 years agoutil: Avoid memory allocations for formatting paths
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();
}

7 years agoupdate TODO
Lennart Poettering [Mon, 8 Apr 2013 13:23:43 +0000 (15:23 +0200)]
update TODO

7 years agocgtop: print absolute CPU times with format_timespan
Lennart Poettering [Mon, 8 Apr 2013 13:23:12 +0000 (15:23 +0200)]
cgtop: print absolute CPU times with format_timespan

7 years agoDo not serialize environment, when switching root
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

7 years agosd-daemon.c: allow use of -lrt to be avoided
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".

7 years agojournal: Fix typo
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

7 years agosystemd-python: fix wait bug
Steven Hiscocks [Sat, 6 Apr 2013 22:46:44 +0000 (18:46 -0400)]
systemd-python: fix wait bug

7 years agodbus-loop.c: fix variable initialization
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.

7 years agoUse _cleanup_ when reading config files
Zbigniew Jędrzejewski-Szmek [Mon, 25 Mar 2013 01:06:27 +0000 (21:06 -0400)]
Use _cleanup_ when reading config files

7 years agoAdd _cleanup_globfree_
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.

7 years agoUse initalization instead of explicit zeroing
Zbigniew Jędrzejewski-Szmek [Sun, 24 Mar 2013 23:59:00 +0000 (19:59 -0400)]
Use initalization instead of explicit zeroing

Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.

A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:

$ size build/.libs/systemd
         text    data     bss     dec     hex filename
before 897737  107300    2560 1007597   f5fed build/.libs/systemd
after  897873  107300    2560 1007733   f6075 build/.libs/systemd

… actually less than 1‰.

A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert.

7 years agoudevadm: do not free node on success
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 21:39:46 +0000 (17:39 -0400)]
udevadm: do not free node on success

A fix for ff03aed06a422.

7 years agoudev-builtin-usb_id: avoid comparison of unsigned and ssize_t
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 21:40:31 +0000 (17:40 -0400)]
udev-builtin-usb_id: avoid comparison of unsigned and ssize_t

For some reason this shows up on i686 only:
src/udev/udev-builtin-usb_id.c:192:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

7 years agosystemctl: tweak drop-in display
Lennart Poettering [Fri, 5 Apr 2013 18:19:54 +0000 (20:19 +0200)]
systemctl: tweak drop-in display

So far we didn't place spaces between the box drawing chars and the
values next to them. Let's be consistent here.

(Or to turn this around: if we really want to place a space there we
probably should do that in all our tree outputs, not just here...)

7 years agosystemctl: tweak output of Listen: fields a bit
Lennart Poettering [Fri, 5 Apr 2013 18:12:39 +0000 (20:12 +0200)]
systemctl: tweak output of Listen: fields a bit

It's probably a good idea to minimize the number of field names to show
in the "systemctl status" output, in order to make them useful as a
guide for the reader how things are "grouped". This patch moves
information about the used socket technology to the end of the output
lines in brackets, rather than into the field names. This turns the used
socket technology into what it is -- peripheral meta information --
instead of something that was at the core.

New output:

systemd-journald.socket - Journal Socket
         Loaded: loaded (/usr/lib/systemd/system/systemd-journald.socket; static)
         Active: active (running) since Fr 2013-03-29 02:16:30 CET; 1 weeks 0 days ago
           Docs: man:systemd-journald.service(8)
                 man:journald.conf(5)
                 man:systemd-journald.service(8)
                 man:journald.conf(5)
         Listen: /run/systemd/journal/stdout (Stream)
                 /run/systemd/journal/socket (Datagram)
                 /dev/log (Datagram)

7 years agosystemctl: Add DropIn paths to status message
Oleksii Shevchuk [Fri, 5 Apr 2013 17:58:04 +0000 (20:58 +0300)]
systemctl: Add DropIn paths to status message

$ systemctl status null.target
null.target - NYAN
   Loaded: loaded (/home/alxchk/.config/systemd/user/null.target; disabled)
  Drop-In: /home/alxchk/.config/systemd/user/null.target.d
           └─ descr.conf, install-1.conf, install.conf
           /etc/systemd/user/null.target.d
           └─ test.conf
   Active: active since Пт 2013-04-05 20:42:13 EEST; 1min 58s ago

7 years agobuild-sys: libsystemd-daemon.so is no longer required for pam_systemd
Lennart Poettering [Fri, 5 Apr 2013 17:27:00 +0000 (19:27 +0200)]
build-sys: libsystemd-daemon.so is no longer required for pam_systemd

7 years agobuild-sys: add new man pages to makefile
Lennart Poettering [Fri, 5 Apr 2013 17:24:47 +0000 (19:24 +0200)]
build-sys: add new man pages to makefile

7 years agologind: consider key inhibitors that are taken by non-session processes as global
Lennart Poettering [Fri, 5 Apr 2013 16:57:58 +0000 (18:57 +0200)]
logind: consider key inhibitors that are taken by non-session processes as global

This should allow system services to take over key handling for all
sessions, globally.

7 years agoPAM, uaccess: check for logind, not for systemd
Martin Pitt [Tue, 26 Mar 2013 10:36:31 +0000 (11:36 +0100)]
PAM, uaccess: check for logind, not for systemd

It is possible to build systemd without logind or run logind without systemd
init. Commit 66e41181 fixed sd_booted() to only succeed for systemd init; with
that, testing for systemd init is wrong in the parts that talk to logind.

In particular, this affects the PAM module and the "uaccess" udev builtin.
Change sd_booted() to a new logind_running() which tests for
/run/systemd/seats/.

For details, see:
<https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html>

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

7 years agoshell-completion: work on session shell is --user is used
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 11:45:30 +0000 (07:45 -0400)]
shell-completion: work on session shell is --user is used

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

7 years agobuild-sys: use LN_S in Makefile.am
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 11:25:10 +0000 (07:25 -0400)]
build-sys: use LN_S in Makefile.am

For consistency only. We're Linux only, so it really makes no
difference.

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

7 years agobus: various improvements for test-bus-chat
Lennart Poettering [Fri, 5 Apr 2013 12:55:28 +0000 (14:55 +0200)]
bus: various improvements for test-bus-chat

7 years agobus: convert a couple of calls over to new convenience functions
Lennart Poettering [Fri, 5 Apr 2013 12:49:45 +0000 (14:49 +0200)]
bus: convert a couple of calls over to new convenience functions

7 years agobus: add convenience calls for method replies, too
Lennart Poettering [Fri, 5 Apr 2013 12:48:43 +0000 (14:48 +0200)]
bus: add convenience calls for method replies, too

7 years agobus: when parsing signature strings, accept NULL as empty signature
Lennart Poettering [Fri, 5 Apr 2013 12:48:20 +0000 (14:48 +0200)]
bus: when parsing signature strings, accept NULL as empty signature

7 years agobus: make sure callback structs are always properly initialized
Lennart Poettering [Fri, 5 Apr 2013 12:47:49 +0000 (14:47 +0200)]
bus: make sure callback structs are always properly initialized

7 years agovconsole-setup: fix vconsole.conf vs. cmdline overriding logic
Michal Schmidt [Fri, 5 Apr 2013 11:32:34 +0000 (13:32 +0200)]
vconsole-setup: fix vconsole.conf vs. cmdline overriding logic

Skipping the parsing of /etc/vconsole.conf just because some values were
already assigned from the cmdline never made sense. And by the way, commit
f73141d changed the return values of parse_env_file() - it now gives 0
on success. Which means in current HEAD /etc/vconsole.conf overrides the
cmdline, which is the reverse of what's expected.

We need to parse /etc/vconsole.conf first and then let vconsole.*
overrides from cmdline take effect. The behaviour is documented in
vconsole.conf(5).

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

7 years agobus: use C99 struct construction for error initializers
Lennart Poettering [Fri, 5 Apr 2013 11:11:26 +0000 (13:11 +0200)]
bus: use C99 struct construction for error initializers

That way we can allocate an error struct on-the-fly while calling a
function. Nice!

7 years agotest-strv: do not declare table to be sorted const
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 04:31:59 +0000 (00:31 -0400)]
test-strv: do not declare table to be sorted const

Segmentation fault under clang.

7 years agotest-catalog,core/load-dropin: remove unused variables
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 04:03:24 +0000 (00:03 -0400)]
test-catalog,core/load-dropin: remove unused variables

7 years agojournal: u64log2 can be expressed just as __builtin_clzll(n) ^ 63U
Cristian Rodríguez [Thu, 4 Apr 2013 23:09:50 +0000 (20:09 -0300)]
journal: u64log2 can be expressed just as __builtin_clzll(n) ^ 63U

7 years agosystemctl: align cgroups to 'n' in 'name='
Zbigniew Jędrzejewski-Szmek [Fri, 5 Apr 2013 01:14:32 +0000 (21:14 -0400)]
systemctl: align cgroups to 'n' in 'name='

Also drop ':' in repeated Docs lines.

7 years agosd-id128: check that the kernel is feeding us proper data
Zbigniew Jędrzejewski-Szmek [Wed, 3 Apr 2013 20:58:16 +0000 (16:58 -0400)]
sd-id128: check that the kernel is feeding us proper data

The characters are already checked, so we show that
we don't trust the kernel. Make sure we don't overrun
the buffer too.

7 years agoudevadm-hwdb: avoid leak in error path
Zbigniew Jędrzejewski-Szmek [Wed, 3 Apr 2013 20:48:46 +0000 (16:48 -0400)]
udevadm-hwdb: avoid leak in error path

7 years agoefivars: un-leak a few strings
Zbigniew Jędrzejewski-Szmek [Wed, 3 Apr 2013 20:32:01 +0000 (16:32 -0400)]
efivars: un-leak a few strings

7 years agotimedated: fix a few memory leaks
Zbigniew Jędrzejewski-Szmek [Tue, 2 Apr 2013 20:07:21 +0000 (16:07 -0400)]
timedated: fix a few memory leaks

Contents of /etc/adjtime and more.

7 years agobus: add convenience functions for constructing and sending method calls/signals...
Lennart Poettering [Fri, 5 Apr 2013 02:15:39 +0000 (04:15 +0200)]
bus: add convenience functions for constructing and sending method calls/signals in one call

7 years agobus: properly detect and handle if a callback is installed/removed from within a...
Lennart Poettering [Fri, 5 Apr 2013 01:55:58 +0000 (03:55 +0200)]
bus: properly detect and handle if a callback is installed/removed from within a callback

7 years agobus: don't allow recursive invocation of sd_bus_process()
Lennart Poettering [Fri, 5 Apr 2013 01:15:10 +0000 (03:15 +0200)]
bus: don't allow recursive invocation of sd_bus_process()

7 years agoupdate TODO
Lennart Poettering [Thu, 4 Apr 2013 22:24:00 +0000 (00:24 +0200)]
update TODO

7 years agolocalectl: add support for listing X11 keymap information
Lennart Poettering [Thu, 4 Apr 2013 22:23:23 +0000 (00:23 +0200)]
localectl: add support for listing X11 keymap information

7 years agojournal: add sd_journal_get_timeout() call to public API
Lennart Poettering [Thu, 4 Apr 2013 18:07:48 +0000 (20:07 +0200)]
journal: add sd_journal_get_timeout() call to public API

Let's do the wake-up logic on NFS internally, making things simpler for
users.

7 years agologin: add sd_login_monitor_get_timeout() public api call
Lennart Poettering [Thu, 4 Apr 2013 16:31:22 +0000 (18:31 +0200)]
login: add sd_login_monitor_get_timeout() public api call

We don't need this right now, but we should keep our options open, in
case we need more than just an fd for waking up.

7 years agoupdate TODO
Lennart Poettering [Thu, 4 Apr 2013 15:49:33 +0000 (17:49 +0200)]
update TODO

7 years agotest-bus-marshal.c: do not call g_type_init() for modern glib versions
Harald Hoyer [Thu, 4 Apr 2013 07:02:28 +0000 (09:02 +0200)]
test-bus-marshal.c: do not call g_type_init() for modern glib versions

7 years agocryptsetup-generator: add JobTimeoutSec=0 for the decrypted crypt devices
Harald Hoyer [Fri, 1 Mar 2013 14:13:43 +0000 (15:13 +0100)]
cryptsetup-generator: add JobTimeoutSec=0 for the decrypted crypt devices

The password query for a crypto device currently times out after 90s,
which is too short to grab a cup of coffee when a machine boots up.

The resulting decrypted device /dev/mapper/luks-<uuid> might not
be a mountpoint (but part of a LVM PV or raid array)
and therefore the timeout cannot be controlled by the settings
in /etc/fstab. For this reason this device should not carry its own timeout.

Also the encrypted device /dev/disk/by-*/* already has a timeout and
additionally the timeout for the password query is set in /etc/crypttab.

This patch disables the timeout of the resulting decrypted devices by creating
<device-unit>.d/50-job-timeout-sec-0.conf files with "JobTimeoutSec=0".

7 years agologin: add new public API call sd_login_monitor_get_events() to get poll() flags...
Lennart Poettering [Thu, 4 Apr 2013 15:38:08 +0000 (17:38 +0200)]
login: add new public API call sd_login_monitor_get_events() to get poll() flags to wait for

We should keep our options open, so that we can watch for POLLOUT later
on if we wish to. CUrrently this call will always return POLLIN however.

7 years agojournal: add public API call sd_journal_get_events()
Lennart Poettering [Thu, 4 Apr 2013 15:22:28 +0000 (17:22 +0200)]
journal: add public API call sd_journal_get_events()

This function should be used when filling in "struct pollfd"'s .events
field for watching the journal. It will always return POLLIN for now,
but we should keep our options open to change this later on.

This mimics libsystemd-bus' sd_bus_get_events() call with the same
purpose.