Commit Graph

19094 Commits

Author SHA1 Message Date
Lennart Poettering 590ba75f32 update TODO 2015-01-29 03:53:23 +01:00
Peter Hutterer ebb90c83ea Fix ordering of the 70-mouse.rule in the Makefile 2015-01-29 11:52:07 +10:00
Lennart Poettering f11943c53e coredump: drop caps while we are processing the coredump
https://bugs.freedesktop.org/show_bug.cgi?id=87354
2015-01-29 02:47:29 +01:00
Lennart Poettering 9e8abdf0d9 Revert "journal: do not check for number of files"
This reverts commit b914ea8d37.

We really need to put a limit on all our resources, everywhere, and in
particular if we operate on external data.

Hence, let's reintroduce the limit, but bump it substantially, so that
it is guaranteed to be higher than any realistic RLIMIT_NOFILE setting.
2015-01-29 02:11:55 +01:00
Lennart Poettering 6c2b9c8da1 man: turn new netdev table into a proper table 2015-01-29 01:40:48 +01:00
Maxim Mikityanskiy df6e44c4af core: make setting the shutdown watchdog configuration via dbus work
https://bugs.freedesktop.org/show_bug.cgi?id=88284
2015-01-29 01:23:50 +01:00
Tom Gundersen fc07d5d3a9 man: netdev - add some minimal explanation to the different netdev kinds and modes
Would be awesome to expand on this a lot, as there is currently no decent documentation for most of these things.
2015-01-28 21:35:54 +01:00
Tom Gundersen 73b23bea86 networkd: tunnel - call tunnel modes ipip6, not ip4ipv6 to match ip(8) 2015-01-28 21:35:54 +01:00
Martin Pitt be94d95499 logind: handle closing sessions over daemon restarts
It may happen that you have several sessions with the same VT:

 - Open a session c1 which leaves some processes around, and log out. The
   session will stay in State=closing and become Active=no.
 - Log back in on the same VT, get a new session "c2" which is State=active and
   Active=yes.

When restarting logind after that, the first session that matches the current
VT becomes Active=yes, which will be c1; c2 thus is Active=no and does not get
the usual polkit/device ACL privileges.

Restore the "closing" state in session_load(), to avoid treating all restored
sessions as State=active. In seat_active_vt_changed(), prefer active sessions
over closing ones if more than one session matches the current VT.

Finally, fix the confusing comment in session_load() and explain it a bit
better.

https://launchpad.net/bugs/1415104
2015-01-28 20:03:38 +01:00
Lennart Poettering 40672b99c7 util: add comment explaining hostname_is_valid() 2015-01-28 17:48:05 +01:00
Lennart Poettering 477e75ef9e update TODO 2015-01-28 17:48:01 +01:00
Lennart Poettering f50f01f4b7 sd-dhcp: chop of trailing dot of DHCP supplied host and domain nams 2015-01-28 17:47:37 +01:00
Martin Pitt 3b48ce4ec4 rules: clean up stale CD drive mounts after ejection
Ejecting a CD with the hardware drive button only causes a change uevent, but
the device node stays around (just without a medium). Pick up these uevents and
mark the device as SYSTEMD_READY=0 on ejection, so that systemd stops the
device unit and consequently all mount units on it.

On media insertion, mark the device as SYSTEMD_READY=1 again.

https://bugs.freedesktop.org/show_bug.cgi?id=72206
https://bugzilla.opensuse.org/show_bug.cgi?id=909418
https://bugs.archlinux.org/task/42071
https://bugs.launchpad.net/bugs/1168742
2015-01-28 17:04:06 +01:00
Martin Pitt 06e9788888 core/mount: add dependencies to dynamically mounted mounts too
Add unit dependencies for dynamic (i. e. not from fstab) mounts. With that,
mount units properly bind to their underlying device, and thus get
automatically stopped/unmounted when the underlying device goes away.

This cleans up stale mounts from unplugged devices.

