Not sure how I missed this, but we of course need to wait for the
"systemd-run" commands to finish before we can check the output files
this generated.
tests: suppress "unwanted log lines" in several fuzzers
According to https://oss-fuzz.com/fuzzer-stats/by-fuzzer/fuzzer/libFuzzer/job/libfuzzer_asan_systemd,
fuzz-network-parser, fuzz-netdev-parser and fuzz-journal-remote produce
a lot of unwanted log lines. Let's set the maximum log level to LOG_CRIT
as we do in the other fuzzers.
Thomas Haller [Tue, 27 Nov 2018 11:09:52 +0000 (12:09 +0100)]
network: add sd_dhcp_route_get_option() accessor
Since sd_dhcp_lease_get_routes() returns the list of all routes,
the caller may need to differenciate whether the route was option
33 (static-routes) or 121 (classless-static-route).
core: when Delegate=yes is set for a unit, run ExecStartPre= and friends in a subcgroup of the unit
Otherwise we might conflict with the "no-processes-in-inner-cgroup" rule
of cgroupsv2. Consider nspawn starting up and initializing its cgroup
hierarchy with "supervisor/" and "payload/" as subcgroup, with itself
moved into the former and the payload into the latter. Now, if an
ExecStartPre= is run right after it cannot be placed in the main cgroup,
because that is now in inner cgroup with populated children.
Hence, let's run these helpers in another sub-cgroup .control/ below it.
This is somewhat ugly since it weakens the clear separation of
ownership, but given that this is an explicit contract, and double opt-in should be acceptable.
Let's highlight the unit description string in the status updates, to
separate them a bit more the english sentence they are part of, and thus
make the different casing less surprising.
Harald Hoyer [Mon, 26 Nov 2018 10:41:29 +0000 (11:41 +0100)]
generator.c: systemd-fsck-root.service conflict with shutdown.target
Otherwise a "reboot" or "poweroff" in the initramfs will have to wait
until systemd-fsck-root.service has completed, which might never happen
if the root device never shows up.
Yu Watanabe [Mon, 26 Nov 2018 13:05:48 +0000 (22:05 +0900)]
test-network: add one more test for netdev dropin .conf files
For netdev, config files are loaded twice, and the first time,
only Match and NetDev setions are read. So, the test given by
the previous commit covers only the second loading.
This adds another test that also covers the first loading.
Yu Watanabe [Mon, 26 Nov 2018 02:57:48 +0000 (11:57 +0900)]
udevd: do not call udev_ctrl_enable_receiving() if the socket is passed from pid1
Before c4b69e990f962128cc6975e36e91e9ad838fa2c4, if the socket fd is
passed from pid1, `udev_ctrl_enable_receiving()` was not called.
Let's preserve the original logic.
Yu Watanabe [Sun, 25 Nov 2018 06:04:26 +0000 (15:04 +0900)]
udevd: do not set buffer size if the socket is passed from pid1
Before c4b69e990f962128cc6975e36e91e9ad838fa2c4, if the socket fd is
passed from pid1, `udev_monitor_set_receive_buffer_size()` (now it is
a wrapper of `sd_device_monitor_set_receive_buffer_size()`) was not
called. Let's preserve the original logic.
Yu Watanabe [Sun, 25 Nov 2018 05:52:24 +0000 (14:52 +0900)]
sd-device: do not call device_monitor_enable_receiving() for passed fd from pid1
Before c4b69e990f962128cc6975e36e91e9ad838fa2c4, if the socket fd is
passed from pid1, `udev_monitor_enable_receiving()` (now it is a wrapper
of `device_monitor_enable_receiving`) was not called.
Let's preserve the original logic.
units: order systemd-rfkill.socket after /var/lib/systemd/rfkill (#10904)
Otherwise we might install the socket unit early, but the service
backing it late, and then end up in strange loops when we enter rescue
mode, because we saw an event on /dev/rfkill but really can't dispatch
it nor flush it.
Unfortunately, f5f9a580dd4a3cf487b didn't help much and now
the next subtest gets stuck from time to time. Let's skip
test-execute altogether so as not to bother anybody with
spurious failures.
https://github.com/systemd/systemd/issues/10696 is still open.
Everybody is welcome to share ideas :-)
Thomas Haller [Fri, 23 Nov 2018 12:42:13 +0000 (13:42 +0100)]
dhcp6-client: handle IAID with value zero
config_parse_iaid(), dhcp_identifier_set_iaid() and sd_dhcp6_client_set_iaid() all
allow for the IAID to be zero. Also, RFC 3315 makes no mention that zero
would be invalid.
However, client_ensure_iaid() would take an IAID of zero as a sign that
the values was unset. Fix that by keeping track whether IAID is
initialized.