Commit graph

41667 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 0cc0e2f65d
Merge pull request #13433 from keszybz/new-security-mailing-list
docs: new systemd-security mailing list
2019-08-30 12:26:37 +02:00
Jan Losinski 87bc4b40fc 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>
2019-08-30 12:20:38 +02:00
Zbigniew Jędrzejewski-Szmek 153d597575 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.
2019-08-30 11:45:42 +02:00
Zbigniew Jędrzejewski-Szmek 6d8cf86476 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.
2019-08-30 09:12:27 +02:00
Jan Chren 013a87517d 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>
2019-08-29 13:57:00 +09:00
Jan Chren f62b08dd6e meson: fix incomplete option descriptions
Signed-off-by: Jan Chren (rindeal) <dev.rindeal@gmail.com>
2019-08-29 13:56:39 +09:00
Yu Watanabe 4b259b3c63
Merge pull request #13244 from keszybz/allow-dots-in-usernames
Allow dots in usernames
2019-08-29 00:03:19 +09:00
Yu Watanabe a8b689b7d0 core/swap: support "systemctl clean" for swap units 2019-08-28 23:09:54 +09:00
Yu Watanabe 12213aed12 core: move timeout_clean_usec from Service to ExecContext 2019-08-28 23:09:54 +09:00
Yu Watanabe 17e9d53d87 core/mount: support "systemctl clean" for mount units 2019-08-28 23:09:54 +09:00
Yu Watanabe c238b616cf test: add tests for systemctl clean with DynamicUser=yes 2019-08-28 23:09:54 +09:00
Yu Watanabe c968d76a38 core/socket: support "systemctl clean" for socket units 2019-08-28 23:09:54 +09:00
Yu Watanabe 810ef3180e core: introduce unit_fork_and_watch_rm_rf() 2019-08-28 23:09:54 +09:00
Yu Watanabe 7f622a19d9 core: also remove private directories by systemctl clean
Fixes #13355.
2019-08-28 23:09:44 +09:00
Hans de Goede fa657ed068 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.
2019-08-28 15:32:40 +02:00
Zbigniew Jędrzejewski-Szmek 88e2ed0b5b shared/user-util: emit a warning on names with dots 2019-08-28 12:05:52 +02:00
Ronan Pigott 3005b38056 zsh: update journalctl completions 2019-08-28 10:08:49 +02:00
Yu Watanabe b977347498
Merge pull request #13412 from yuwata/network-check-and-warn-more
network: check more static IPv6 configurations and add more warnings
2019-08-28 15:23:01 +09:00
Zbigniew Jędrzejewski-Szmek fd73184f25 resolved: query polkit only after parsing the data
That's what we do everywhere else because it leads to nicer user experience.
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek 52aaef0f5d 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.
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek ab77c8793b 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.
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek 61252bae91 sd-bus: adjust indentation of comments 2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek 11791cdecc 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.
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek 35e528018f 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.
2019-08-27 19:49:09 +02:00
Zbigniew Jędrzejewski-Szmek 88e1306af6 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.
2019-08-27 18:30:49 +02:00
Zbigniew Jędrzejewski-Szmek db11487d10 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
2019-08-27 18:24:44 +02:00
Zbigniew Jędrzejewski-Szmek 581fef8d56 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.
2019-08-27 18:12:20 +02:00
Yu Watanabe 6c431a16c3
Merge pull request #13382 from keszybz/network-ipv6-enable
Network ipv6 enable
2019-08-28 00:29:29 +09:00
Yu Watanabe 44013aa4f5 network: add more warnings in network_verify() 2019-08-27 23:53:46 +09:00
Yu Watanabe adfeee49c5 network: enable ipv6 when the network has static ipv6 configurations 2019-08-27 23:53:46 +09:00
Zbigniew Jędrzejewski-Szmek 57ad760746 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.
2019-08-27 15:31:48 +02:00
Zbigniew Jędrzejewski-Szmek fef40ceb5d
Merge pull request #13402 from jwrdegoede/accel-quirks
hwdb: Accel quirks for 2 devices
2019-08-27 08:52:49 +02:00
VD-Lycos c0b62cd6a7 Add accel mount matrix for Medion Akoya E2293
Add ACCEL_MOUNT_MATRIX for Medion Akoya E2293 MD61130
2019-08-26 11:17:05 +03:00
Yu Watanabe b146ad71cc network: use DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN() macro at one more place 2019-08-26 16:19:02 +09:00
Yu Watanabe 5e8712404e network: drop redundant "else" 2019-08-26 15:40:30 +09:00
Dan Streetman 58c1a34437 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.
2019-08-26 12:47:15 +09:00
Dan Streetman 65c5f3d074 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.
2019-08-26 12:46:39 +09:00
Hans de Goede 38c865648d 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.
2019-08-25 20:36:54 +02:00
Hans de Goede 7b04c7af10 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.
2019-08-25 20:36:54 +02:00
Yu Watanabe 494d0247f9 core: introduce exec_directory_is_private() helper function
Also, this follows up 40cd2ecc26.
2019-08-25 16:27:42 +09:00
Dan Streetman adcc450f46 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.
2019-08-25 15:37:51 +09:00
Dan Streetman 84c49ad197 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.
2019-08-25 15:36:47 +09:00
Evgeny Vereshchagin e0eefa50a3 semaphore: switch back to the master branch 2019-08-24 10:06:48 +03:00
Arian van Putten d527ebef88 Fix typo in sd_event_set_watchdog manpage (#13393) 2019-08-24 15:16:44 +09:00
Yu Watanabe 8246bb204c test: add tests for RuntimeDirectoryPreserve=yes 2019-08-23 00:22:54 +09:00
Yu Watanabe 52a12341f9 core: make RuntimeDirectoryPreserve= works with non-service units 2019-08-23 00:08:16 +09:00
Yu Watanabe 95939aed21 core: introduce unit_destroy_runtime_directory()
Currently `unit_will_restart()` can return true only when the unit is
service. Hence, should not change anything.
2019-08-22 23:50:52 +09:00
Zbigniew Jędrzejewski-Szmek f21e2ecb8b NEWS: update contributors list 2019-08-22 13:47:11 +02:00
Zbigniew Jędrzejewski-Szmek 52720867ff hwdb: update for v243-rc2
Diff on the hwdb/*.hwdb files shows that again, this is only additions and
minor corrections.
2019-08-22 13:43:50 +02:00
Arian van Putten 0e4a4f56be 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.
2019-08-22 13:39:54 +02:00