platform/upstream/systemd.git
5 years agondisc: make first solicit delayed randomly
Yu Watanabe [Fri, 6 Sep 2019 18:36:19 +0000 (03:36 +0900)]
ndisc: make first solicit delayed randomly

Closes #13460.

5 years agodhcp6: read OPTION_INFORMATION_REFRESH_TIME option
Yu Watanabe [Fri, 6 Sep 2019 18:29:46 +0000 (03:29 +0900)]
dhcp6: read OPTION_INFORMATION_REFRESH_TIME option

Fixes #13460.

5 years agosemaphore: switch to another keyserver
Evgeny Vereshchagin [Fri, 6 Sep 2019 13:11:38 +0000 (13:11 +0000)]
semaphore: switch to another keyserver

lxc-create has been failing to download the image today with
```
+ sudo lxc-create -n buster-amd64 -t download -- -d debian -r buster -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: buster-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: buster-amd64: tools/lxc_create.c: main: 327 Failed to create container buster-amd64
```
Let's try another keyserver.

5 years agojournal: Make the output of --update-catalog deterministic
Daniel Edgecumbe [Thu, 5 Sep 2019 14:34:52 +0000 (15:34 +0100)]
journal: Make the output of --update-catalog deterministic

The use of an unordered hashmap means that the output of
'journalctl --update-catalog' differs between runs despite there being no
changes in the input files.

By changing all instances of Hashmap to OrderedHashmap we fix this, and now
the catalog is reproducible.

Motivation: https://reproducible-builds.org

Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com>
5 years agoMerge pull request #13484 from evverx/look-at-repo-slug
Zbigniew Jędrzejewski-Szmek [Fri, 6 Sep 2019 06:49:09 +0000 (08:49 +0200)]
Merge pull request #13484 from evverx/look-at-repo-slug

travis: protect the systemd organization on Fuzzit from forks

5 years agotravis: protect the systemd organization on Fuzzit from forks
Evgeny Vereshchagin [Fri, 6 Sep 2019 01:44:52 +0000 (01:44 +0000)]
travis: protect the systemd organization on Fuzzit from forks

Now that v243 is out, the script has been pulled by forks that are
activated on Travis CI. As a result, all those forks have started to send
their fuzzers to Fuzzit inadvertantly consuming our CPUs along the way.
Let's prevent this by bailing out early if the script is run outside of
the systemd repository.

5 years agohwdb: Mark lis3lv02d sensors in HP laptops as being in the base
Hans de Goede [Thu, 5 Sep 2019 12:16:12 +0000 (14:16 +0200)]
hwdb: Mark lis3lv02d sensors in HP laptops as being in the base

The lis3lv02d sensor used in many HP laptops is (almost) always intented
primarily for freefall detection / HDD protection and (almost) always
is located in the base of a classic clamshell laptop

Before we had the ACCEL_LOCATION udev property the issues this caused
with screen-rotation were fixed by applying a mount-matrix which
translates base-coordinates to display-coordinates assuming the display
is at an angle of exact 90 degrees to the base (swap Y and Z axis).

The comment calls this translate "from "can play neverball" to
"matches Windows 8 orientation"" but what it really does is translate
base accel-axis to display accel-axis. Thus allows rotating the screen
if you put the laptop on its side, but no-one normally does that with
a 2Kg clamshell laptop.

The obviously correct thing to do on classic clamshell laptops (not 2-in-1s)
is to disable automatic screen rotation. This commit marks the accelerometer
in these laptops as being part of the base, which will make iio-sensor-proxy
disable automatic screen rotation.

This commit also removes the orientation-matrix since the unmodified coordinates
coming from the sensor are oriented correctly for a sensor in the base.

Also see the "Bad accelerometer values cause incorrect screen rotation"
systemd-devel mail-thread from September 2019.

5 years agopo: update Japanese translation
Yu Watanabe [Wed, 4 Sep 2019 00:16:40 +0000 (09:16 +0900)]
po: update Japanese translation

5 years agodocs: fix push recipe in RELEASE.md
Zbigniew Jędrzejewski-Szmek [Tue, 3 Sep 2019 09:34:09 +0000 (11:34 +0200)]
docs: fix push recipe in RELEASE.md

5 years agoman/systemctl.xml: fix missing "not"
Carlo Teubner [Wed, 4 Sep 2019 17:58:56 +0000 (18:58 +0100)]
man/systemctl.xml: fix missing "not"

5 years agodocs: fix typo in boot loader doc
nikolas [Wed, 4 Sep 2019 16:21:14 +0000 (12:21 -0400)]
docs: fix typo in boot loader doc

5 years agopstore: fix typo in error message - directoy -> directory
nikolas [Wed, 4 Sep 2019 16:07:06 +0000 (12:07 -0400)]
pstore: fix typo in error message - directoy -> directory

5 years agoFix typo in comment: overide -> override
nikolas [Wed, 4 Sep 2019 16:03:56 +0000 (12:03 -0400)]
Fix typo in comment: overide -> override

5 years agopo: update Polish translation
Piotr Drąg [Tue, 3 Sep 2019 17:05:27 +0000 (19:05 +0200)]
po: update Polish translation

