1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

12221 Commits

Author SHA1 Message Date
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
Martin Pitt
42a9de1c25 keymap: Fix wrong assignments to F23
These days, F21/F22/F23 mean Touchpad toggle/on/off. Clean up other assignments
to that from ancient times which belong to keys like "Auto Brightness" (which
doesn't have a keycode and is usually hardwired) or some "launch vendor tool"
key.

https://bugs.freedesktop.org/show_bug.cgi?id=62953
2013-09-19 16:43:43 -05:00
Dave Reisner
184ecaf794 systemctl: Avoid ellipsizing when piping output 2013-09-19 17:39:49 -04:00
Zbigniew Jędrzejewski-Szmek
1e5413f74f Add more tests and fix capability logging 2013-09-19 16:22:59 -05:00
Zbigniew Jędrzejewski-Szmek
1864b0e395 build-sys: don't build python modules after --without-python
The modules should build just fine, but AM_PATH_PYTHON sets
pkgpyexecdir for us. Without that variable we don't know where to
install modules. In addition libtool tries an empty rpath, breaking
the build. Those issues could be fixed or worked around, but we
probably don't have many people who want to avoid using python binary,
but want to compile python modules. If such uses ever come up, this
issue should be revisited.
2013-09-19 14:58:21 -04:00
Dave Reisner
cecf24e7f0 fix grammatical error 2013-09-19 14:55:35 -04:00
Dave Reisner
d2421337f6 nspawn: be less liberal about creating bind mount destinations
Previously, if a file's bind mount destination didn't exist, nspawn
would blindly create a directory, and the subsequent bind mount would
fail. Examine the filetype of the source and ensure that, if the
destination does not exist, that it is created appropriately.

Also go one step further and ensure that the filetypes of the source
and destination match.
2013-09-19 14:48:43 -04:00
Dave Reisner
e7363c59d6 test-utf8: add more tests for public functions 2013-09-19 11:50:36 -04:00
Dave Reisner
8f6ce71fe7 device-nodes: move device node specific code to own file
In the process, rename udev_encode_string which is poorly named for what
it does. It deals specifically with encoding names that udev creates and
has its own rules: utf8 is valid but some ascii is not (e.g. path
separators), and everything else is simply escaped. Rename it to
encode_devnode_name.
2013-09-19 11:50:34 -04:00
Dave Reisner
7991ac34ab shared/utf8: merge implementations, remove cruft
This unifies the utf8 handling code which was previously duplicated in
udev and systemd.
2013-09-19 11:49:03 -04:00
Dave Reisner
894a156de7 udev-builtin-blkid: export ID_PART_TABLE_UUID 2013-09-19 11:38:48 -04:00
Andrey Borzenkov
f4d213c15b clarify $ escaping in Exec* lines
Explain that literal $ can be passed by doubling it.
2013-09-19 10:22:10 -05:00
David Strauss
c22428fb73 Spelling fix from later revision of committed patch from Shawn Landden <shawn@churchofgit.com>. 2013-09-18 15:46:51 -05:00
Zbigniew Jędrzejewski-Szmek
4ec29144dd Fix capability logging when effective caps are 0
Shawn Landen> Doesn't this also skip the last '0' when it is all '0's?
              You need to keep the last one.
2013-09-18 11:43:29 -05:00
Colin Walters
72fd713962 polkit: Avoid race condition in scraping /proc
If a calling process execve()s a setuid program, it can appear to be
uid 0.  Since we're receiving requests over DBus, avoid this by simply
passing system-bus-name as a subject.
2013-09-18 11:06:04 -05:00
Zbigniew Jędrzejewski-Szmek
00f117a599 logs-show.c: fix enum type in function declaration 2013-09-18 11:00:51 -05:00