Commit graph

39330 commits

Author SHA1 Message Date
Lennart Poettering c0b471e197 sd-bus: add missing empty line 2019-04-01 20:56:19 +02:00
Benjamin Berg c548fc0486 hwdb: Fix micmute on ASUS FX503VD
The micmute key needs to be remapped to F20 for userspace to consume it.

See https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/121
2019-04-01 19:14:49 +02:00
Yu Watanabe 546c203d83 test: set longer StartLimitIntervalSec= and fewer StartLimitBurst=
Some test environment may be in heavy load. In that case, rate limit
never hit, and the test fails...
2019-04-01 19:13:36 +02:00
Lennart Poettering 46701cfef0
Merge pull request #12164 from keszybz/units-use-presets
Enable our units using presets in the usual fashion
2019-04-01 18:33:10 +02:00
Yu Watanabe 76e62a4d22 udev: move udev_ctrl_cleanup() into manager_free() 2019-04-01 15:20:03 +02:00
Lennart Poettering 245d386a03
Merge pull request #12157 from yuwata/network-netdev-name-conflict
network: handle NetDev.Name= conflict nicely
2019-04-01 15:17:07 +02:00
Zbigniew Jędrzejewski-Szmek 01d2041e41 meson: stop creating enablement symlinks in /etc during installation
This patch was initially prompted by a report on a Fedora update [1], that the
upgrade causes systemd-resolved.service and systemd-networkd.service to be
re-enabled. We generally want to preserve the enablement of all services during
upgrades, so a reset like this is not expected.

Both services declare two symlinks in their [Install] sections, for their dbus
names and for multi-user.target.wants/.  It turns out that both services were
only partially enabled, because their dbus unit symlinks
/etc/systemd/system/dbus-org.freedesktop.{resolve1,network1}.service were
created, by the symlinks in /etc/systemd/system/multi-user.target.wants/ were
not. This means that the units could be activated by dbus, but not in usual
fashion using systemctl start. Our tools make it rather hard to figure out when
something like this happens, and it is definitely an area for improvement on its
own. The symlink in .wants/ was filtered out by during packaging, but the dbus
symlink was left in (I assume by mistake).

Let's simplify things by not creating the symlinks statically during 'ninja
install'. This means that the units shipped by systemd have to be enabled in
the usual fashion, which in turns means that [Install] section and presets
become the "single source of truth" and we don't have two sets of conflicting
configuration.

Let's consider a few cases:
- developer: a developer installs systemd from git on a running system, and they
  don't want the installation to reset enablement of anything. So this change is
  either positive for them, or has no effect (if they have everything at
  defaults).

- package creation: we want to create symlinks using 'preset-all' and 'preset'
  on upgraded packages, we don't want to have any static symlinks. This change
  will remove the need to filter out symlinks in packaging and of course fix
  the original report.

- installation of systemd from scratch: this change means that without
  'preset-all' the system will not be functional. This case could be affected
  negatively by this change, but I think it's enough of a corner case to accept
  this. In practice I expect people to build a package, not installl directly
  into the file system, so this might not even matter in practice.

Creating those symlinks was probably the right thing in the beginning, but
nowadays the preset system is very well established and people expect it to
be honoured. Ignoring the presets and doing static configuration is not welcome
anymore.

Note: during package installation, either 'preset-all' or 'preset getty@.service
machines.target remote-cryptsetup.target remote-fs.target
systemd-networkd.service systemd-resolved.service
systemd-networkd-wait-online.service systemd-timesyncd.service' should be called.