5 years agoUpdate NEWS for v243 v243
Zbigniew Jędrzejewski-Szmek [Tue, 3 Sep 2019 09:15:37 +0000 (11:15 +0200)]
Update NEWS for v243

5 years agoNEWS: update contributors list
Zbigniew Jędrzejewski-Szmek [Tue, 3 Sep 2019 08:42:00 +0000 (10:42 +0200)]
NEWS: update contributors list

5 years agoMerge pull request #13457 from keszybz/resolved-issue
Zbigniew Jędrzejewski-Szmek [Tue, 3 Sep 2019 09:27:03 +0000 (11:27 +0200)]
Merge pull request #13457 from keszybz/resolved-issue

5 years agoMerge pull request #13440 from keszybz/failing-condtion-check
Zbigniew Jędrzejewski-Szmek [Tue, 3 Sep 2019 08:04:05 +0000 (10:04 +0200)]
Merge pull request #13440 from keszybz/failing-condtion-check

Revert "core: check start limit on condition checks too"

5 years agologind: fix property emission on Sessions
Your Name [Mon, 2 Sep 2019 15:54:36 +0000 (17:54 +0200)]
logind: fix property emission on Sessions

We would not send the property because we'd call sd_bus_get_current_message()
which would return NULL. If there is no message, we cannot support /self or
/auto, but things are still OK if a path with a session name is given.

Traceback when the issue is triggered:

 #2  we'd call sd_bus_get_current_message() here, which would return NULL, and
     session_object_find() would immediately return 0.
 #3  0x00000000004289b7 in session_object_find (bus=0x9f1110, path=0xa160b0 "/org/freedesktop/login1/session/c2",
     interface=0x9efda0 "org.freedesktop.login1.Session", userdata=0x9852f0, found=0x7ffe3e975fe8, error=0x7ffe3e9760b0)
     at ../src/login/logind-session-dbus.c:620
 #4  0x00007ff74bfdde39 in node_vtable_get_userdata (bus=0x9f1110, path=0xa160b0 "/org/freedesktop/login1/session/c2",
     c=0x9f6d58, userdata=0x7ffe3e976070, error=0x7ffe3e9760b0) at ../src/libsystemd/sd-bus/bus-objects.c:37
 #5  0x00007ff74bfe49af in emit_properties_changed_on_interface (bus=0x9f1110,
     prefix=0xa133a0 "/org/freedesktop/login1/session", path=0xa160b0 "/org/freedesktop/login1/session/c2",
     interface=0x43f9f8 "org.freedesktop.login1.Session", require_fallback=true, found_interface=0x7ffe3e976163,
     names=0x7ffe3e9761b0) at ../src/libsystemd/sd-bus/bus-objects.c:2088
 #6  0x00007ff74bfe56a4 in sd_bus_emit_properties_changed_strv (bus=0x9f1110,
     path=0xa160b0 "/org/freedesktop/login1/session/c2", interface=0x43f9f8 "org.freedesktop.login1.Session",
     names=0x7ffe3e9761b0) at ../src/libsystemd/sd-bus/bus-objects.c:2291
 #7  0x00000000004292ea in session_send_changed (s=0xa16e10, properties=0x43ee27 "Active")
    at ../src/login/logind-session-dbus.c:730
 #8  0x0000000000424cd7 in seat_set_active (s=0x9ee280, session=0xa16e10) at ../src/login/logind-seat.c:249
 #9  0x00000000004251cf in seat_active_vt_changed (s=0x9ee280, vtnr=3) at ../src/login/logind-seat.c:361
 #10 0x000000000042547b in seat_read_active_vt (s=0x9ee280) at ../src/login/logind-seat.c:395
 #11 0x000000000040ab5c in manager_dispatch_console (s=0x9f0320, fd=8, revents=8, userdata=0x9852f0)
     at ../src/login/logind.c:588
 #12 0x00007ff74c042d5f in source_dispatch (s=0x9f0320) at ../src/libsystemd/sd-event/sd-event.c:2828
 #13 0x00007ff74c04469f in sd_event_dispatch (e=0x9ef340) at ../src/libsystemd/sd-event/sd-event.c:3241
 #14 0x00007ff74c044b58 in sd_event_run (e=0x9ef340, timeout=18446744073709551615)
     at ../src/libsystemd/sd-event/sd-event.c:3299
 #15 0x000000000040d7e8 in manager_run (m=0x9852f0) at ../src/login/logind.c:1186
 #16 0x000000000040db58 in run (argc=1, argv=0x7ffe3e976728) at ../src/login/logind.c:1234
 #17 0x000000000040dc30 in main (argc=1, argv=0x7ffe3e976728) at ../src/login/logind.c:1244

Fixes #13437. Bug introduced in 3b92c086a8d5338e2164ffa0ae48b3d03d10cfb5.

5 years agologin: fix use after free
Yu Watanabe [Mon, 2 Sep 2019 16:55:46 +0000 (01:55 +0900)]
login: fix use after free

id is basename(state_file)

