]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agosystemctl: simplify printing of Triggers/TriggeredBy 13554/head
Zbigniew Jędrzejewski-Szmek [Tue, 5 Nov 2019 21:01:46 +0000 (22:01 +0100)] 
systemctl: simplify printing of Triggers/TriggeredBy

4 years agosystemctl: Align all status outputs to TriggeredBy
Kevin Kuehler [Mon, 4 Nov 2019 22:52:13 +0000 (14:52 -0800)] 
systemctl: Align all status outputs to TriggeredBy

4 years agosystemctl: Add TriggeredBy and Triggers to status
Kevin Kuehler [Mon, 4 Nov 2019 22:48:06 +0000 (14:48 -0800)] 
systemctl: Add TriggeredBy and Triggers to status

For all units that aren't timers, if it is activated by another unit,
add the triggering unit under the  "TriggeredBy:" header. If a unit can
trigger other units, print the units it triggers other the "Triggers:"
header.

4 years agoMerge pull request #13676 from ClydeByrdIII/service-result-patch
Anita Zhang [Tue, 29 Oct 2019 18:35:41 +0000 (11:35 -0700)] 
Merge pull request #13676 from ClydeByrdIII/service-result-patch

Update service result table

4 years agoboot-loader-spec: add devicetree-overlay key
Michael Tretter [Fri, 18 Oct 2019 13:14:35 +0000 (15:14 +0200)] 
boot-loader-spec: add devicetree-overlay key

Device tree overlays are a convenient way to patch device trees, e.g.,
add new devices to a device tree or enable/disable devices. This is
useful for non-discoverable but configurable hardware. Device tree
overlays are commonly used for displays on the Raspberry Pi or for
describing the content of FPGA bitstreams.

Add the devicetree-overlay key to boot loader specification entries to
allow boot loaders to apply overlays.

See #13537

4 years agoMerge pull request #13864 from fbuihuu/no-more-swap-autoactivation
Zbigniew Jędrzejewski-Szmek [Tue, 29 Oct 2019 10:16:45 +0000 (11:16 +0100)] 
Merge pull request #13864 from fbuihuu/no-more-swap-autoactivation

No more swap autoactivation

4 years agonetwork-generator: Add missing help for --root
David Pedersen [Mon, 28 Oct 2019 17:47:14 +0000 (18:47 +0100)] 
network-generator: Add missing help for --root

4 years agocore: drop 'wants' parameter from unit_add_node_dependency() 13864/head
Franck Bui [Mon, 28 Oct 2019 17:50:43 +0000 (18:50 +0100)] 
core: drop 'wants' parameter from unit_add_node_dependency()

Since Wants dependency is no more automagically added to swap and mount units,
this parameter is no more used hence this patch drops it.

4 years agoswap: do not make swap units wanted by its device unit anymore
Franck Bui [Mon, 28 Oct 2019 17:41:59 +0000 (18:41 +0100)] 
swap: do not make swap units wanted by its device unit anymore

It was done for mount units already (see commit 142b8142d7bb84f07). For the
same reasons and for consistency we should also stop activating automagically
swaps when their device is hot-plugged.

4 years agoMerge pull request #13423 from pwithnall/12035-session-time-limits
Zbigniew Jędrzejewski-Szmek [Mon, 28 Oct 2019 13:57:00 +0000 (14:57 +0100)] 
Merge pull request #13423 from pwithnall/12035-session-time-limits

Add `RuntimeMaxSec=` support to scope units (time-limited login sessions)

4 years agomodules-load: do not fail service if modules are not present
Zbigniew Jędrzejewski-Szmek [Sun, 27 Oct 2019 09:00:31 +0000 (10:00 +0100)] 
modules-load: do not fail service if modules are not present

It is pretty common for the service to fail in the initramfs (for example
because certain modules have not been copied over or haven't been built yet in
case of dkms modules). This seems to be more trouble than it is worth. Let's
change the service to simply log any missing modules at error level, but not
fail the whole service.

https://bugzilla.redhat.com/show_bug.cgi?id=1254340

4 years agoMerge pull request #13844 from keszybz/resolved-proprties
Yu Watanabe [Mon, 28 Oct 2019 13:52:16 +0000 (22:52 +0900)] 
Merge pull request #13844 from keszybz/resolved-proprties

Emit dbus PropertyChanged notifications for systemd-resolved

4 years agopid1: order .automount units after local-fs-pre.target
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 14:57:37 +0000 (16:57 +0200)] 
pid1: order .automount units after local-fs-pre.target