[1] https://bodhi.fedoraproject.org/updates/FEDORA-2019-616045ca76
2019-04-01 14:24:44 +02:00
Zbigniew Jędrzejewski-Szmek 709b423f2f meson: indentation 2019-04-01 14:23:29 +02:00
Lennart Poettering 78b4bca607
Merge pull request #12156 from yuwata/fix-bootspec-memleaks
bootspec: fix memleaks
2019-04-01 12:46:37 +02:00
Yu Watanabe bfa7f57cc3 po: update ja.po 2019-04-01 12:16:21 +02:00
Yu Watanabe 753e0a2446 test-network: add test for NetDev.Name= conflict 2019-04-01 10:30:31 +09:00
Yu Watanabe 4b4a6c9b41 udev: shorten code a bit 2019-04-01 10:30:31 +09:00
Yu Watanabe c6e77d7b22 network: add '=' to config key names in log
Also, long lines are wrapped.
2019-04-01 10:30:31 +09:00
Yu Watanabe b519908cac network: do not abort execution when NetDev.Name= conflicts
This also changes that .netdev files are loaded in ascending order.
Otherwise, when NetDev.ifname= setting conflicts with other .netdev file,
then .netdev file with large prefix number wins.
2019-04-01 10:30:31 +09:00
Yu Watanabe 5a0bd90b82 test-network: add test for drop-in [WireGuardPeer] section
This also merges the two wireguard tests, and use wait_online()
to speed up the test.
2019-04-01 10:30:30 +09:00
Yu Watanabe 18268197fa bootspec: fix memleak caused by setting invalid cleanup function 2019-03-31 23:31:29 +09:00
Yu Watanabe 7226337574 bootspec: add missing free() in boot_config_free() 2019-03-31 23:30:30 +09:00
Yu Watanabe b07b19dff8
Merge pull request #12147 from yuwata/network-gre-key-12144
network: make GRE and GRETAP support Key= or friends
2019-03-31 22:12:34 +09:00
Yu Watanabe 6730a1f343 test-network: test stacked erspan tunnels 2019-03-30 21:17:53 +09:00
Yu Watanabe c65c01c41a man: update Tunnel.Key= and friends 2019-03-30 21:17:48 +09:00
Yu Watanabe a8b9a65c50 network: make GRE and GRETAP support Key=, InputKey=, OutputKey=, and SerializeTunneledPackets=
This also merge netdev_gre_fill_message_create() and netdev_erspan_fill_message_create().
2019-03-30 21:16:03 +09:00
Zbigniew Jędrzejewski-Szmek d923021aeb
Merge pull request #12048 from jengelh/master
rpm: avoid hiding errors from systemd commands
2019-03-29 22:27:31 +01:00
Zbigniew Jędrzejewski-Szmek 18406c3c0d
Merge pull request #12146 from yuwata/test-network-wait-online
test-network: use wait-online to speed up tests
2019-03-29 22:23:38 +01:00
Yu Watanabe 9282f75bf4 network: make erspan netdev can be specified in Network.Tunnel= 2019-03-30 03:52:25 +09:00
Yu Watanabe 1a9bc3d8f6 network: do not continue when appending data to netlink message fails 2019-03-30 03:52:21 +09:00
Yu Watanabe 0ef830cf54 test-network: merge tests for [Route] section 2019-03-30 02:27:22 +09:00
Yu Watanabe a15ff207df test-network: use wait_online() in test_sysctl_disable_ipv6() 2019-03-30 02:27:22 +09:00
Yu Watanabe ba1e0d0612 test-network: use wait_online() in test_sysctl()
This also disables IPv6AcceptRA= to speed up the test.
2019-03-30 02:27:22 +09:00
Yu Watanabe 2dcfcc08d9 test-network: use wait_online() in test_link_local_addressing()
This also disables IPv6AcceptRA= to speed up the test.
2019-03-30 02:27:22 +09:00
Yu Watanabe d06f30fc73 test-network: fix addr_gen_mode
If stable_secret is set, then networkd sets addr_gen_mode 2.
2019-03-30 02:27:22 +09:00
Yu Watanabe c2990ec39a test-network: move tests related to bonding 2019-03-30 02:27:22 +09:00
Yu Watanabe b810272594 test-network: merge tests about static addresses
And use wait_online()
2019-03-30 02:27:22 +09:00
Yu Watanabe 5aa58329d8 test-network: add wait_online() helper function 2019-03-30 02:27:16 +09:00
Zbigniew Jędrzejewski-Szmek fc23e06baa
Merge pull request #12138 from poettering/doc-ip-allow-src-dst
man: expand IPAddressAllow= docs a bit
2019-03-29 16:44:48 +01:00
Lennart Poettering 8c73ed754a update TODO 2019-03-29 16:17:55 +01:00
Lennart Poettering ef81ce6e80 man: clarify which addresses are affected by IPAddressAllow=/IPAddressDeny=
For ingress traffic it's the source address of IP packets we check, for
egress traffic it's the destination address. Mention that.
2019-03-29 16:17:55 +01:00
Piotr Drąg 276cf52fc0 po: update Polish translation 2019-03-29 15:25:07 +01:00
Zbigniew Jędrzejewski-Szmek 6ea07d4fb4
Merge pull request #12140 from poettering/copy-early
chattr/copy.c fixes
2019-03-29 15:02:50 +01:00
Zbigniew Jędrzejewski-Szmek 983616735e
Merge pull request #12137 from poettering/socket-var-run
warn about sockets in /var/run/ too
2019-03-29 15:00:25 +01:00
Zbigniew Jędrzejewski-Szmek 2818ddc8f4
Merge pull request #12133 from poettering/rseq-whitelist
whitelist rseq() system call in `@default` syscall group
2019-03-29 14:59:00 +01:00
Lennart Poettering 196f306795 analyze: check both possible mount points of tracefs
Let's try the new one first, the old one second.
2019-03-29 14:57:37 +01:00
Lennart Poettering bd169c2be0 fsck: copy out device argument from argv[] before forking
We nowadays rename our child processes, hence argv[] will be clobbered,
let's hence copy the device path to dynamic memory before forking.

