Commit graph

12236 commits

Author SHA1 Message Date
Lennart Poettering 0b926f194a Update TODO 2013-10-01 00:17:21 +02:00
Lennart Poettering 45fa9e29f8 hashmap: size hashmap bucket array dynamically
Instead of fixing the hashmap bucket array to 127 entries dynamically
size it, starting with a smaller one of 31. As soon as a fill level of
75% is reached, quadruple the size, and so on.

This should siginficantly optimize the lookup time in large tables
(from O(n) back to O(1)), and save memory on smaller tables (which most
are).
2013-10-01 00:17:21 +02:00
Lennart Poettering bcd8e6d1bd local: fix memory leak when putting together locale settings
Also, we need to use proper strv_env_xyz() calls when putting together
the environment array, since otherwise settings won't be properly
overriden.

And let's get rid of strv_appendf(), is overkill and there was only one
user.
2013-10-01 00:17:21 +02:00
Lennart Poettering 6c081276dc main: don't free fds array twice 2013-10-01 00:17:21 +02:00
Zbigniew Jędrzejewski-Szmek 69ae3ee07e logs-show.c: show all messages for a slice 2013-10-01 00:02:08 +02:00
Michał Górny ceadabb102 build-sys: link libsystemd-login with libsystemd-label.la
libsystemd-login.la uses cg_create() that currently seems to be a part
of libsystemd-label.la. However, it doesn't link against that library
and it seems that none of the (unconditional) libraries it uses do. In
the end, people end up getting «undefined reference to `cg_create'»
when trying to build e.g. dbus.
2013-10-01 00:02:08 +02:00
Lennart Poettering ba54bcb822 man: mention the systemd homepage from systemd(1) 2013-09-30 18:57:04 +02:00
Lennart Poettering 3efabbe47f update TODO 2013-09-30 18:57:04 +02:00
Lennart Poettering ea021cc3ea man: link cgroups api docs from relevant man pages 2013-09-30 18:57:04 +02:00
Andrey Borzenkov 4469ff4ade set IgnoreOnIsolate=true for systemd-cryptsetup@.service
When crypttab contains noauto, cryptsetup service does not have any
explicit dependencies. If service is started later manually (directly or via
mount dependency) it will be stopped on isolate.

mount units already have IgnoreOnIsolate set by default. Set it by
default for cryptsetup units as well.
2013-09-29 20:36:59 +02:00
Zbigniew Jędrzejewski-Szmek 893fa014de Fix buffer overrun when enumerating files
https://bugs.freedesktop.org/show_bug.cgi?id=69887

Based-on-a-patch-by: Hans Petter Jansson <hpj@copyleft.no>
2013-09-29 15:28:35 +02:00
Dave Reisner 8083d486d0 kmod-static-nodes: condition execution on modules.devname 2013-09-28 14:51:39 -04:00
Michael Scherer edcfd89ad0 Add a bit more explicit message, to help confused users
Seeing http://www.happyassassin.net/2013/09/27/further-sysadmin-adventures-wheres-my-freeipa-badge/
it seems that the default message is a bit confusing for people
who never encountered it before, so adding a link to the manpage could
help them.
2013-09-27 15:59:42 +02:00
Tom Gundersen 8b179a830a kernel-install: avoid using 'cp --preserve'
Force 0644 and root:root instead, to avoid problems with fat filesystems.
2013-09-27 15:56:54 +02:00
Zbigniew Jędrzejewski-Szmek f2ec0646ab build-sys: restore detection of sphinx 2013-09-27 08:24:08 +02:00
Zbigniew Jędrzejewski-Szmek 8a7935a23b Do not use unitialized variable and remove duplicated line 2013-09-27 07:59:15 +02:00
Lennart Poettering 278d4bcfe9 Update TODO 2013-09-27 02:59:50 +02:00
Lennart Poettering d43de69002 swap: properly expose timeout property on the bus 2013-09-27 02:02:21 +02:00
Lennart Poettering a38d1d28d1 dbus: fix introspection for TimerSlackNSec 2013-09-27 00:35:36 +02:00
Lennart Poettering 68372da693 systemctl: make sure set-property mangles unit names 2013-09-27 00:11:54 +02:00
Lennart Poettering 3fde5f30bd man: drop references to "cgroup" wher appropriate
Since cgroups are mostly now an implementation detail of systemd lets
deemphasize it a bit in the man pages. This renames systemd.cgroup(5) to
systemd.resource-control(5) and uses the term "resource control" rather
than "cgroup" where appropriate.

This leaves the word "cgroup" in at a couple of places though, like for
example systemd-cgtop and systemd-cgls where cgroup stuff is at the core
of what is happening.
2013-09-27 00:05:07 +02:00
Lennart Poettering 7ac807320a core: drop some out-of-date references to cgroup settings 2013-09-26 22:57:43 +02:00
Lennart Poettering c68ba912c3 logind: never consider a closing session relevant for PK checks
https://bugzilla.redhat.com/show_bug.cgi?id=1010215
2013-09-26 21:32:47 +02:00
Mike Gilbert 90dc8c2ea2 main: set umask before creating any files
This avoids a problem when we inherit a non-zero umask from the
initramfs. This would cause /run/systemd to be created with the wrong
mode.
2013-09-26 20:39:44 +02:00
Lennart Poettering 299404a19f logind: if a user is sitting in front of the computer and can shutdown the machine anyway he should also be able to reboot it 2013-09-26 20:31:37 +02:00
Lennart Poettering a57f7e2c82 core: rework how we match mount units against each other
Previously to automatically create dependencies between mount units we
matched every mount unit agains all others resulting in O(n^2)
complexity. On setups with large amounts of mount units this might make
things slow.

This change replaces the matching code to use a hashtable that is keyed
by a path prefix, and points to a set of units that require that path to
be around. When a new mount unit is installed it is hence sufficient to
simply look up this set of units via its own file system paths to know
which units to order after itself.

This patch also changes all unit types to only create automatic mount
dependencies via the RequiresMountsFor= logic, and this is exposed to
the outside to make things more transparent.

With this change we still have some O(n) complexities in place when
handling mounts, but that's currently unavoidable due to kernel APIs,
and still substantially better than O(n^2) as before.

https://bugs.freedesktop.org/show_bug.cgi?id=69740
2013-09-26 20:20:30 +02:00
Lennart Poettering 6270c1bd8f unit-name: when escaping a path consider the empty path identical to the root dir 2013-09-26 20:20:30 +02:00
Lennart Poettering e203f7c3ad util: properly handle the root dir in PATH_FOREACH_PREFIX
Also add PATH_FOREACH_PREFIX_MORE which includes the specified dir
itself in the iteration
2013-09-26 20:20:30 +02:00
Lennart Poettering baa89da40a cgroup: when referencing cgroup controller trees allow omission of the path 2013-09-26 20:20:30 +02:00
Zbigniew Jędrzejewski-Szmek 2b3ab29de4 Move part of logind.c into a separate file
liblogind-core.la was underlinked, missing a few functions
defined in logind.c. They are moved to a new file, logind-core.c,
and this file is linked into liblogind-core.la.
In addition, logind-acl.c is attached to the liblogind-core.la,
instead of systemd-logind directly.
2013-09-26 11:12:04 +02:00
Zbigniew Jędrzejewski-Szmek bd16acf35e Move functions around to fix underlinking in test-machine-tables 2013-09-26 11:12:04 +02:00
Zbigniew Jędrzejewski-Szmek 732bfe09ae build-sys: add ./configure --enable-address-sanitizer
Enabling address sanitizer seems like a useful thing, but is quite
tricky. Proper flags have to be passed to CPPFLAGS, CFLAGS and
LDFLAGS, but passing them on the commandline doesn't work because
we tests are done with ld directly, and not with libtool like in
real linking. We might want to fix this, but let's add a handy
way to enable address checking anyway.
2013-09-26 11:12:04 +02:00
Zbigniew Jędrzejewski-Szmek 5843c5ebb4 journald: accept EPOLLERR from /dev/kmsg
Also print out unexpected epoll events explictly.
2013-09-26 11:12:04 +02:00
Zbigniew Jędrzejewski-Szmek 8097ab4f0c test-hashmap: fix access to uninitialized memory 2013-09-26 11:12:03 +02:00
Zbigniew Jędrzejewski-Szmek f546241b6d execute.c: little modernization 2013-09-26 11:12:03 +02:00
Lennart Poettering fecffe5d0a util: add macro for iterating through all prefixes of a path
Syntactic sugar in a macro PATH_FOREACH_PREFIX.
2013-09-25 21:04:35 +02:00
Jimmie Tauriainen bc5fb0809e keymap: Add Samsung Ativ 9 Plus
https://launchpad.net/bugs/1229936
2013-09-25 07:30:23 +02:00
Lennart Poettering 13b84ec7df cgroup: if we do a cgroup operation then do something on all supported controllers
Previously we did operations like attach, trim or migrate only on the
controllers that were enabled for a specific unit. With this changes we
will now do them for all supproted controllers, and fall back to all
possible prefix paths if the specified paths do not exist.

This fixes issues if a controller is being disabled for a unit where it
was previously enabled, and makes sure that all processes stay as "far
down" the tree as groups exist.
2013-09-25 03:38:17 +02:00
Dave Reisner 8bd94f7a03 journalctl(1): s/adm/systemd-journal/ 2013-09-24 14:39:40 -04:00
Lukas Nykryn a6dbecc4e2 logind: return -EINVAL when PID is wrong
dbus-send --print-reply --system --dest=org.freedesktop.login1
/org/freedesktop/login1 org.freedesktop.login1.Manager.GetUserByPID
uint32:0
causes
systemd-logind[29843]: Assertion 'pid >= 1' failed at
src/login/logind.c:938, function manager_get_user_by_pid(). Aborting.
2013-09-24 17:00:33 +02:00
Kay Sievers ee9c9500ab TODO: add header back 2013-09-24 15:47:42 +02:00
Kay Sievers 540fd137af hwdb: update 2013-09-24 15:47:12 +02:00
Kay Sievers c51d84dc09 support acpi firmware performance data (FPDT)
Prefer firmware-provided performance data over loader-exported ones; if
ACPI data is available, always use it, otherwise try to read the loader
data.

The firmware-provided variables start at the time the first EFI image
is executed and end when the operating system exits the boot services;
the (loader) time calculated in systemd-analyze increases.
2013-09-24 15:43:41 +02:00
Kay Sievers 036ae95ac4 shared: device-nodes - add include guard 2013-09-24 15:34:57 +02:00
Kay Sievers fb8f3f9869 TODO: update 2013-09-24 15:34:57 +02:00
Lennart Poettering e58cec11e6 cgroup: always enable memory.use_hierarchy= for all cgroups in the memory hierarchy
The non-hierarchial mode contradicts the whole idea of a cgroup tree so
let's not support this. In the future the kernel will only support the
hierarchial logic anyway.
2013-09-23 16:02:31 -05:00
Eelco Dolstra a0f708053b Fix obsolete references to systemd-random-seed-load.service
This service was merged with systemd-random-seed-save.service in
c35b956d34.
2013-09-23 11:41:30 +02:00
Dave Reisner d808ca6414 completion/systemctl: add missing list-sockets verb 2013-09-20 14:48:43 -04:00
Mantas Mikulėnas 6c60569550 logind: put correct user object paths in introspection data
Sync with user_bus_path() in logind-user-dbus.c
2013-09-20 14:08:26 -04:00
Zbigniew Jędrzejewski-Szmek 1bee43de64 man: mention --runtime where appropriate
https://bugzilla.redhat.com/show_bug.cgi?id=1009956
2013-09-19 18:42:15 -05:00