From the bug:
> According to the documentation of systemd.automount if the automoint point is
> automagically created if it doesn't exist yet. This ofcourse means the
> filesystem underneath has to be writable, which for / means not only does
> -.mount need to be started but also systemd-remount-fs.service has to be run,
> which isn't guaranteed by the default automount dependencies.
>
> For .mount units there is an automatic default After= dependency on
> local-fs-pre.target, would probably make sense to do the same for automount
> units to avoid it failing on the corner-case where it has to create directory.

Fixes #13306.

4 years agopam_systemd: Forward systemd.runtime_max_sec setting to session scope 13423/head
Philip Withnall [Wed, 12 Jun 2019 08:41:45 +0000 (09:41 +0100)] 
pam_systemd: Forward systemd.runtime_max_sec setting to session scope

Allow earlier PAM modules to set `systemd.runtime_max_sec`. If they do,
parse it and set it as the `RuntimeMaxUSec=` property of the session
scope, to limit the maximum lifetime of the session. This could be
useful for time-limiting login sessions, for example.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #12035
4 years agoscope: Support RuntimeMaxSec= directive in scope units
Philip Withnall [Wed, 12 Jun 2019 07:45:26 +0000 (08:45 +0100)] 
scope: Support RuntimeMaxSec= directive in scope units

Just as `RuntimeMaxSec=` is supported for service units, add support for
it to scope units. This will gracefully kill a scope after the timeout
expires from the moment the scope enters the running state.

This could be used for time-limited login sessions, for example.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #12035
4 years agoMerge pull request #13635 from fbuihuu/no-aliases-with-enable
Zbigniew Jędrzejewski-Szmek [Mon, 28 Oct 2019 08:23:08 +0000 (09:23 +0100)] 
Merge pull request #13635 from fbuihuu/no-aliases-with-enable

man: alias names can't be used with enable command

4 years agopo: update Polish translation
Piotr Drąg [Sat, 26 Oct 2019 14:07:01 +0000 (16:07 +0200)] 
po: update Polish translation

4 years agomeson: expand ternary in functions to if statements
Anita Zhang [Fri, 25 Oct 2019 22:46:21 +0000 (15:46 -0700)] 
meson: expand ternary in functions to if statements

Per https://github.com/mesonbuild/meson/issues/5003, ternary doesn't
always work as function args with older versions of meson.
Expand out ternary statements to stay compatible with older versions (< 0.49).

4 years agoMerge pull request #13846 from keszybz/sleep-config-fixups
Anita Zhang [Fri, 25 Oct 2019 22:33:46 +0000 (15:33 -0700)] 
Merge pull request #13846 from keszybz/sleep-config-fixups

Sleep config fixups

4 years agomeson: allow WatchdogSec= in services to be configured
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 10:17:24 +0000 (12:17 +0200)] 
meson: allow WatchdogSec= in services to be configured

As discussed on systemd-devel [1], in Fedora we get lots of abrt reports
about the watchdog firing [2], but 100% of them seem to be caused by resource
starvation in the machine, and never actual deadlocks in the services being
monitored. Killing the services not only does not improve anything, but it
makes the resource starvation worse, because the service needs cycles to restart,
and coredump processing is also fairly expensive. This adds a configuration option
to allow the value to be changed. If the setting is not set, there is no change.

My plan is to set it to some ridiculusly high value, maybe 1h, to catch cases
where a service is actually hanging.

[1] https://lists.freedesktop.org/archives/systemd-devel/2019-October/043618.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1300212

4 years agoshared/sleep-config: two more error handling fixes, use structured initialization 13846/head
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 15:10:47 +0000 (17:10 +0200)] 
shared/sleep-config: two more error handling fixes, use structured initialization

CID#1406472.

4 years agoshared/sleep-config: fix error handling for open
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 15:02:58 +0000 (17:02 +0200)] 
shared/sleep-config: fix error handling for open

CID#1406472.

4 years agoresolved: emit change for CurrentDNSServer 13844/head
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 14:36:19 +0000 (16:36 +0200)] 
resolved: emit change for CurrentDNSServer

4 years agoresolved: emit change for LLMNRHostname
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 14:29:42 +0000 (16:29 +0200)] 
resolved: emit change for LLMNRHostname

4 years agoresolved: send out notifications about DNS property
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 13:19:36 +0000 (15:19 +0200)] 
resolved: send out notifications about DNS property

Notifications are only sent for the top object, and not for individual
links. This should be enough for the most obvious cases where somebody
just cares about the effective set of servers.

Fixes #13721.

4 years agoresolved: make two functions static
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 05:54:58 +0000 (07:54 +0200)] 
resolved: make two functions static

4 years agoresolved: one less {}
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 13:24:00 +0000 (15:24 +0200)] 
resolved: one less {}

4 years agoresolved: avoid allocation
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 13:14:09 +0000 (15:14 +0200)] 
resolved: avoid allocation

While at it, constify the argument.