This is fall-out from 60ffa37a65 since we
now a lot more often end up overriding the argv[] buffer than before,
simple because we know what to override.

These kind of bugs kinda suck. THere are only two options here: stop
overriding argv[] for all cases (or just these cases) or explicitly
copying out everything we need in child processes before forking. With
this patch I opt for the latter, though I am not 100% convinced this is
a great solution. Just a better solution than everything else, i.e.
allowing argv[] to remain out of sync with what others see.

Fixes: #12135
2019-03-29 08:18:25 +01:00
Jörg Thalheim 7232c1f9da wireguard: fix exponential backoff when resolving hosts
It should stop at 25s, not start.
Fixes #12134
2019-03-28 20:00:19 +01:00
Zbigniew Jędrzejewski-Szmek f2dc22b447 headers: add missing includes
Fixes #12125.
2019-03-28 19:59:56 +01:00
Lennart Poettering b8a736d7a0 sd-bus: change "int" → "signed int" on bitfield
Apparently by the C standard "int" bitfields can have any signedness
(unlike non-bitfield declarations which are "signed" if the signedness
is not specified).

Let's fix the LGTM warning about this hence and be explicit that we mean
"signed" here.
2019-03-28 19:07:51 +01:00
Lennart Poettering d629ba7045 tmpfiles: move full chattr flag set to chattr-util.h
It's a pretty generic concept and fits will there, hence let's move it.
2019-03-28 18:43:05 +01:00
Lennart Poettering 70d8401d74 update NEWS 2019-03-28 18:43:04 +01:00
Lennart Poettering e19ba205ab update TODO 2019-03-28 18:43:04 +01:00
Lennart Poettering 75006470ce tmpfiles: support the FS_PROJINHERIT_FL chattr flag 2019-03-28 18:43:04 +01:00
Lennart Poettering 8a016c746e util-lib: when copying files make sure to apply some chattrs early, some late
Some chattrs only work sensible if you set them right after opening a
file for create (think: FS_NOCOW_FL). Others only work when they are
applied when the file is fully written (think: FS_IMMUTABLE_FL). Let's
take that into account when copying files and applying a chattr to them.
2019-03-28 18:43:04 +01:00