5 years agohwdb: Add HP Elitebook 850 G3 laptop accelerometer location quirk
Jan-Michael Brummer [Mon, 2 Sep 2019 15:04:07 +0000 (17:04 +0200)]
hwdb: Add HP Elitebook 850 G3 laptop accelerometer location quirk

5 years agoshell-completion: do not truncate suggestions
Yu Watanabe [Sat, 31 Aug 2019 18:20:41 +0000 (03:20 +0900)]
shell-completion: do not truncate suggestions

5 years agonetwork: adjust log level when DHCPv4 lease lost
Yu Watanabe [Sat, 31 Aug 2019 18:49:17 +0000 (03:49 +0900)]
network: adjust log level when DHCPv4 lease lost

5 years agoGenerate stable machine-id and DHCP client ID on POWER KVM.
Dimitri John Ledkov [Mon, 15 Apr 2019 14:07:52 +0000 (15:07 +0100)]
Generate stable machine-id and DHCP client ID on POWER KVM.

5 years agoMerge pull request #13385 from yuwata/core-remove-private-directories-13355
Zbigniew Jędrzejewski-Szmek [Sat, 31 Aug 2019 07:28:39 +0000 (09:28 +0200)]
Merge pull request #13385 from yuwata/core-remove-private-directories-13355

core: also remove private directories by systemctl clean

5 years agoman: list possible action string and default value
Yu Watanabe [Sat, 31 Aug 2019 04:57:34 +0000 (13:57 +0900)]
man: list possible action string and default value

Closes #13442.

5 years agoAdd HP Elite x2 1013 G3 touchpad as external
RussianNeuroMancer [Fri, 30 Aug 2019 15:23:30 +0000 (23:23 +0800)]
Add HP Elite x2 1013 G3 touchpad as external

HP Elite x2 1013 G3 have external touchpad: http://h10032.www1.hp.com/ctg/Manual/c06077534 (page 12)

Marking it as external resolve this issue: https://gitlab.freedesktop.org/libinput/libinput/issues/351

5 years agoMerge pull request #13436 from systemd/hidden-units-are-good-units
Yu Watanabe [Fri, 30 Aug 2019 17:53:54 +0000 (02:53 +0900)]
Merge pull request #13436 from systemd/hidden-units-are-good-units

Hidden units are good units

5 years agoDrop dbus activation stub service
Michael Biebl [Fri, 23 Aug 2019 21:34:45 +0000 (23:34 +0200)]
Drop dbus activation stub service

This fixes the following problem:

> At the very end of the boot, just after the first user logs in
> (usually using sddm / X) I get the following messages in my logs:
> Nov 18 07:02:33 samd dbus-daemon[2879]: [session uid=1000 pid=2877] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
> Nov 18 07:02:33 samd dbus-daemon[2879]: [session uid=1000 pid=2877] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1

These messages are caused by the "stub" service files that systemd
installs. It installed them because early versions of systemd activation
required them to exist.

Since dbus 1.11.0, a dbus-daemon that is run with --systemd-activation
automatically assumes that o.fd.systemd1 is an activatable
service. As a result, with a new enough dbus version,
/usr/share/dbus-1/services/org.freedesktop.systemd1.service and
/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service should
become unnecessary, and they can be removed.

dbus 1.11.0 was released 2015-12-02.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914015

5 years agoRevert "core: check start limit on condition checks too"
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 16:21:05 +0000 (18:21 +0200)]
Revert "core: check start limit on condition checks too"

This reverts commit 2de9b9793b91f492141f090dcc89445511e94bd4.

This check causes regressions, in particular our own units fail. Apparently, it
is enough for the unit to be referenced enough times:

$ journalctl -b -u systemd-ask-password-console.path
Aug 30 12:08:14 krowka systemd[1]: Condition check resulted in Dispatch Password Requests to Console Directory Watch being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in Dispatch Password Requests to Console Directory Watch being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in Dispatch Password Requests to Console Directory Watch being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in Dispatch Password Requests to Console Directory Watch being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in Dispatch Password Requests to Console Directory Watch being skipped.
Aug 30 12:08:33 krowka systemd[1]: systemd-ask-password-console.path: Start request repeated too quickly.
Aug 30 12:08:33 krowka systemd[1]: Failed to start Dispatch Password Requests to Console Directory Watch.

$ journalctl -b -u systemd-firstboot.service
-- Logs begin at Sun 2019-04-21 12:39:21 CEST, end at Fri 2019-08-30 12:23:06 CEST. --
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in First Boot Wizard being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in First Boot Wizard being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in First Boot Wizard being skipped.
Aug 30 12:08:33 krowka systemd[1]: Condition check resulted in First Boot Wizard being skipped.
Aug 30 12:08:33 krowka systemd[1]: systemd-firstboot.service: Start request repeated too quickly.
Aug 30 12:08:33 krowka systemd[1]: Failed to start First Boot Wizard.

And the same for other units.

Fixes #13434.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935829

5 years agoshared/virt: update link to vmware article
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 11:09:23 +0000 (13:09 +0200)]
shared/virt: update link to vmware article

As suggested in https://github.com/systemd/systemd/pull/13430#issuecomment-526551085.

5 years agoshared/unit-files: only put valid unit paths and dropin dirs in the cache
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 12:10:42 +0000 (14:10 +0200)]
shared/unit-files: only put valid unit paths and dropin dirs in the cache