4 years agofileio: introduce read_full_virtual_file() for reading virtual files in sysfs, procfs
Franck Bui [Tue, 22 Oct 2019 14:09:21 +0000 (16:09 +0200)] 
fileio: introduce read_full_virtual_file() for reading virtual files in sysfs, procfs

Virtual filesystems such as sysfs or procfs use kernfs, and kernfs can work
with two sorts of virtual files.

One sort uses "seq_file", and the results of the first read are buffered for
the second read. The other sort uses "raw" reads which always go direct to the
device.

In the later case, the content of the virtual file must be retrieved with a
single read otherwise subsequent read might get the new value instead of
finding EOF immediately. That's the reason why the usage of fread(3) is
prohibited in this case as it always performs a second call to read(2) looking
for EOF which is subject to the race described previously.

Fixes: #13585.
4 years agoMerge pull request #13682 from zachsmith/systemd-sleep-prefer-resume-over-priority
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 12:48:12 +0000 (14:48 +0200)] 
Merge pull request #13682 from zachsmith/systemd-sleep-prefer-resume-over-priority

systemd-sleep: prefer resume device or file

4 years agoMerge pull request #13623 from yuwata/network-wifi-iftype
Zbigniew Jędrzejewski-Szmek [Fri, 25 Oct 2019 12:18:23 +0000 (14:18 +0200)] 
Merge pull request #13623 from yuwata/network-wifi-iftype

4 years agonetwork: add default configurations for wireless interfaces 13623/head
Yu Watanabe [Sun, 22 Sep 2019 17:34:52 +0000 (02:34 +0900)] 
network: add default configurations for wireless interfaces

4 years agonetwork: support matching based on wifi interfece type
Yu Watanabe [Fri, 25 Oct 2019 07:29:23 +0000 (16:29 +0900)] 
network: support matching based on wifi interfece type

4 years agovarious tools: be more explicit when a glob is passed when not supported
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 12:09:11 +0000 (14:09 +0200)] 
various tools: be more explicit when a glob is passed when not supported

See https://bugzilla.redhat.com/show_bug.cgi?id=1763488: when we say that
'foo@*.service' is not a valid unit name, this is not clear enough. Let's
include the name of the operation that does not support globbing in the
error message:

$ build/systemctl enable 'foo@*.service'
Glob pattern passed to enable, but globs are not supported for this.
Invalid unit name "foo@*.service" escaped as "foo@\x2a.service".
...

4 years agoresolved: set stream type during DnsStream creation
Dan Streetman [Wed, 23 Oct 2019 18:47:59 +0000 (14:47 -0400)] 
resolved: set stream type during DnsStream creation

The DnsStreamType was added to track different types of DNS TCP streams,
instead of refcounting all of them together.  However, the stream type was
not actually set into the stream->type field, so while the reference count
was correctly incremented per-stream-type, the reference count was always
decremented in the cleanup function for stream type 0, leading to
underflow for the type 0 stream (unsigned) refcount, and preventing new
type 0 streams from being created.

Since type 0 is DNS_STREAM_LOOKUP, which is used to communicate with
upstream nameservers, once the refcount underflows the stub resolver
no longer is able to successfully fall back to TCP upstream lookups
for any truncated UDP packets.

This was found because lookups of A records with a large number of
addresses, too much to fit into a single 512 byte DNS UDP reply,
were causing getaddrinfo() to fall back to TCP and trigger this bug,
which then caused the TCP fallback for later large record lookups
to fail with 'connection timed out; no servers could be reached'.

The stream type was introduced in commit:
652ba568c6624bf40d735645f029d83d21bdeaa6

4 years agoMerge pull request #13836 from systemd/assert-cleanups-and-constification
Yu Watanabe [Fri, 25 Oct 2019 04:36:00 +0000 (13:36 +0900)] 
Merge pull request #13836 from systemd/assert-cleanups-and-constification

Assert cleanups and constification

4 years agomachine-id-setup: avoid unexpected aborting
Chen Qi [Thu, 24 Oct 2019 09:40:05 +0000 (17:40 +0800)] 
machine-id-setup: avoid unexpected aborting

Code should not be reached 'Unhandled option' at src/machine-id-setup/machine-id-setup-main.c:97, function parse_argv(). Aborting.
Aborted

This behaviour is not good and will confuse user.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
4 years agosystemd-sleep: improve /proc/swaps open fail message 13682/head
Zach Smith [Tue, 22 Oct 2019 04:36:27 +0000 (21:36 -0700)] 
systemd-sleep: improve /proc/swaps open fail message

4 years agosystemd-sleep: always prefer resume device or file
Zach Smith [Fri, 27 Sep 2019 04:02:28 +0000 (21:02 -0700)] 
systemd-sleep: always prefer resume device or file