Thanks to Lennart Poettering for pointing out the fix!
2015-01-28 17:02:28 +01:00
Lennart Poettering 3315f08517 sysv-generator: no need to check for identical symlinks source and target twice
http://lists.freedesktop.org/archives/systemd-devel/2015-January/027594.html
2015-01-28 15:11:49 +01:00
Lennart Poettering 82a2b6bb5e core: output unit status output strings to console, only if we actually are changing unit state
Unit _start() and _stop() implementations can fail with -EAGAIN to delay
execution temporarily. Thus, we should not output status messages before
invoking these calls, but after, and only when we know that the
invocation actually made a change.
2015-01-28 15:07:13 +01:00
Lennart Poettering 3ad85e3775 test: duplicate LIST_FOREACH_OTHERS test to check for corner cases of end and start of list 2015-01-28 14:22:13 +01:00
Lennart Poettering cdda4aa8d2 list: properly skip over first item in LIST_FOREACH_OTHERS 2015-01-28 14:04:23 +01:00
Lennart Poettering d1f6b1b455 manager: fix minor typo 2015-01-28 14:04:23 +01:00
Martin Pitt 40780877c1 sysv-generator: Re-fix .sh suffix handling
Commit 4e48855534 caused the .sh suffix to be stripped from the original
"filename", which caused the generated units to call the wrong init.d script.
Only use the .sh stripped file name for comparing with Provides:, not for
generating the Exec*= lines.

Spotted by sysv-generator-test.
2015-01-28 08:00:28 +01:00
Zbigniew Jędrzejewski-Szmek 78eb158a20 build-sys: add check for --help width 2015-01-27 21:48:12 -05:00
Zbigniew Jędrzejewski-Szmek b57b06258e notify,firstboot,analyze,run: trim --help output to 80 lines 2015-01-27 21:48:12 -05:00
Zbigniew Jędrzejewski-Szmek 79ca888f5a tmpfiles: fix help text
The help text, apart from being too long, did not describe what the options
really do.
2015-01-27 21:48:12 -05:00
Lennart Poettering 6bf12f55af build-sys: make xz and zlib build-time optional again 2015-01-28 03:21:56 +01:00
Lennart Poettering 5eeac515bf man: document the new Ctrl-Alt-Del magic 2015-01-28 02:33:22 +01:00
Lennart Poettering a626df3efd manager: when we immediately reboot due to 7x C-A-D within 2s, mention this on the console too 2015-01-28 02:28:45 +01:00
Lennart Poettering 4b42934665 update TODO 2015-01-28 02:22:19 +01:00
Lennart Poettering 2e5c94b9aa core: when the user hits Ctrl-Alt-Del more than 7x per 2s, reboot immediately
This should be useful for cases where clean rebooting doesn't work, and
the user wants to hurry up the reboot.
2015-01-28 02:18:59 +01:00
Lennart Poettering a986501b90 sysv-generator: there's really no need to invoke fstatat() multiple times on the same sysv script
It's sufficient to check once if something is a regular file, hence,
let's do that.
2015-01-28 01:36:40 +01:00
Lennart Poettering 7dfb0404b3 update TODO 2015-01-28 01:02:36 +01:00
Lennart Poettering 37cf8fee46 core: if two start jobs for the same swap device node are queued, only dispatch one of them at a time
If two start jobs for two seperate .swap device nodes are queued, which
then turns out to be referring to the same device node, refuse
dispatching more than one of them at the same time.

This should solve an issue when the same swap partition is found via GPT
auto-discovery and via /etc/fstab, where one uses a symlink path, and
the other the raw devce node. So far we might have ended up invoking
mkswap on the same node at the very same time with the two device node
names.

With this change only one mkswap should be executed at a time. THis
mkswap should have immediate effect on the other swap unit, due to the
state in /proc/swaps changing, and thus suppressing actual invocation of
the second mkswap.

