Mathieu Trudel-Lapierre [Fri, 25 May 2018 14:34:38 +0000 (10:34 -0400)]
Always rename an interface to its name specified in config if no NamePolicy= is specified
This is for issue #9006
Lennart Poettering [Mon, 12 Nov 2018 17:39:51 +0000 (18:39 +0100)]
Merge pull request #10603 from yuwata/udevd-parser
udevd: several cleanups for parsing options
Lennart Poettering [Mon, 12 Nov 2018 16:44:33 +0000 (17:44 +0100)]
update TODO
Tommi Rantala [Thu, 8 Nov 2018 12:15:25 +0000 (14:15 +0200)]
core: include unit name in emergency_action() reason message
Add unit name in StartLimitAction=, FailureAction= and SuccessAction=
emergency_action() reason messages, so that the problematic unit is
easily visible, for example:
"unit dbus.service failed"
Yu Watanabe [Thu, 25 Oct 2018 09:18:35 +0000 (18:18 +0900)]
udev: use structured initializer at one more place
Yu Watanabe [Thu, 25 Oct 2018 08:41:17 +0000 (17:41 +0900)]
udev: drop redundant initializations for file descriptors
As udev_ctrl_new_from_fd() or udev_monitor_new_from_netlink_fd()
creates fd if negative fd is passed.
Yu Watanabe [Thu, 25 Oct 2018 08:39:53 +0000 (17:39 +0900)]
udev: handle sd_is_socket() failure
Yu Watanabe [Mon, 29 Oct 2018 07:50:39 +0000 (16:50 +0900)]
udev: drop util_log_priority() and use log_level_from_string()
The function util_log_priority() is almost same as
log_level_from_string(). The difference between them is only that
util_log_priority() accepts such that '3 hogehoge'.
Yu Watanabe [Thu, 25 Oct 2018 09:06:44 +0000 (18:06 +0900)]
udev: use parse_sec() to parse --event-timeout option
Yu Watanabe [Thu, 25 Oct 2018 09:13:55 +0000 (18:13 +0900)]
udev: include error cause of parsing --children-max option in log message
Yu Watanabe [Thu, 25 Oct 2018 06:30:51 +0000 (15:30 +0900)]
udev: introduce enum ResolveNameTiming for --resolve-names argument
Yu Watanabe [Thu, 25 Oct 2018 05:56:12 +0000 (14:56 +0900)]
udevd: use parse_sec() to parse --exec-delay option
Yu Watanabe [Thu, 25 Oct 2018 05:51:58 +0000 (14:51 +0900)]
udevd: explicitly set default value of global variables
Lennart Poettering [Mon, 12 Nov 2018 10:43:38 +0000 (11:43 +0100)]
update TODO
Lennart Poettering [Mon, 12 Nov 2018 10:42:16 +0000 (11:42 +0100)]
Merge pull request #10736 from yuwata/coredump-comment
fuzz: fix oss-fuzz#8658
Lennart Poettering [Mon, 12 Nov 2018 10:42:02 +0000 (11:42 +0100)]
Merge pull request #10734 from yuwata/network-use-structured-initializers
network: several cleanups
seb128 [Fri, 9 Nov 2018 15:54:02 +0000 (16:54 +0100)]
hwdb: revert airplane mode keys handling on Dell
That reverts the commits #8762 and #9868, those created double key events issues on some Dell laptops.
Lennart Poettering [Mon, 12 Nov 2018 09:25:26 +0000 (10:25 +0100)]
Merge pull request #10730 from yuwata/udev_device_get_ifindex_returns_zero
libudev: conserve previous behavior
Lennart Poettering [Mon, 12 Nov 2018 09:23:23 +0000 (10:23 +0100)]
Merge pull request #10731 from yuwata/fix-oss-fuzz-11344
Fixes oss-fuzz#11344
Yu Watanabe [Mon, 12 Nov 2018 09:10:24 +0000 (18:10 +0900)]
fuzz: add testcase of oss-fuzz#8658
Yu Watanabe [Mon, 12 Nov 2018 09:08:45 +0000 (18:08 +0900)]
fuzz: decrease DATA_SIZE_MAX
Fixes oss-fuzz#8658.
Yu Watanabe [Mon, 12 Nov 2018 08:56:20 +0000 (17:56 +0900)]
coredump: update comments
Yu Watanabe [Mon, 12 Nov 2018 07:45:04 +0000 (16:45 +0900)]
tree-wide: use CONFIG_PARSER_PROTOTYPE() macro
Yu Watanabe [Mon, 12 Nov 2018 06:34:39 +0000 (15:34 +0900)]
wait-online: use hashmap_free_with_destructor()
Yu Watanabe [Mon, 12 Nov 2018 06:33:18 +0000 (15:33 +0900)]
network: use hashmap_steal_first() rather than hashmap_first()+hashmap_remove()
Yu Watanabe [Mon, 12 Nov 2018 06:32:26 +0000 (15:32 +0900)]
network: use hashmap_clear_with_destructor() at one more place
Yu Watanabe [Mon, 12 Nov 2018 06:24:11 +0000 (15:24 +0900)]
network: allocate hashmap objects when they are required
Yu Watanabe [Mon, 12 Nov 2018 06:21:40 +0000 (15:21 +0900)]
network: do not assign unused value
Yu Watanabe [Mon, 12 Nov 2018 05:57:04 +0000 (14:57 +0900)]
network: fixes related to NetworkConfigSection
- Do not allocate NetworkConfigSection when filename == NULL
- set .network element before calling hashmap_put()
- Always free NetworkConfigSection in each object.
Yu Watanabe [Mon, 12 Nov 2018 05:55:52 +0000 (14:55 +0900)]
network: use structured initializers
Yu Watanabe [Mon, 12 Nov 2018 05:54:04 +0000 (14:54 +0900)]
network: use NetworkConfigSection in fdb entries
Yu Watanabe [Mon, 12 Nov 2018 05:52:35 +0000 (14:52 +0900)]
network: make ndisc related handlers return negative errno but caller ignore the errors
Yu Watanabe [Mon, 12 Nov 2018 04:30:20 +0000 (13:30 +0900)]
sd-bus: use SD_BUS_ERROR_NULL macro
Follow-up for
e8f280bd0af47158a9d6c3da940754cdd6f51d3e.
Yu Watanabe [Mon, 12 Nov 2018 04:20:20 +0000 (13:20 +0900)]
test: make test-udev accept only check when argc == 2
Follow-up for
110a13202eab6d92678abcde08372d4afac1cc45.
Yu Watanabe [Mon, 12 Nov 2018 06:55:03 +0000 (15:55 +0900)]
Merge pull request #10669 from danderson/networkd-6rd
networkd: add 6rd support for sit netdevs
Markus Grimm [Mon, 12 Nov 2018 06:47:47 +0000 (07:47 +0100)]
journal-remote: bugfix to re-enable ssl key check (#10707)
Alexander Kurtz [Mon, 12 Nov 2018 06:44:55 +0000 (07:44 +0100)]
man: fix default value in resolved.conf man page (#10733)
See https://github.com/systemd/systemd/blob/v239/meson_options.txt#L190
Yu Watanabe [Mon, 12 Nov 2018 04:12:09 +0000 (13:12 +0900)]
Merge pull request #10694 from evverx/udev-test-in-container
udev-test: remove a check for whether the test is run in a container
Yu Watanabe [Mon, 12 Nov 2018 04:07:06 +0000 (13:07 +0900)]
udevd: do not treat negative value as valid ifindex
Also, some conditions in is_devpath_busy() are similified.
Yu Watanabe [Sun, 11 Nov 2018 14:33:17 +0000 (23:33 +0900)]
libudev: conserve previous behavior
The commit
dcfbde3a43d632ff6e286c77e1081087eca59d8e changes
sd_device_get_ifindex() returns -ENOENT instead of zero if the device
does not have ifindex.
Let's keep the original behavior of udev_device_get_ifindex().
Fixes #10699.
Lennart Poettering [Sun, 11 Nov 2018 20:16:14 +0000 (21:16 +0100)]
Merge pull request #10728 from keszybz/four-unrelated-cleanups
Four unrelated cleanups
Lennart Poettering [Sun, 11 Nov 2018 20:15:50 +0000 (21:15 +0100)]
Merge pull request #10732 from yuwata/network-sock_cloexec
dhcp, fuzz: set SOCK_CLOEXEC and SOCK_NONBLOCK
Yu Watanabe [Sun, 11 Nov 2018 17:04:23 +0000 (02:04 +0900)]
fuzz: add testcase of oss-fuzz#10734
Yu Watanabe [Sun, 11 Nov 2018 17:03:22 +0000 (02:03 +0900)]
libsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCK
Yu Watanabe [Sun, 11 Nov 2018 16:58:17 +0000 (01:58 +0900)]
fuzz: explicitly set initial value of global variables
Yu Watanabe [Sun, 11 Nov 2018 16:57:27 +0000 (01:57 +0900)]
fuzz: set SOCK_CLOEXEC and SOCK_NONBLOCK
Yu Watanabe [Sun, 11 Nov 2018 16:56:08 +0000 (01:56 +0900)]
fuzz: use SOCK_STREAM instead of SOCK_DGRAM
Fixes oss-fuzz#10734.
Yu Watanabe [Sun, 11 Nov 2018 16:17:45 +0000 (01:17 +0900)]
fuzz: add testcase of already fixed issue 10908
Yu Watanabe [Sun, 11 Nov 2018 15:48:30 +0000 (00:48 +0900)]
network: use IN_ADDR_NULL
Yu Watanabe [Sun, 11 Nov 2018 15:36:48 +0000 (00:36 +0900)]
fuzz: add testcase of oss-fuzz#11344
Yu Watanabe [Sun, 11 Nov 2018 15:35:57 +0000 (00:35 +0900)]
util: specify the maximum-size element when initialize union
Fixes oss-fuzz#11344.
Lennart Poettering [Sun, 11 Nov 2018 14:43:45 +0000 (15:43 +0100)]
Merge pull request #10722 from yuwata/sd-device-monitor-change-arguments
sd-device-monitor: slightly re-design API arguments
Lennart Poettering [Sun, 11 Nov 2018 14:42:46 +0000 (15:42 +0100)]
Merge pull request #10723 from yuwata/fix-oss-fuzz-11345
network: add missing free() in network_free()
Yu Watanabe [Sun, 11 Nov 2018 14:19:50 +0000 (23:19 +0900)]
Merge pull request #10726 from michaelolbrich/meson-fixes
Meson fixes
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 11:33:06 +0000 (12:33 +0100)]
journalctl: do not treat EINTR as an error when waiting for events
Fixup for
2a1e0f2228bbdfbc18635e959f47df7da50b62fe. Fixes #10724.
Reproducer: start 'journalctl -f' in a terminal window, change window size.
Michael Olbrich [Sun, 11 Nov 2018 10:30:53 +0000 (11:30 +0100)]
meson: fix building with -Ddns-over-tls=false
Assigning multiple variables in one line is no valid meson syntax.
Without this running meson with -Ddns-over-tls=false fails with:
meson.build:1191:8: ERROR: Tried to assign an invalid value to variable.
Michael Olbrich [Sun, 11 Nov 2018 10:27:35 +0000 (11:27 +0100)]
meson: don't build fuzzers if tests are disabled
Fuzzers are just special tests anyways and without this, building with
'-Dtests=false' fails with:
.../src/fuzz/fuzz-main.c:20: undefined reference to `test_setup_logging'
Yu Watanabe [Sun, 11 Nov 2018 03:03:52 +0000 (12:03 +0900)]
fuzz: add testcase of oss-fuzz#11345
Yu Watanabe [Sun, 11 Nov 2018 02:21:13 +0000 (11:21 +0900)]
network: use hashmap_free_with_destructor() in network_free()
Yu Watanabe [Sun, 11 Nov 2018 02:20:51 +0000 (11:20 +0900)]
network: fix missing free() in network_free()
Fixes oss-fuzz#11345.
Lennart Poettering [Fri, 9 Nov 2018 17:19:40 +0000 (18:19 +0100)]
core: log about /var/run/ prefix used in PIDFile=, patch it to be /run instead
In a way this is a follow-up for
a2d1fb882c4308bc10362d971f333c5031d60069, but adds a similar warning for
PIDFile=.
There's a much stronger case for doing this kind of notification in
tmpfiles.d (since it helps relating lines to each other for the purpose
of merging them). Doing this for PIDFile= is mostly about being
systematic and copying tmpfiles.d/ behaviour here.
While we are at it, let's also support relative filenames in PIDFile=
now, and prefix them with /run, to make them absolute.
Fixes: #10657
Mike Gilbert [Thu, 8 Nov 2018 14:47:16 +0000 (09:47 -0500)]
random-util: allow RDRAND to be used in 32-bit x86 binaries
Rename rdrand64 to rdrand, and switch from uint64_t to unsigned long.
This produces code that will compile/assemble on both x86-64 and x86-32.
This could be useful when running a 32-bit copy of systemd on a modern
Intel processor.
RDRAND is inherently arch-specific, so relying on the compiler-defined
'long' type seems reasonable.
Yu Watanabe [Sat, 10 Nov 2018 13:50:11 +0000 (22:50 +0900)]
sd-device: drop priority and description from sd_device_monitor_attach_event() and sd_device_monitor_start()
Now we have sd_device_monitor_get_event_soruce(). So, it is not
necessary to include these parameters in the functions for sd_device_monitor.
Yu Watanabe [Sat, 10 Nov 2018 13:13:07 +0000 (22:13 +0900)]
sd-device: add sd_device_monitor_get_event_source()
Lennart Poettering [Sat, 10 Nov 2018 13:18:22 +0000 (14:18 +0100)]
Merge pull request #10717 from yuwata/fix-oss-fuzz-11324
network: add missing verification for ip6gretap and sit
Yu Watanabe [Sat, 10 Nov 2018 07:05:05 +0000 (16:05 +0900)]
sd-device: fix possible use of uninitialized value
Yu Watanabe [Sat, 10 Nov 2018 08:13:11 +0000 (17:13 +0900)]
id128,analyze: fix layout of help message
Evgeny Vereshchagin [Sat, 10 Nov 2018 08:10:49 +0000 (09:10 +0100)]
basic: make rdrand64 a little bit more MSAn-friendly
MSan doesn't instrument inline asm calls so let's help it
by marking err as initialized manually.
Fixes: https://github.com/systemd/systemd/issues/10714.
Evgeny Vereshchagin [Fri, 9 Nov 2018 03:01:15 +0000 (04:01 +0100)]
udev-test: skip the test only if it can't setup its environment
This is basically a replacement for
0eb3cc88504b5d8f74.
Yu Watanabe [Sat, 10 Nov 2018 06:38:35 +0000 (15:38 +0900)]
fuzz: add testcase for oss-fuzz#11324
Yu Watanabe [Sat, 10 Nov 2018 06:35:56 +0000 (15:35 +0900)]
network: add missing verification for ip6gretap and sit
Fixes oss-fuzz#11324.
Zbigniew Jędrzejewski-Szmek [Sat, 10 Nov 2018 06:43:57 +0000 (07:43 +0100)]
shared: fix typo
David Anderson [Fri, 9 Nov 2018 04:44:16 +0000 (20:44 -0800)]
Add a networkd test for 6rd interface creation.
Unfortunately we can't check the 6rd attribute, because it's not
exposed in /sys or anywhere other than netlink... But at least we
can check that networkd brings up an interface that looks right.
David Anderson [Wed, 7 Nov 2018 05:33:15 +0000 (21:33 -0800)]
Add 6rd directive to the netdev fuzzing corpus.
David Anderson [Wed, 7 Nov 2018 05:27:09 +0000 (21:27 -0800)]
networkd: support 6rd tunnel netdev setup.
Evgeny Vereshchagin [Fri, 9 Nov 2018 23:45:00 +0000 (00:45 +0100)]
travis: treat warnings as errors while building systemd
Zbigniew Jędrzejewski-Szmek [Fri, 9 Nov 2018 19:48:50 +0000 (20:48 +0100)]
man: add missing link in sd-bus(3)
Follow-up for
576af73f4a01e0fec9f376ead40fcce558aeebe8.
Zbigniew Jędrzejewski-Szmek [Thu, 8 Nov 2018 13:26:00 +0000 (14:26 +0100)]
sd_bus: use structured intialization in one more place
Michael Biebl [Fri, 9 Nov 2018 20:39:43 +0000 (21:39 +0100)]
man: fix system.generator in systemd.unit
Fixes: #10713
Zbigniew Jędrzejewski-Szmek [Fri, 9 Nov 2018 19:49:31 +0000 (20:49 +0100)]
Merge pull request #10306 from poettering/nspawn-ref-unref
nspawn scope lifecycle fixes
Zbigniew Jędrzejewski-Szmek [Fri, 9 Nov 2018 19:46:45 +0000 (20:46 +0100)]
Merge pull request #10711 from poettering/sd-bus-close-man
sd-bus: add docs for a couple of sd-bus APIs
Lennart Poettering [Sat, 6 Oct 2018 17:16:17 +0000 (19:16 +0200)]
sd-path: drop redundant "= 0ULL" assignment in enum
This has exactly zero effect as the type of an enum is not derived from
the integer types assigned to its items.
Lennart Poettering [Mon, 8 Oct 2018 13:46:04 +0000 (15:46 +0200)]
TODO
Lennart Poettering [Mon, 8 Oct 2018 13:44:22 +0000 (15:44 +0200)]
core: expose bus client names currently reffing a unit as property
This is useful for debugging client-side ref counting of units: for each
ref taken on a unit the client's sender name is listed. If a client has
multiple refs on the same unit it is listed multiple times.
Lennart Poettering [Sun, 7 Oct 2018 12:50:11 +0000 (14:50 +0200)]
machined: rework referencing of machine scopes from machined, too
When a machine scope is registered by machined, let's add a reference to
it, and change the GC mode so that the unit is cleaned up as soon as
machined drops the reference, regardless of the fail state.
Fixes: #2809
Lennart Poettering [Sat, 6 Oct 2018 18:31:17 +0000 (20:31 +0200)]
man: document sd_bus_attach_event()
Lennart Poettering [Sat, 6 Oct 2018 17:15:57 +0000 (19:15 +0200)]
man: document sd_bus_flush_close_unref()
Lennart Poettering [Sat, 6 Oct 2018 17:05:48 +0000 (19:05 +0200)]
man: document sd_bus_close() + sd_bus_flush()
Lennart Poettering [Fri, 5 Oct 2018 20:56:40 +0000 (22:56 +0200)]
nspawn: rework how we allocate/kill scopes
Fixes: #6347
Lennart Poettering [Fri, 5 Oct 2018 20:56:20 +0000 (22:56 +0200)]
nspawn: merge two variable declaration lines
Lennart Poettering [Fri, 5 Oct 2018 20:54:57 +0000 (22:54 +0200)]
nspawn: simplify machine terminate bus call
We have the machine name anyway, let's use TerminateMachine() on
machined's Manager object directly with it. That way it's a single
method call only, instead of two, to terminate the machine.
Lennart Poettering [Sat, 6 Oct 2018 16:45:58 +0000 (18:45 +0200)]
nspawn: make use of the new sd_bus_set_close_on_exit() call in nspawn
Lennart Poettering [Sat, 6 Oct 2018 16:43:28 +0000 (18:43 +0200)]
sd-bus: make "close+flush-on-exit" optional when using sd-event with sd-bus
This adds a new pair of API calls sd_bus_set_close_on_exit() and
sd_bus_get_close_on_exit(). They control whether an sd_bus object
attached to a an sd-event loop shall automatically be flushed/closed
when the event loop goes down. Usually that's a good thing, except for
very few cases where the bus connection is longer living than the event
loop it is attached on. Specifically, this is the case for nspawn, where
we run the event loop only while the container is up, but afterwards
still want to be able to use the bus connection.
Lennart Poettering [Fri, 5 Oct 2018 21:04:51 +0000 (23:04 +0200)]
unit: enqueue cgroup empty check event if the last ref on a unit is dropped
Lennart Poettering [Fri, 5 Oct 2018 20:50:25 +0000 (22:50 +0200)]
pid1: add a new AbandonScope() method call on the Manager object
This is the same as Abandon() on the Scope object, but saves clients
from first translating a unit name into a unit object path. This logic
matches how all the other unit methods have counterparts on the Manager
object too (e.g. StopUnit() on the Manager object matching Stop() on the
Unit object), this one was simply forgotten so far.
Frantisek Sumsal [Fri, 9 Nov 2018 11:47:30 +0000 (12:47 +0100)]
tests: keep SYS_PTRACE when running under ASan
Lennart Poettering [Fri, 9 Nov 2018 13:49:37 +0000 (14:49 +0100)]
Merge pull request #10695 from yuwata/fuzz-network-fixes
network: fix recent issues found by oss-fuzz
Yu Watanabe [Fri, 9 Nov 2018 02:45:43 +0000 (11:45 +0900)]
fuzz: add testcases of recent issues
Yu Watanabe [Fri, 9 Nov 2018 02:43:50 +0000 (11:43 +0900)]
network: fix potential segfault in network_free()
Yu Watanabe [Fri, 9 Nov 2018 02:42:11 +0000 (11:42 +0900)]
network: fix offset for IPv6MTUByte=
Fixes oss-fuzz#11302 and oss-fuzz#11314.