1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-04 13:51:24 +03:00
Commit Graph

11072 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
c2e09812e9 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.
2013-04-10 19:47:21 -04:00
Zbigniew Jędrzejewski-Szmek
79c1638303 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".
2013-04-10 19:47:16 -04:00
Zbigniew Jędrzejewski-Szmek
75add28aa1 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.
2013-04-10 19:46:49 -04:00
Zbigniew Jędrzejewski-Szmek
b8a2b0f76b udev/ata_id: use initalization instead of explicit zeroing 2013-04-10 18:59:42 -04:00
Lukas Nykryn
4d3a5b1088 libsystemd-bus: initalize handle_cmsg to false 2013-04-10 18:59:42 -04:00
Lukas Nykryn
cb90460e04 tty-ask-password-agent: free passwords 2013-04-10 18:59:42 -04:00
Lukas Nykryn
3a819b1b62 journalctl: check return of strjoin 2013-04-10 18:59:42 -04:00
Zbigniew Jędrzejewski-Szmek
1c6330456c Use initalization instead of explicit zeroing in more places 2013-04-10 18:59:42 -04:00
Lennart Poettering
0affed79d2 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
2013-04-10 23:23:19 +02:00
Lennart Poettering
1ef2af5ae0 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.
2013-04-10 23:23:19 +02:00
Fedora systemd team
50fb97935d 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).
2013-04-10 11:36:59 +02:00
Lennart Poettering
b8b4d3dddc update TODO 2013-04-09 22:20:05 +02:00
Lennart Poettering
e2acb67baa 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.
2013-04-09 22:18:16 +02:00
Lennart Poettering
05d0c3e1fd update TODO 2013-04-09 21:31:16 +02:00
Lennart Poettering
1b492614cb bus: also remove recursive invocation of message_append_ap() 2013-04-09 21:28:11 +02:00
Lennart Poettering
fe1d424d29 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.
2013-04-09 21:03:12 +02:00
Lennart Poettering
8df31a9c98 units: fix some left-over mentions of remote-fs-setup.target 2013-04-09 19:05:49 +02:00
Lennart Poettering
30d743f430 shutdown: print a nice message before returning to initrd 2013-04-09 18:29:33 +02:00
Martin Pitt
c8f5f5e728 keymap: Fix typo in previous commit 2013-04-09 15:44:41 +02:00
Pali Rohar
72bd03c636 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>
2013-04-09 15:32:22 +02:00
Michael Biebl
e712ffcce6 libudev: Move -lrt to Libs.private
It's only needed for static linking.

https://bugs.freedesktop.org/show_bug.cgi?id=63309
2013-04-09 15:26:39 +02:00
Lennart Poettering
4b73a0c061 machine-id: fix missing initialization 2013-04-08 22:46:56 +02:00
Lennart Poettering
d3a86981d1 build-sys: prepare 201 2013-04-08 22:24:19 +02:00
Lennart Poettering
5989dbb233 shutdown: print a message when storage is finalized 2013-04-08 21:22:14 +02:00
Lennart Poettering
c4aa09b06f journald: bring max coredump size in sync with max entry size 2013-04-08 20:35:26 +02:00
Lennart Poettering
3df82d5a8c update TODO 2013-04-08 20:35:25 +02:00
Lennart Poettering
2d76d14ea3 cgroup: clean-ups 2013-04-08 20:35:25 +02:00
Lennart Poettering
816f25e86a analyze: various cleanups 2013-04-08 20:35:25 +02:00
Lennart Poettering
903a0b07e0 analyze: fix OOM handling + fix memory leak 2013-04-08 20:35:25 +02:00
Lennart Poettering
f5b7a3fb53 analyze: add missing --help text entries 2013-04-08 20:35:25 +02:00
Lennart Poettering
fbc15b7663 man: be clearer that it's not OK to manipulate systemd's own cgroup hirearchy 2013-04-08 20:35:25 +02:00
Łukasz Stelmach
e55933db18 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.
2013-04-08 20:35:25 +02:00
Harald Hoyer
b97caef538 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.
2013-04-08 20:03:50 +02:00
Ronny Chevalier
d4b7fecb05 dbus-manager: fix variable type introspection 2013-04-08 18:27:55 +02:00
Lennart Poettering
974efc4658 cgroup: always keep access mode of 'tasks' and 'cgroup.procs' files in cgroup directories in sync 2013-04-08 18:22:47 +02:00
Marc-Antoine Perennou
d82d87dac1 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>
2013-04-08 17:00:04 +02:00
Kay Sievers
5666ea6fca TODO: update 2013-04-08 16:52:50 +02:00
Lennart Poettering
7120511888 journald: no need to free audit vars 2013-04-08 15:48:31 +02:00
Lennart Poettering
adb435bb70 journald: drop two more memory allocations 2013-04-08 15:48:31 +02:00
Lennart Poettering
a569398925 journald: get rid of one more memory allocation 2013-04-08 15:48:31 +02:00
Holger Hans Peter Freyther
c2457105d7 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.
2013-04-08 15:35:03 +02:00
Holger Hans Peter Freyther
0a20e3c107 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.
2013-04-08 15:30:04 +02:00
Holger Hans Peter Freyther
ab7d9b674e 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();
}
2013-04-08 15:26:32 +02:00
Lennart Poettering
b6b7d43379 update TODO 2013-04-08 15:23:52 +02:00
Lennart Poettering
62b95b8b40 cgtop: print absolute CPU times with format_timespan 2013-04-08 15:23:52 +02:00
Harald Hoyer
b3680f49e2 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
2013-04-08 14:45:19 +02:00
Simon McVittie
9735bd12ab 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".
2013-04-08 13:54:31 +02:00
Marius Vollmer
23e97f7d92 journal: Fix typo
This would break backwards skipping.

https://bugs.freedesktop.org/show_bug.cgi?id=63250
2013-04-08 11:08:38 +02:00
Steven Hiscocks
7c962c866a systemd-python: fix wait bug 2013-04-06 18:50:35 -04:00
Kay Sievers
2f9f5aa014 dbus-loop.c: fix variable initialization
Fix for:
  b92bea5d2a
Causing:
  systemd-logind[265]: Assertion 'd = event.data.ptr' failed at src/shared/dbus-loop.c:233, function bus_loop_dispatch(). Aborting.
2013-04-06 02:56:04 +02:00