systemd-python: fix wait bug
journal: Fix typo

This would break backwards skipping.

https://bugs.freedesktop.org/show_bug.cgi?id=63250
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".
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
cgtop: print absolute CPU times with format_timespan
update TODO
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();
}
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.
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.
journald: get rid of one more memory allocation
journald: drop two more memory allocations
journald: no need to free audit vars
TODO: update
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>
cgroup: always keep access mode of 'tasks' and 'cgroup.procs' files in cgroup directories in sync
dbus-manager: fix variable type introspection
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.
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.
man: be clearer that it's not OK to manipulate systemd's own cgroup hirearchy
analyze: add missing --help text entries