5 years agoshared/unit-files: we must not filter out names starting with a dot
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 12:10:08 +0000 (14:10 +0200)]
shared/unit-files: we must not filter out names starting with a dot

Fixes #13380.

5 years agodocs: describe valid unit names in systemd.unit(5)
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 11:52:33 +0000 (13:52 +0200)]
docs: describe valid unit names in systemd.unit(5)

5 years agoenvironment-d-generator: output logs in debug mode
Zbigniew Jędrzejewski-Szmek [Mon, 26 Aug 2019 20:53:01 +0000 (22:53 +0200)]
environment-d-generator: output logs in debug mode

Those codepaths is only used by that generator, so simply adding a few debug
log lines should be OK.

Fixes #12259.

5 years agoMerge pull request #13384 from yuwata/core-runtime-directory-preserve
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 11:00:57 +0000 (13:00 +0200)]
Merge pull request #13384 from yuwata/core-runtime-directory-preserve

core: make RuntimeDirectoryPreserve= works with non-service units

5 years agoAdd System76 touchpad toggle support
Jeremy Soller [Wed, 21 Aug 2019 15:31:35 +0000 (09:31 -0600)]
Add System76 touchpad toggle support

5 years agoMerge pull request #13433 from keszybz/new-security-mailing-list
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 10:26:37 +0000 (12:26 +0200)]
Merge pull request #13433 from keszybz/new-security-mailing-list

docs: new systemd-security mailing list

5 years agobasic/virt: Fix current virtualbox detection
Jan Losinski [Thu, 29 Aug 2019 13:45:51 +0000 (15:45 +0200)]
basic/virt: Fix current virtualbox detection

In a current VirtualBox installation the board_vendor is set to "Oracle
Corporation". So we need to add this to the dmi_vendor_table for a
relieable detection.

This fixes #13429

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
5 years agodocs: create new SECURITY.md page
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 09:45:42 +0000 (11:45 +0200)]
docs: create new SECURITY.md page

github has special support for that name:
https://help.github.com/en/articles/adding-a-security-policy-to-your-repository.

5 years agodocs: new systemd-security mailing list
Zbigniew Jędrzejewski-Szmek [Fri, 30 Aug 2019 07:03:41 +0000 (09:03 +0200)]
docs: new systemd-security mailing list

In the past, we asked people to open a security bug on one of the "big"
distros. This worked OK as far as getting bugs reported and notifying some
upstream developers went. But we always had trouble getting information to
all the appropriate parties, because each time a bug was reported, a big
thread was created, with a growing CC list. People who were not CCed early
enough were missing some information, etc.

To clean this up, we decided to create a private mailing list. The natural
place would be freedesktop.org, but unfortunately the request to create a
mailing list wasn't handled
(https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/134). And even
if it was, at this point, if there was ever another administrative issue, it
seems likely it could take months to resolve. So instead, we asked for a list
to be created on the redhat mailservers.

Please consider the previous security issue reporting mechanisms rescinded, and
send any senstive bugs to systemd-security@redhat.com.

5 years agoman: install runlevel.8 unconditionally
Jan Chren [Wed, 28 Aug 2019 23:30:58 +0000 (23:30 +0000)]
man: install runlevel.8 unconditionally

systemctl supports runlevel invocation name without utmp.
The runlevel symlink is installed unconditionally.
So it's reasonable to install runlevel manpage with it as well.

Signed-off-by: Jan Chren (rindeal) <dev.rindeal@gmail.com>
5 years agomeson: fix incomplete option descriptions
Jan Chren [Wed, 28 Aug 2019 21:50:17 +0000 (21:50 +0000)]
meson: fix incomplete option descriptions

Signed-off-by: Jan Chren (rindeal) <dev.rindeal@gmail.com>
5 years agoMerge pull request #13244 from keszybz/allow-dots-in-usernames
Yu Watanabe [Wed, 28 Aug 2019 15:03:19 +0000 (00:03 +0900)]
Merge pull request #13244 from keszybz/allow-dots-in-usernames

Allow dots in usernames

5 years agocore: move timeout_clean_usec from Service to ExecContext
Yu Watanabe [Sun, 25 Aug 2019 08:47:57 +0000 (17:47 +0900)]
core: move timeout_clean_usec from Service to ExecContext

5 years agotest: add tests for systemctl clean with DynamicUser=yes
Yu Watanabe [Sun, 25 Aug 2019 07:27:33 +0000 (16:27 +0900)]
test: add tests for systemctl clean with DynamicUser=yes

5 years agocore: also remove private directories by systemctl clean
Yu Watanabe [Thu, 22 Aug 2019 16:04:24 +0000 (01:04 +0900)]
core: also remove private directories by systemctl clean

Fixes #13355.

5 years agohwdb: Add HP laptop accelerometer location quirk
Hans de Goede [Wed, 28 Aug 2019 07:28:30 +0000 (09:28 +0200)]
hwdb: Add HP laptop accelerometer location quirk

Add another HP laptop to the list of HP laptops with their
accelerometer in the base.