http://lists.freedesktop.org/archives/systemd-devel/2015-January/027314.html
2015-01-28 00:38:38 +01:00
Lennart Poettering caac2704d5 swap: simplify a few things by making use of new LIST_FOREACH_OTHERS macro 2015-01-28 00:37:11 +01:00
Lennart Poettering 7663df3770 list: add macro for iterating through a list an item is in, skipping the item 2015-01-28 00:34:58 +01:00
Lennart Poettering 976dec6e7b swap: properly specify errno when logging 2015-01-28 00:04:47 +01:00
Lennart Poettering 9993ef2e98 sysv-generator: use is_symlink() utility call where appropriate 2015-01-27 23:13:28 +01:00
Lennart Poettering 4e48855534 sysv-generator: minor simplifications 2015-01-27 23:11:01 +01:00
Christian Seiler d44efb621a man: systemd.service(5): add some simple examples
Add a couple of exampels, at least one for each service type that
include some explanations and pointers to various relevant options.
2015-01-27 22:18:35 +01:00
Christian Seiler 92b1e2256a man: systemd.unit(5): add examples for common tasks
Add examples for (a) how to allow units to be enabled and (b)
overriding vendor settings to the man page.
2015-01-27 21:58:45 +01:00
Christian Seiler 11c6476a08 logind: chown+chmod /run/user/$UID if mount(tmpfs) fails with EPERM
In containers without CAP_SYS_ADMIN, it is not possible to mount tmpfs
(or any filesystem for that matter) on top of /run/user/$UID.
Previously, logind just failed in such a situation.

Now, logind will resort to chown+chmod of the directory instead. This
allows logind still to work in those environments, although without the
guarantees it provides (i.e. users not being able to DOS /run or other
users' /run/user/$UID space) when CAP_SYS_ADMIN is available.
2015-01-27 18:58:40 +01:00
Christian Seiler 4d858e7d9f logind: remove per-user runtime dir again if setup fails
If setup of per-user runtime dir fails, clean up afterwards by removing
the directory before returning from the function, so we don't leave the
directory behind.

If this is not done, the second time the user logs in logind would
assume that the directory is already set up, even though it isn't.
2015-01-27 18:55:50 +01:00
Lennart Poettering e611755d98 man: mention that 99-default.link is shipped by default, and users hence need to install a lexically earlier .link file for it to be honoured 2015-01-27 18:29:33 +01:00
Lennart Poettering 2bc39683c0 update TODO 2015-01-27 17:58:57 +01:00
Lennart Poettering 831f18cbf3 build-sys: make bzip2 really optional 2015-01-27 17:58:57 +01:00
Lennart Poettering 0ef403877a units: turn on watchdog for resolved 2015-01-27 14:31:44 +01:00
Lennart Poettering e87bc3ef67 units: fix all TTY paths for container gettys
Spotted by Christian Seiler:

http://lists.freedesktop.org/archives/systemd-devel/2015-January/027441.html
2015-01-27 14:31:44 +01:00
Patrik Flykt c62c4628d9 networkd-dhcp6: Assign DHCPv6 addresses and prefix lengths
Once IPv6 addresses have been acquired, assign these to the interface
with the prefix lengths taken from the ICMPv6 Router Advertisement
handling code. The preferred and valid IPv6 address lifetimes are
handed to the kernel which will clean up them if not renewed in time.

When a prefix announced via Router Advertisements expires, find all
addresses that match that prefix and update the address to have a
prefix length of 128 causing the prefix to be off-link.
2015-01-27 09:35:24 +02:00
Patrik Flykt bd1957e906 sd-icmp6-nd: Add support for fetching the latest expired prefix
Keep the expired prefix for the duration of the prefix expiration event
and remove it afterwards.
2015-01-27 09:35:24 +02:00
Patrik Flykt 99af546d0e test-icmp6-nd: Add test cases for prefixes
Add test cases that feeds an Router Advertisement to the ICMPv6 code
and verify that the correct prefix lengths are returned given an IPv6
address.

Enhance the prefix verification test by adding a shorter prefix and
check that the intended prefix lengths are now updated.
2015-01-27 09:35:24 +02:00
Patrik Flykt d77bde34cf sd-icmp6-nd: Parse ICMPv6 prefix information
Save each new onlink IPv6 prefix and attach an expiry timer to it.
If the prefixes overlap, take the shorter prefix and write a debug
message about the event. Once the prefix is resent in a Router
Advertisement, update the timer. Add a new event for the expiring
prefix.

Add two helper functions, one for returning a prefix length given a
Router Advertisement and the other for generic prefix matching given
an IPv6 prefix and address.
2015-01-27 09:35:24 +02:00
Patrik Flykt 8d7f2c6a47 test-icmp6-rs: Add trivial test case for an MTU that is not present 2015-01-27 09:35:24 +02:00