This change checks each swap partition or file reported in /proc/swaps
to see if it matches the values configured with resume= and
resume_offset= kernel parameters. If a match is found, the matching swap
entry is used as the hibernation location regardless of swap priority.

4 years agobasic/fs-util: change CHASE_OPEN flag into a separate output parameter
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 08:33:20 +0000 (10:33 +0200)] 
basic/fs-util: change CHASE_OPEN flag into a separate output parameter

chase_symlinks() would return negative on error, and either a non-negative status
or a non-negative fd when CHASE_OPEN was given. This made the interface quite
complicated, because dependning on the flags used, we would get two different
"types" of return object. Coverity was always confused by this, and flagged
every use of chase_symlinks() without CHASE_OPEN as a resource leak (because it
would this that an fd is returned). This patch uses a saparate output parameter,
so there is no confusion.

(I think it is OK to have functions which return either an error or an fd. It's
only returning *either* an fd or a non-fd that is confusing.)

4 years agotest-socket-util: avoid writing past the defined buffer
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 07:15:29 +0000 (09:15 +0200)] 
test-socket-util: avoid writing past the defined buffer

.sun_path has 108 bytes, and we'd write a string of 108 bytes + NUL.
I added this test, but I don't know what it was supposed to test. Let's
just remove.

Fixes #13713. CID#1405854.

4 years agosd-dhcp-client: do not call assert in public functions 13836/head
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 10:04:48 +0000 (12:04 +0200)] 
sd-dhcp-client: do not call assert in public functions

4 years agosd-dhcp-client: remove unnecessary cleanup function
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 10:00:07 +0000 (12:00 +0200)] 
sd-dhcp-client: remove unnecessary cleanup function

https://github.com/systemd/systemd/pull/13663#discussion_r335327099

4 years agosd-netlink: constify object pointers passed to getters
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 09:40:44 +0000 (11:40 +0200)] 
sd-netlink: constify object pointers passed to getters

sd-netlink is not public yet, so we can change the interface.

I did not touch interfaces of functions like sd_netlink_wait() and
sd_rtnl_message_new_link() which do not modify the object that is passed in,
because in the future we might want to change the code to e.g. take a
reference to the parent object or otherwise require a non-const reference.

4 years agosd-device: allow sd_device_get_devtype to be called with NULL arg and do not assert
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 15:49:03 +0000 (17:49 +0200)] 
sd-device: allow sd_device_get_devtype to be called with NULL arg and do not assert

We shouldn't call assert() on user-specified arguments in public functions.
While at it, let's return 1 if the type exists, and 0 otherwise.

4 years agoMove PLYMOUTH_SOCKET define to def.h and nuke plymouth-util.h
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 09:18:35 +0000 (11:18 +0200)] 
Move PLYMOUTH_SOCKET define to def.h and nuke plymouth-util.h

Let's not have a file with a single define.

4 years agoRemove unused plymouth_running() function
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 20:56:24 +0000 (22:56 +0200)] 
Remove unused plymouth_running() function

4 years agoMerge pull request #13452 from yuwata/network-reload
Zbigniew Jędrzejewski-Szmek [Thu, 24 Oct 2019 09:07:24 +0000 (11:07 +0200)] 
Merge pull request #13452 from yuwata/network-reload

network: add networkctl reload and reconfigure

4 years agotest: drop duplicated 's'
Yu Watanabe [Thu, 24 Oct 2019 02:08:48 +0000 (11:08 +0900)] 
test: drop duplicated 's'

This fixes the following log message
```
Container TEST-07-ISSUE-1981 terminated by signal KILL.
E: test timed out after 30s s
```

4 years agonetwork: add tests for "networkctl reconfigure" 13452/head
Yu Watanabe [Sun, 8 Sep 2019 11:35:05 +0000 (20:35 +0900)] 
network: add tests for "networkctl reconfigure"

4 years agonetworkctl: introduce reconfigure method
Yu Watanabe [Wed, 23 Oct 2019 13:36:04 +0000 (22:36 +0900)] 
networkctl: introduce reconfigure method

4 years agonetworkctl: use format_ifname_full()
Yu Watanabe [Sun, 8 Sep 2019 10:45:58 +0000 (19:45 +0900)] 
networkctl: use format_ifname_full()

4 years agonetworkctl: fix error message
Yu Watanabe [Sun, 8 Sep 2019 09:32:54 +0000 (18:32 +0900)] 
networkctl: fix error message

4 years agoformat-util: introduce format_ifname_full()
Yu Watanabe [Sun, 8 Sep 2019 10:42:32 +0000 (19:42 +0900)] 
format-util: introduce format_ifname_full()