While at it also fixup the indentation of a neighboring quirk.

5 years agoshared/user-util: emit a warning on names with dots
Zbigniew Jędrzejewski-Szmek [Wed, 28 Aug 2019 10:05:52 +0000 (12:05 +0200)]
shared/user-util: emit a warning on names with dots

5 years agozsh: update journalctl completions
Ronan Pigott [Wed, 28 Aug 2019 05:28:02 +0000 (22:28 -0700)]
zsh: update journalctl completions

5 years agoMerge pull request #13412 from yuwata/network-check-and-warn-more
Yu Watanabe [Wed, 28 Aug 2019 06:23:01 +0000 (15:23 +0900)]
Merge pull request #13412 from yuwata/network-check-and-warn-more

network: check more static IPv6 configurations and add more warnings

5 years agoresolved: query polkit only after parsing the data
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 17:28:19 +0000 (19:28 +0200)]
resolved: query polkit only after parsing the data

That's what we do everywhere else because it leads to nicer user experience.

5 years agoresolved: allow access to Set*Link and Revert methods through polkit
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 17:25:05 +0000 (19:25 +0200)]
resolved: allow access to Set*Link and Revert methods through polkit

This matches what is done in networkd very closely. In fact even the
policy descriptions are all identical (with s/network/resolve), except
for the last one:
resolved has org.freedesktop.resolve1.revert while
networkd has org.freedesktop.network1.revert-ntp and
org.freedesktop.network1.revert-dns so the description is a bit different.

5 years agoresolved: do not run loop twice
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 17:02:53 +0000 (19:02 +0200)]
resolved: do not run loop twice

This doesn't matter much, but let's just do the loop once and allocate
the populate the result set on the fly. If we find an error, it'll get
cleaned up automatically.

5 years agosd-bus: adjust indentation of comments
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 17:00:50 +0000 (19:00 +0200)]
sd-bus: adjust indentation of comments

5 years agotest-bus-vtable: also print introspection for the fallback vtable
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 15:34:39 +0000 (17:34 +0200)]
test-bus-vtable: also print introspection for the fallback vtable

This doesn't really test anything, it's just a trivial test that we
get the expected output for a fallback vtable.

5 years agoshared/but-util: drop trusted annotation from bus_open_system_watch_bind_with_descrip...
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 17:00:34 +0000 (19:00 +0200)]
shared/but-util: drop trusted annotation from bus_open_system_watch_bind_with_description()

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

This only affects systemd-resolved. bus_open_system_watch_bind_with_description()
is also used in timesyncd, but it has no methods, only read-only properties, and
in networkd, but it annotates all methods with SD_BUS_VTABLE_UNPRIVILEGED and does
polkit checks.

5 years agokernel-install: do not require non-empty kernel cmdline
Zbigniew Jędrzejewski-Szmek [Fri, 23 Aug 2019 09:34:45 +0000 (11:34 +0200)]
kernel-install: do not require non-empty kernel cmdline

When booting with Fedora-Server-dvd-x86_64-30-20190411.n.0.iso,
/proc/cmdline is empty (libvirt, qemu host with bios, not sure if that
matters), after installation to disk, anaconda would "crash" in kernel-core
%posttrans, after calling kernel-install, because dracut would fail
with

> Could not determine the kernel command line parameters.
> Please specify the kernel command line in /etc/kernel/cmdline!

I guess it's legitimate, even if unusual, to have no cmdline parameters.
Two changes are done in this patch:

1. do not fail if the cmdline is empty.
2. if /usr/lib/kernel/cmdline or /etc/kernel/cmdline are present, but
   empty, ignore /proc/cmdline. If there's explicit configuration to
   have empty cmdline, don't ignore it.

The same change was done in dracut:
https://github.com/dracutdevs/dracut/pull/561.

5 years agomanager: put bin before sbin for user instances
Zbigniew Jędrzejewski-Szmek [Fri, 7 Aug 2015 01:34:15 +0000 (21:34 -0400)]
manager: put bin before sbin for user instances

Traditionally, user logins had a $PATH in which /bin was before /sbin, while
root logins had a $PATH with /sbin first. This allows the tricks that
consolehelper is doing to work. But even if we ignore consolehelper, having the
path in this order might have been used by admins for other purposes, and
keeping the order in user sessions will make it easier the adoption of systemd
user sessions a bit easier.

Fixes #733.
https://bugzilla.redhat.com/show_bug.cgi?id=1744059

OOM handling in manager_default_environment wasn't really correct.
Now the (theorertical) malloc failure in strv_new() is handled.

Please note that this has no effect on:
- systems with merged /bin-/sbin (e.g. arch)

- when there are no binaries that differ between the two locations.

  E.g. on my F30 laptop there is exactly one program that is affected:
  /usr/bin/setup -> consolehelper.

  There is less and less stuff that relies on consolehelper, but there's still
  some.

So for "clean" systems this makes no difference, but helps with legacy setups.

$ dnf repoquery --releasever=31 --qf %{name} --whatrequires usermode
anaconda-live
audit-viewer
beesu
chkrootkit
driftnet
drobo-utils-gui
hddtemp
mate-system-log
mock
pure-ftpd
setuptool
subscription-manager
system-config-httpd
system-config-rootpassword
system-switch-java
system-switch-mail
usermode-gtk
vpnc-consoleuser
wifi-radar
xawtv

5 years agocore: stop removing non-existent and duplicate lookup paths
Zbigniew Jędrzejewski-Szmek [Mon, 26 Aug 2019 06:58:41 +0000 (08:58 +0200)]
core: stop removing non-existent and duplicate lookup paths

When we would iterate over the lookup paths for each unit, making the list as
short as possible was important for performance. With the current cache, it
doesn't matter much. Two classes of paths were being removed:
- paths which don't exist in the filesystem
- paths which symlink to a path earlier in the search list
Both of those points cause problems with the caching code:
- if a user creates a directory that didn't exist before and puts units there,
  now we will notice the new mtime an properly load the unit. When the path
  was removed from list, we wouldn't.
- we now properly detect whether a unit path is on the path or not.
  Before, if e.g. /lib/systemd/system, /usr/lib/systemd/systemd were both on
  the path, and /lib was a symlink to /usr/lib, the second directory would be
  pruned from the path. Then, the code would think that a symlink
  /etc/systemd/system/foo.service→/lib/systemd/system/foo.service is an alias,
  but /etc/systemd/system/foo.service→/usr/lib/systemd/system/foo.service would
  be considered a link (in the systemctl link sense).

Removing the pruning has a slight negative performance impact in case of
usr-merge systems which have systemd compiled with non-usr-merge paths.
Non-usr-merge systems are deprecated, and this impact should be very small, so
I think it's OK. If it turns out to be an issue, the loop in function that
builds the cache could be improved to skip over "duplicate" directories with
same logic that the cache pruning did before. I didn't want to add this,
becuase it complicates the code to improve a corner case.

Fixes #13272.

5 years agoMerge pull request #13382 from keszybz/network-ipv6-enable
Yu Watanabe [Tue, 27 Aug 2019 15:29:29 +0000 (00:29 +0900)]
Merge pull request #13382 from keszybz/network-ipv6-enable

Network ipv6 enable

5 years agonetwork: add more warnings in network_verify()
Yu Watanabe [Tue, 27 Aug 2019 14:45:00 +0000 (23:45 +0900)]
network: add more warnings in network_verify()

5 years agonetwork: enable ipv6 when the network has static ipv6 configurations
Yu Watanabe [Tue, 27 Aug 2019 14:15:24 +0000 (23:15 +0900)]
network: enable ipv6 when the network has static ipv6 configurations

5 years agonetwork: drop all checks of ipv6_disabled sysctl
Zbigniew Jędrzejewski-Szmek [Thu, 22 Aug 2019 11:26:54 +0000 (13:26 +0200)]
network: drop all checks of ipv6_disabled sysctl

*We* control the sysctl setting. If the user configured IPv6, then we apply the
settings, and just make sure that at some point during the configuration the
sysctl is disabled (i.e. ipv6 enabled) if we have IPv6 configured.

Replaces #13283.

5 years agoMerge pull request #13402 from jwrdegoede/accel-quirks
Zbigniew Jędrzejewski-Szmek [Tue, 27 Aug 2019 06:52:49 +0000 (08:52 +0200)]
Merge pull request #13402 from jwrdegoede/accel-quirks

hwdb: Accel quirks for 2 devices

5 years agoAdd accel mount matrix for Medion Akoya E2293
VD-Lycos [Fri, 23 Aug 2019 22:48:41 +0000 (00:48 +0200)]
Add accel mount matrix for Medion Akoya E2293

Add ACCEL_MOUNT_MATRIX for Medion Akoya E2293 MD61130

5 years agotest/TEST-10-ISSUE-2467: remove testsuite.service TimeoutStartSec
Dan Streetman [Thu, 15 Aug 2019 20:06:13 +0000 (16:06 -0400)]
test/TEST-10-ISSUE-2467: remove testsuite.service TimeoutStartSec

This test runs under qemu, which may run on some testbeds without
acceleration; in those cases, a 10s timeout is frequently too short.

Simply removing the timeout to allow the default timeoutsec should
be enough time for the test to finish, even on very slow testbeds.

5 years agotest/TEST-18-FAILUREACTION: fix typo to actually run firstphase action
Dan Streetman [Mon, 22 Jul 2019 17:47:47 +0000 (13:47 -0400)]
test/TEST-18-FAILUREACTION: fix typo to actually run firstphase action

The if test for running the firstphase of the test should be negated
so the firstphase is actually executed.

5 years agohwdb: Add accel. mount matrix and location for the Trekstor Primebook C11B
Hans de Goede [Sun, 25 Aug 2019 18:34:34 +0000 (20:34 +0200)]
hwdb: Add accel. mount matrix and location for the Trekstor Primebook C11B

The Trekstor Primebook C11B 2-in-1 has 2 accelerometers. Add mount-matrix
and location info for both to 60-sensor.hwdb.

5 years agohwdb: Add accel location quirk for the GPD win
Hans de Goede [Tue, 20 Aug 2019 20:55:20 +0000 (22:55 +0200)]
hwdb: Add accel location quirk for the GPD win