4 years agonetwork: introduce Reconfigure() bus method
Yu Watanabe [Wed, 23 Oct 2019 13:32:27 +0000 (22:32 +0900)] 
network: introduce Reconfigure() bus method

4 years agonetwork: include netinet/in.h to fix build error
Yu Watanabe [Mon, 2 Sep 2019 14:48:21 +0000 (23:48 +0900)] 
network: include netinet/in.h to fix build error

4 years agotest-network: add tests for "networkctl reload"
Yu Watanabe [Mon, 2 Sep 2019 13:40:31 +0000 (22:40 +0900)] 
test-network: add tests for "networkctl reload"

4 years agonetworkctl: add reload command
Yu Watanabe [Wed, 23 Oct 2019 13:24:42 +0000 (22:24 +0900)] 
networkctl: add reload command

4 years agonetwork: also reload .netdev files
Yu Watanabe [Mon, 2 Sep 2019 12:48:08 +0000 (21:48 +0900)] 
network: also reload .netdev files

4 years agonetwork: add Reload() dbus method
Yu Watanabe [Wed, 23 Oct 2019 13:20:48 +0000 (22:20 +0900)] 
network: add Reload() dbus method

4 years agoMerge pull request #13828 from keszybz/networkctl-print-wlan
Yu Watanabe [Thu, 24 Oct 2019 02:12:39 +0000 (11:12 +0900)] 
Merge pull request #13828 from keszybz/networkctl-print-wlan

networkctl support for ssid and bssid

4 years agoudev/cdrom_id: Do not open CD-rom in exclusive mode.
Michal Suchanek [Sun, 20 Oct 2019 10:12:20 +0000 (12:12 +0200)] 
udev/cdrom_id: Do not open CD-rom in exclusive mode.

When you have a CD automunt solution that talks directly to the kernel
independently of udev it races with cdrom_id for exclusive access to the
device failing unpredictably.

The whole is_mounted function in cdrom_id is broken: there is no saying
what happens between calling is_mounted and opening the device.

Hence assume that the device can be mounted asynchronously at any time,
do not use exclusive access, and do away with is_mouted.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
4 years agonetworkctl: print ssid and bssid 13828/head
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 15:05:33 +0000 (17:05 +0200)] 
networkctl: print ssid and bssid

4 years agonetworkctl: create the sd_device structure just once
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 15:02:18 +0000 (17:02 +0200)] 
networkctl: create the sd_device structure just once

This is mostly in preparation for future changes: a proper freeing function
is now called on the LinkInfo items.

4 years agonetwork: split out functions to get ssid and bssid
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 11:01:35 +0000 (13:01 +0200)] 
network: split out functions to get ssid and bssid

4 years agoMerge pull request #13807 from 1848/ip6gre_key_fix
Yu Watanabe [Wed, 23 Oct 2019 14:18:59 +0000 (23:18 +0900)] 
Merge pull request #13807 from 1848/ip6gre_key_fix

networkd: Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.

4 years agol10n(zh_TW): update translations
pan93412 [Wed, 23 Oct 2019 11:19:54 +0000 (19:19 +0800)] 
l10n(zh_TW): update translations

4 years agorun: add -u as a synonym for --unit
David Tardon [Wed, 23 Oct 2019 07:13:15 +0000 (09:13 +0200)] 
run: add -u as a synonym for --unit

Other tools that do have --unit= option (journalctl and systemd-cgls)
already do this, so let's be consistent.

4 years agoMerge pull request #13825 from keszybz/nspawn-console-help
Yu Watanabe [Wed, 23 Oct 2019 13:03:53 +0000 (22:03 +0900)] 
Merge pull request #13825 from keszybz/nspawn-console-help

nspawn: fix handling of --console=help

4 years agoMerge pull request #13142 from yuwata/network-wifi-ssid-support-nl80211
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 12:51:23 +0000 (14:51 +0200)] 
Merge pull request #13142 from yuwata/network-wifi-ssid-support-nl80211

network: wifi ssid support with nl80211

4 years agonetworkctl: split out helper function
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 10:24:42 +0000 (12:24 +0200)] 
networkctl: split out helper function

4 years agonetworkctl: show carrier in green for loopback iface
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 09:10:32 +0000 (11:10 +0200)] 
networkctl: show carrier in green for loopback iface

We don't ever expect anything different, so let's hightlight
that carrier in this case is OK.

4 years agoman: reorder description of nspawn --console 13825/head
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 08:13:30 +0000 (10:13 +0200)] 
man: reorder description of nspawn --console

The default value was described at the end of two long paragraphs.
Make the first para self contained, and move the description of --console=pipe
into the second para.

4 years agonspawn: fix handling of --console=help
Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 07:20:46 +0000 (09:20 +0200)] 
nspawn: fix handling of --console=help

We shouldn't continue to run the container after printing help.

4 years agoMerge pull request #13820 from keszybz/dead-code-removal
Yu Watanabe [Wed, 23 Oct 2019 07:11:27 +0000 (16:11 +0900)] 
Merge pull request #13820 from keszybz/dead-code-removal

Dead code removal

4 years agoAdded ip6gre example to man 13807/head
1848 [Tue, 22 Oct 2019 15:41:10 +0000 (17:41 +0200)] 
Added ip6gre example to man

4 years agoRevert "sysusers: properly mark generated accounts as locked"
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 14:26:42 +0000 (16:26 +0200)] 
Revert "sysusers: properly mark generated accounts as locked"

This reverts the gist of commit 636e72bce63e7e99b76357f7d524d16f61558775.
The comment and the tiny cleanup are left alone.

We shouldn't lock the accounts because people actually need to use them, and
if they are locked, various tools will refuse.
See https://github.com/systemd/systemd/pull/13277#issuecomment-529964578
and follow-up comments.

4 years agojournal: Consistently capitalize printed header entries
Thibault Nélis [Mon, 21 Oct 2019 18:37:08 +0000 (20:37 +0200)] 
journal: Consistently capitalize printed header entries

Per comments in https://github.com/systemd/systemd/pull/13808.

4 years agoRemove unprintable non-ASCII char from special glyph ASCII fallback table
Marko Myllynen [Mon, 21 Oct 2019 18:58:51 +0000 (21:58 +0300)] 
Remove unprintable non-ASCII char from special glyph ASCII fallback table

4 years agoMerge pull request #13811 from keszybz/logind-signal-emitting-fix
Anita Zhang [Tue, 22 Oct 2019 00:13:57 +0000 (17:13 -0700)] 
Merge pull request #13811 from keszybz/logind-signal-emitting-fix

Logind signal emitting fix

4 years agoupdate-utmp: remove dead conditional 13820/head
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 18:58:18 +0000 (20:58 +0200)] 
update-utmp: remove dead conditional

Coverity was complaining that runlevel>0 is guaranteed at this point.
CID #1404262.

While at it, shorten the code a bit.

4 years agotty-ask-password: fix dead code path
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 18:52:18 +0000 (20:52 +0200)] 
tty-ask-password: fix dead code path

Coverity was complaining that watch==1 always at this point.
CID #1405882.

Use structured initialization while at it.

4 years agojournal-remote: reduce scope of variable
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 17:43:07 +0000 (19:43 +0200)] 
journal-remote: reduce scope of variable

https://github.com/systemd/systemd/pull/11953/files#r264188513

4 years agoresolved: fix connection failures with TLS 1.3 and GnuTLS
Peter Wu [Sun, 20 Oct 2019 17:10:31 +0000 (18:10 +0100)] 
resolved: fix connection failures with TLS 1.3 and GnuTLS

Prefer TLS 1.3 before TLS 1.2 for DNS-over-TLS support, otherwise
servers compliant with RFC 8446 might end up agreeing TLS 1.2 plus a
downgrade signal which is not expected by GnuTLS clients. This manifests
in the following error:

    Failed to invoke gnutls_handshake: An illegal parameter has been received.

Fixes: #13528
Fixes: v242-962-g9c0624dcdb ("resolved: support TLS 1.3 when using GnuTLS for DNS-over-TLS")
4 years agohwdb: Add Medion Akoya E2215T MD60198 sensor orientation quirk
Hans de Goede [Sat, 19 Oct 2019 11:29:37 +0000 (13:29 +0200)] 
hwdb: Add Medion Akoya E2215T MD60198 sensor orientation quirk

Add sensor orientation quirk for the Medion Akoya E2215T so that
desktop-environments show their graphics the right way up.

4 years agomailmap: add entry to fix authorship of commit 13811/head
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:10:50 +0000 (15:10 +0200)] 
mailmap: add entry to fix authorship of commit

471cffcfb0e005b7c4044b3b52cc4f25d217efac was committed on a debug VM where I
didn't have git set up properly.

4 years agologind: fix emission of PropertiesChanged for users
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:07:36 +0000 (15:07 +0200)] 
logind: fix emission of PropertiesChanged for users

The same as parent commit, but users. This is the third and last
foo_object_find() function in logind, so I think that this particular
family of bugs is finally squashed.

4 years agologind: fix emission of PropertiesChanged on seats
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:05:58 +0000 (15:05 +0200)] 
logind: fix emission of PropertiesChanged on seats

The story is the same as in 471cffcfb0e005b7c4044b3b52cc4f25d217efac:
device_attach() → seat_send_changed() → sd_bus_emit_properties_changed_strv()
→ emit_properties_changed_on_interface() → node_vtable_get_userdata()
→ seat_object_find(), which returns 0 because message == NULL.
But when we are emitting a signal, message is always NULL. Removing the
overeager check and assert in the called function allow the signal to be
emitted.