The acceleromater in the GPD win is in the base, mark it as such so that
iio-sensor-proxy does not try to use it for display rotation.

Note as mentioned in the added comment the DMI strings are unfortunately
somewhat generic, but the combination of using all DMI strings including
the BIOS build data + the sensor modalias should be unique enough.

5 years agocore: introduce exec_directory_is_private() helper function
Yu Watanabe [Thu, 22 Aug 2019 15:48:38 +0000 (00:48 +0900)]
core: introduce exec_directory_is_private() helper function

Also, this follows up 40cd2ecc26b776ef085fd0fd29e8e96f6422a0d3.

5 years agotest/test-functions: use truncate instead of dd to create testbed image
Dan Streetman [Tue, 13 Aug 2019 12:05:06 +0000 (08:05 -0400)]
test/test-functions: use truncate instead of dd to create testbed image

This avoids unnecessary noise in the stderr logs which dd always produces,
such as:

0+0 records in
0+0 records out
0 bytes copied, 0.000155284 s, 0.0 kB/s

Using truncate should not result in any functional change; the image will
still be created as a sparse file of the size specified.

5 years agotest/test-functions: use binaries from $BUILD_DIR or installed system
Dan Streetman [Tue, 13 Aug 2019 11:52:57 +0000 (07:52 -0400)]
test/test-functions: use binaries from $BUILD_DIR or installed system

In Ubuntu CI, we test binaries from the installed system, not from
$BUILD_DIR, so use the appropriate binary.  Most of the calls to the
binaries are part of checking/processing asan-built binaries, and so
did not apply to Ubuntu CI, except for generating noise in the stderr
log like:

objdump: '/tmp/autopkgtest.83yGoI/build.fHB/src/test/TEST-01-BASIC/systemd-journald': No such file

However this also applies to the call to systemd-nspawn, which the debian
upstream test wrapper was sed-adjusting to use the installed binary
instead of the binary in $BUILD_DIR.  This commit allows removing that
sed processing of the test-functions file during Ubuntu CI test.

5 years agosemaphore: switch back to the master branch
Evgeny Vereshchagin [Sat, 24 Aug 2019 02:51:53 +0000 (02:51 +0000)]
semaphore: switch back to the master branch