Fixes #13769.

4 years agologind: drop {}
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 07:33:19 +0000 (09:33 +0200)] 
logind: drop {}

4 years agoAdd Schneider SCT101CTM to sensor hwdb
Daniel [Sun, 20 Oct 2019 23:48:34 +0000 (01:48 +0200)] 
Add Schneider SCT101CTM to sensor hwdb

4 years agoSet key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.
1848 [Sat, 19 Oct 2019 22:25:58 +0000 (00:25 +0200)] 
Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.

4 years agoudev: tag any display devices as master-of-seat when nomodeset is used
Zbigniew Jędrzejewski-Szmek [Thu, 17 Oct 2019 10:37:12 +0000 (12:37 +0200)] 
udev: tag any display devices as master-of-seat when nomodeset is used

Fixes #13773. See also https://bugzilla.redhat.com/show_bug.cgi?id=1728240,
https://github.com/sddm/sddm/issues/1204.

When nomodeset is used on the kernel command line, there is no graphics
device that the kernel knows, so we don't tag anything as master-of-seat,
and seat0 has CanGraphical=no.

$ loginctl seat-status seat0 ; loginctl show-seat seat0
seat0
         Devices:
                  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
                  │ input:input0 "Power Button"
                  ├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1
                  │ usb:usb1
                  │ └─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input4
                  │   input:input4 "QEMU QEMU USB Tablet"
                  ├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2
                  │ usb:usb2
                  ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
                  │ sound:card0 "Intel"
                  ├─/sys/devices/platform/i8042/serio0/input/input1
                  │ input:input1 "AT Translated Set 2 keyboard"
                  │ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::capslock
                  │ │ leds:input1::capslock
                  │ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::numlock
                  │ │ leds:input1::numlock
                  │ └─/sys/devices/platform/i8042/serio0/input/input1/input1::scrolllock
                  │   leds:input1::scrolllock
                  └─/sys/devices/platform/i8042/serio1/input/input3
                    input:input3 "ImExPS/2 Generic Explorer Mouse"
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=no
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0

Let's tag the PCI device with "master-of-seat", so we get CanGraphical=yes, and "seat",
so it is show as part of the seat:

[fedora@f31-bios ~]$ loginctl seat-status seat0 ; loginctl show-seat seat0
seat0
         Devices:
                  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
                  │ input:input0 "Power Button"
                  ├─/sys/devices/pci0000:00/0000:00:01.0
                  │ [MASTER] pci:0000:00:01.0
                  ├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1
                  │ usb:usb1
                  │ └─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input4
                  │   input:input4 "QEMU QEMU USB Tablet"
                  ├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2
                  │ usb:usb2
                  ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
                  │ sound:card0 "Intel"
                  ├─/sys/devices/platform/i8042/serio0/input/input1
                  │ input:input1 "AT Translated Set 2 keyboard"
                  │ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::capslock
                  │ │ leds:input1::capslock
                  │ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::numlock
                  │ │ leds:input1::numlock
                  │ └─/sys/devices/platform/i8042/serio0/input/input1/input1::scrolllock
                  │   leds:input1::scrolllock
                  └─/sys/devices/platform/i8042/serio1/input/input3
                    input:input3 "ImExPS/2 Generic Explorer Mouse"
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=yes
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0

4 years agoMerge pull request #13795 from ddstreet/test-41
Anita Zhang [Sat, 19 Oct 2019 01:36:48 +0000 (18:36 -0700)] 
Merge pull request #13795 from ddstreet/test-41

WIP: test: debug TEST-41 failure on Ubuntu CI

4 years agotest: correct TEST-41 StartLimitBurst test 13795/head
Dan Streetman [Thu, 17 Oct 2019 15:06:18 +0000 (11:06 -0400)] 
test: correct TEST-41 StartLimitBurst test

TEST-41 verifies that the StartLimitBurst property will correctly
limit the number of unit restarts, but the test currently doesn't
adjust the StartLimitIntervalSec which defaults to 10 seconds.

On Ubuntu CI, running under un-accelerated qemu, it can take more than
10 seconds to perform all 3 restarts, which avoids the burst limit,
and fails the test.

Instead, specify a long StartLimitIntervalSec in the test, so we can
be sure to correctly test StartLimitBurst even on slow testbeds.

Fixes #13794.

4 years agoadd test for ExecStopPost
David Tardon [Thu, 3 Oct 2019 17:05:06 +0000 (19:05 +0200)] 
add test for ExecStopPost

This is a follow-up to #4843.

4 years agosystemd-fsck: fix systemd-fsck/fsck pipe bad closure
Benjamin Bouvier [Tue, 1 Oct 2019 09:12:10 +0000 (12:12 +0300)] 
systemd-fsck: fix systemd-fsck/fsck pipe bad closure

Currently, when console is disabled but progress is tracked, pipe opened
for communication between systemd-fsck and fsck may be closed
inadvertently (when opening of /dev/console return in error). That lead
to finish fsck prematurely (because it receives a SIGPIPE) and so fsck
may not check correctly filesystems and do not have time to fix memory
corruptions.

This commit changes the opening of /dev/console to be done previously to
pipe creation and so fix the bug described just above.

4 years agocoredump: Include module offsets in stack traces
Aaron Plattner [Thu, 17 Oct 2019 19:56:15 +0000 (12:56 -0700)] 
coredump: Include module offsets in stack traces

These offsets can be useful to decode stack traces through modules that don't
have symbol names. For example, with a simple test that crashes after calling
through several static functions, systemd-coredump reports this:

 Oct 17 : Process 640333 (a.out) of user 1000 dumped core.

          Stack trace of thread 640333:
          #0  0x00005562c2b9f11d n/a (/tmp/a.out)
          #1  0x00005562c2b9f12d n/a (/tmp/a.out)
          #2  0x00005562c2b9f139 n/a (/tmp/a.out)
          #3  0x00005562c2b9f145 n/a (/tmp/a.out)
          #4  0x00007fc768b39153 __libc_start_main (libc.so.6)
          #5  0x00005562c2b9f04e n/a (/tmp/a.out)

With this change:

          Stack trace of thread 666897:
          #0  0x0000555668fbe11d n/a (/tmp/a.out + 0x111d)
          #1  0x0000555668fbe12d n/a (/tmp/a.out + 0x112d)
          #2  0x0000555668fbe139 n/a (/tmp/a.out + 0x1139)
          #3  0x0000555668fbe145 n/a (/tmp/a.out + 0x1145)
          #4  0x00007f7b5c828153 __libc_start_main (libc.so.6 + 0x27153)
          #5  0x0000555668fbe04e n/a (/tmp/a.out + 0x104e)

Disassembling the test binary shows that these offsets line up:

 0000000000001119 <crash>:
     1119:      55                      push   %rbp
     111a:      48 89 e5                mov    %rsp,%rbp
     111d:      0f 0b                   ud2                 <---- #0

 000000000000111f <b>:
     111f:      55                      push   %rbp
     1120:      48 89 e5                mov    %rsp,%rbp
     1123:      b8 00 00 00 00          mov    $0x0,%eax
     1128:      e8 ec ff ff ff          callq  1119 <crash>
     112d:      90                      nop                 <---- #1
     112e:      5d                      pop    %rbp
     112f:      c3                      retq

 0000000000001130 <a>:
     1130:      55                      push   %rbp
     1131:      48 89 e5                mov    %rsp,%rbp
     1134:      e8 e6 ff ff ff          callq  111f <b>
     1139:      90                      nop                 <---- #2
     113a:      5d                      pop    %rbp
     113b:      c3                      retq

 000000000000113c <main>:
     113c:      55                      push   %rbp
     113d:      48 89 e5                mov    %rsp,%rbp
     1140:      e8 eb ff ff ff          callq  1130 <a>
     1145:      b8 00 00 00 00          mov    $0x0,%eax    <---- #3
     114a:      5d                      pop    %rbp
     114b:      c3                      retq
     114c:      0f 1f 40 00             nopl   0x0(%rax)

 (from libc.so.6)
 0000000000027060 <__libc_start_main>:
   27060: f3 0f 1e fa           endbr64
   27064: 41 56                 push   %r14
   27066: 31 c0                 xor    %eax,%eax
   [...]
   2714c: 48 8b 44 24 18        mov    0x18(%rsp),%rax
   27151: ff d0                 callq  *%rax
   27153: 89 c7                 mov    %eax,%edi    <---- #4
   27155: e8 e6 76 01 00        callq  3e840 <exit>

4 years agotest: blacklist TEST-41 on Ubuntu CI
Dan Streetman [Thu, 17 Oct 2019 18:06:43 +0000 (14:06 -0400)] 
test: blacklist TEST-41 on Ubuntu CI

This test has been failing on Ubuntu CI since introduced, let's
blacklist it until we can debug what's causing it to fail.

4 years agoceph is a network filesystem
Jonas Jelten [Thu, 17 Oct 2019 10:10:13 +0000 (12:10 +0200)] 
ceph is a network filesystem

4 years agorule-syntax-check: add CONST
Jan Synacek [Thu, 17 Oct 2019 08:52:38 +0000 (10:52 +0200)] 
rule-syntax-check: add CONST