5 years agoFix typo in sd_event_set_watchdog manpage (#13393)
Arian van Putten [Sat, 24 Aug 2019 06:16:44 +0000 (08:16 +0200)]
Fix typo in sd_event_set_watchdog manpage (#13393)

5 years agotest: add tests for RuntimeDirectoryPreserve=yes
Yu Watanabe [Thu, 22 Aug 2019 15:22:54 +0000 (00:22 +0900)]
test: add tests for RuntimeDirectoryPreserve=yes

5 years agocore: make RuntimeDirectoryPreserve= works with non-service units
Yu Watanabe [Thu, 22 Aug 2019 15:08:16 +0000 (00:08 +0900)]
core: make RuntimeDirectoryPreserve= works with non-service units

5 years agocore: introduce unit_destroy_runtime_directory()
Yu Watanabe [Thu, 22 Aug 2019 14:49:49 +0000 (23:49 +0900)]
core: introduce unit_destroy_runtime_directory()

Currently `unit_will_restart()` can return true only when the unit is
service. Hence, should not change anything.

5 years agoNEWS: update contributors list
Zbigniew Jędrzejewski-Szmek [Thu, 22 Aug 2019 11:47:11 +0000 (13:47 +0200)]
NEWS: update contributors list

5 years agohwdb: update for v243-rc2
Zbigniew Jędrzejewski-Szmek [Thu, 22 Aug 2019 07:21:43 +0000 (09:21 +0200)]
hwdb: update for v243-rc2

Diff on the hwdb/*.hwdb files shows that again, this is only additions and
minor corrections.

5 years agojournalctl: Make journalctl --user-unit= match on _SYSTEMD_USER_SLICE
Arian van Putten [Mon, 12 Aug 2019 17:36:56 +0000 (19:36 +0200)]
journalctl:  Make journalctl --user-unit= match on _SYSTEMD_USER_SLICE

journalctl --unit= already did this, and allows you to tail all the logs
for a certain slice easily. It seemed only natural to make --user-unit
behave in a similar way.

The _SYSTEMD_USER_SLICE field was not documented as being added by
journald, so I have added that to the documentation too.

Furthermore, I have documented the existing behaviour of --unit= and the
new behaviour of --user-unit=

The behaviour was actually not documented before, so I am also OK with
removing the match for the --unit= command instead.  The user would then
have to manually provide _SYSTEMD_SLICE= filter to journalctl in both
cases. Both options work for me.

5 years agonetwork: Do not disable IPv6 by writing to sysctl
Susant Sahani [Mon, 19 Aug 2019 10:00:35 +0000 (15:30 +0530)]
network: Do not disable IPv6 by writing to sysctl

Only enable is and do not disable IPv6

5 years agocore: TAKE_PTR in timer_add_one_calendar_spec
Anita Zhang [Thu, 22 Aug 2019 06:03:16 +0000 (23:03 -0700)]
core: TAKE_PTR in timer_add_one_calendar_spec

Introduced in d00a52c

Fixes #13373

5 years agohwdb: add sensor location for HP ProBook4535s
Hans de Goede [Thu, 22 Aug 2019 06:55:09 +0000 (08:55 +0200)]
hwdb: add sensor location for HP ProBook4535s

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

5 years agojournald: slightly bump OOM adjust for journald (#13366)
Lennart Poettering [Thu, 22 Aug 2019 08:02:28 +0000 (10:02 +0200)]
journald: slightly bump OOM adjust for journald (#13366)

If logging disappears issues are hard to debug, hence let's give
journald a slight edge over other services when the OOM killer hits.

Here are the special adjustments we now make:

 systemd-coredump@.service.in OOMScoreAdjust=500
 systemd-journald.service.in  OOMScoreAdjust=-250
 systemd-udevd.service.in     OOMScoreAdjust=-1000

(i.e. the coredump processing is made more likely to be killed on OOM,
and udevd and journald are less likely to be killed)

5 years agoMerge pull request #13365 from keszybz/fix-commits-from-pr-13246
Zbigniew Jędrzejewski-Szmek [Thu, 22 Aug 2019 07:13:25 +0000 (09:13 +0200)]
Merge pull request #13365 from keszybz/fix-commits-from-pr-13246

Fix commits from #13246

5 years agoAdd Chuwi Hi10 to 60-sensor.hwdb (#13351)
Albrecht Lohofener [Thu, 22 Aug 2019 07:12:31 +0000 (09:12 +0200)]
Add Chuwi Hi10 to 60-sensor.hwdb (#13351)

5 years agopid1: always log successfull process termination quietly
Zbigniew Jędrzejewski-Szmek [Wed, 21 Aug 2019 14:20:59 +0000 (16:20 +0200)]
pid1: always log successfull process termination quietly

Fixes #13372.

5 years agoMerge pull request #13368 from keszybz/close-watchdog
Lennart Poettering [Wed, 21 Aug 2019 13:36:02 +0000 (15:36 +0200)]
Merge pull request #13368 from keszybz/close-watchdog

shared/watchdog: close watchdog device when done with it

5 years agopid1: after creating transient drop-ins, put file in path cache
Zbigniew Jędrzejewski-Szmek [Wed, 21 Aug 2019 07:14:52 +0000 (09:14 +0200)]
pid1: after creating transient drop-ins, put file in path cache

The alternative would be to recreate the cache, but dropins can be created very
often for transient settings, so updating the cache seems like a much faster
option.

Fixes #13287.

5 years agoshared/watchdog: close watchdog device when done with it
Zbigniew Jędrzejewski-Szmek [Tue, 20 Aug 2019 18:24:47 +0000 (20:24 +0200)]
shared/watchdog: close watchdog device when done with it

The file descriptor was opened with O_CLOEXEC, so in practice this doesn't
change too much, but it seems cleaner to always close the old fd when
changing the device path.

5 years agoMerge pull request #13367 from poettering/null-console-fixes
Zbigniew Jędrzejewski-Szmek [Tue, 20 Aug 2019 19:13:36 +0000 (21:13 +0200)]
Merge pull request #13367 from poettering/null-console-fixes

Fixes inspired by console=null

5 years agofsck: add logging and fix error codes where appropriate
Lennart Poettering [Tue, 20 Aug 2019 15:35:06 +0000 (17:35 +0200)]
fsck: add logging and fix error codes where appropriate

5 years agomanager: simplify manager_get_confirm_spawn() a bit
Lennart Poettering [Tue, 20 Aug 2019 15:34:16 +0000 (17:34 +0200)]
manager: simplify manager_get_confirm_spawn() a bit

Let's use our usual way of storing error codes.

Let's remove a redundant temporary variable we never change

5 years agoload-fragment: use path_join() where appropriate
Lennart Poettering [Tue, 20 Aug 2019 15:32:34 +0000 (17:32 +0200)]
load-fragment: use path_join() where appropriate

5 years agolog: don't invalidate open console fd if we can't open a new one
Lennart Poettering [Tue, 20 Aug 2019 15:32:17 +0000 (17:32 +0200)]
log: don't invalidate open console fd if we can't open a new one

5 years agoterminal-util: add fallback logic to make_console_stdio()
Lennart Poettering [Tue, 20 Aug 2019 15:30:15 +0000 (17:30 +0200)]
terminal-util: add fallback logic to make_console_stdio()

If /dev/console can't be opened, let's use /dev/null instead.

Inspired by: #13332

5 years agolog: cast various log_open() calls to (void)
Lennart Poettering [Tue, 20 Aug 2019 15:29:49 +0000 (17:29 +0200)]
log: cast various log_open() calls to (void)

5 years agoupdate TODO
Lennart Poettering [Tue, 20 Aug 2019 14:21:01 +0000 (16:21 +0200)]
update TODO

5 years agoMerge pull request #13360 from keszybz/udev-watch-more
Lennart Poettering [Tue, 20 Aug 2019 11:55:47 +0000 (13:55 +0200)]
Merge pull request #13360 from keszybz/udev-watch-more

udev: set "watch" for more devices