]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoMerge pull request #13037 from poettering/shutdown-log-fixes
Yu Watanabe [Sat, 13 Jul 2019 14:00:12 +0000 (23:00 +0900)] 
Merge pull request #13037 from poettering/shutdown-log-fixes

Shutdown log fixes

4 years agoMerge pull request #13041 from poettering/firstboot-fixes
Yu Watanabe [Sat, 13 Jul 2019 13:59:43 +0000 (22:59 +0900)] 
Merge pull request #13041 from poettering/firstboot-fixes

two systemd-firstboot fixes

4 years agoudev: make Match.OriginalName=* matches all interfaces
Yu Watanabe [Fri, 12 Jul 2019 14:47:27 +0000 (23:47 +0900)] 
udev: make Match.OriginalName=* matches all interfaces

Fixes #13035.

4 years agoMerge pull request #13043 from poettering/strip-tab-ansi-no-static-size
Yu Watanabe [Sat, 13 Jul 2019 09:12:39 +0000 (18:12 +0900)] 
Merge pull request #13043 from poettering/strip-tab-ansi-no-static-size

util-lib: [static] array argument sizes are apparently not OK for NUL…

4 years agofirstboot: use color in welcome text 13041/head
Lennart Poettering [Fri, 12 Jul 2019 11:52:01 +0000 (13:52 +0200)] 
firstboot: use color in welcome text

4 years agofirstboot: suppress locale menu if there's nothing to choose from
Lennart Poettering [Fri, 12 Jul 2019 11:43:31 +0000 (13:43 +0200)] 
firstboot: suppress locale menu if there's nothing to choose from

4 years agomain: use sysctl_writef() where appropriate 13037/head
Lennart Poettering [Fri, 12 Jul 2019 09:04:12 +0000 (11:04 +0200)] 
main: use sysctl_writef() where appropriate

4 years agoshutdown: merge variable declaration lines a bit
Lennart Poettering [Fri, 12 Jul 2019 08:42:31 +0000 (10:42 +0200)] 
shutdown: merge variable declaration lines a bit

4 years agoshutdown: bump kmsg log level to LOG_WARNING only
Lennart Poettering [Fri, 12 Jul 2019 08:41:28 +0000 (10:41 +0200)] 
shutdown: bump kmsg log level to LOG_WARNING only

Fixes: #12337
4 years agoshutdown: rework bump_sysctl_printk_log_level() to use sysctl_writef()
Lennart Poettering [Fri, 12 Jul 2019 08:41:06 +0000 (10:41 +0200)] 
shutdown: rework bump_sysctl_printk_log_level() to use sysctl_writef()

4 years agosysctl: add sysctl_writef() helper
Lennart Poettering [Fri, 12 Jul 2019 08:34:04 +0000 (10:34 +0200)] 
sysctl: add sysctl_writef() helper

4 years agoshutdown: use "int" for log level type
Lennart Poettering [Fri, 12 Jul 2019 08:25:28 +0000 (10:25 +0200)] 
shutdown: use "int" for log level type

Let's remove some unnecessary confusion around signed/unsigned types for
log levels. Let's just stick to signed, because that is what glibc
generally appears to use.

While we are at it, add explicit logging for all error causes.

4 years agokillall: bump log message about unkilled processes to LOG_WARNING
Lennart Poettering [Fri, 12 Jul 2019 08:24:00 +0000 (10:24 +0200)] 
killall: bump log message about unkilled processes to LOG_WARNING

By raising this, we can raise the kernel kmsg log level safely, and
still see these messages.

4 years agoalloc-util: drop _alloc_ decorator from memdup_suffix0()
Lennart Poettering [Fri, 12 Jul 2019 15:09:09 +0000 (17:09 +0200)] 
alloc-util: drop _alloc_ decorator from memdup_suffix0()

Fixes: https://github.com/systemd/systemd/pull/13034#issuecomment-510801671
4 years agosemaphore: avoid running autopkgtest with --apt-upgrade
Evgeny Vereshchagin [Fri, 12 Jul 2019 00:08:15 +0000 (02:08 +0200)] 
semaphore: avoid running autopkgtest with --apt-upgrade

by getting rid of the cache and upgrading images once every
time they are built from scratch.

4 years agotree-wide: some more [static] related fixes 13043/head
Lennart Poettering [Fri, 12 Jul 2019 14:39:07 +0000 (16:39 +0200)] 
tree-wide: some more [static] related fixes

let's add [static] where it was missing so far

Drop [static] on parameters that can be NULL.

Add an assert() around parameters that have [static] and can't be NULL
hence.

Add some "const" where it was forgotten.

4 years agoutil-lib: [static] array argument sizes are apparently not OK for NULL parameters
Lennart Poettering [Fri, 12 Jul 2019 14:17:51 +0000 (16:17 +0200)] 
util-lib: [static] array argument sizes are apparently not OK for NULL parameters

Let's drop the 'static' logic when a parameter can be NULL.

I think asan/ubsan are right here, judging by the C99 spec language:

"A declaration of a parameter as ‘‘array of type’’ shall be adjusted to
‘‘qualified pointer to type’’, where the type qualifiers (if any) are
those specified within the [ and ] of the array type derivation. If the
keyword static also appears within the [ and ] of the array type
derivation, then for each call to the function, the value of the
corresponding actual argument shall provide access to the first element
of an array with at least as many elements as specified by the size
expression."

If we specify NULL, then we certainly don't pvode access to any valid
array.

Fixes: #13039
4 years agoMerge pull request #13036 from poettering/more-doc-fixes
Zbigniew Jędrzejewski-Szmek [Fri, 12 Jul 2019 14:28:24 +0000 (16:28 +0200)] 
Merge pull request #13036 from poettering/more-doc-fixes

Six documentation fixes

4 years agoman: add example for setting multiple properties at once 13036/head
Lennart Poettering [Fri, 12 Jul 2019 07:55:05 +0000 (09:55 +0200)] 
man: add example for setting multiple properties at once

Fixes: #4908
4 years agoman: CPUShares= is so 2015
Lennart Poettering [Fri, 12 Jul 2019 07:54:40 +0000 (09:54 +0200)] 
man: CPUShares= is so 2015

Let's update our example to the brave new cgroupsv2 world, and use
CPUWeight= in our example.

4 years agoman: document that WakeSystem= requires privs
Lennart Poettering [Fri, 12 Jul 2019 07:45:21 +0000 (09:45 +0200)] 
man: document that WakeSystem= requires privs

Fixes: #11677
4 years agoman: document that "systemd-analyze blame/critical-chain" is not useful to track...
Lennart Poettering [Fri, 12 Jul 2019 07:36:17 +0000 (09:36 +0200)] 
man: document that "systemd-analyze blame/critical-chain" is not useful to track down job latency

Fixes: #12272
4 years agoman: be more explicit that Type=oneshot services are not "active" after starting
Lennart Poettering [Fri, 12 Jul 2019 07:25:22 +0000 (09:25 +0200)] 
man: be more explicit that Type=oneshot services are not "active" after starting

Fixes: #13000
4 years agoman: document that the supplementary groups list is initialized from User='s database...
Lennart Poettering [Fri, 12 Jul 2019 07:18:59 +0000 (09:18 +0200)] 
man: document that the supplementary groups list is initialized from User='s database entry

Fixes: #12936
4 years agoMerge pull request #13034 from poettering/memdup-suffix0-multiply-fixo
Lennart Poettering [Fri, 12 Jul 2019 12:11:31 +0000 (14:11 +0200)] 
Merge pull request #13034 from poettering/memdup-suffix0-multiply-fixo

memdup_suffix0_multiply fix

4 years agoutil-lib: fix comment
Lennart Poettering [Fri, 12 Jul 2019 06:49:53 +0000 (08:49 +0200)] 
util-lib: fix comment

As suggested by @ralt.

Fixes: #12896
4 years agotest: modernize test-alloc-util.c test a bit 13034/head
Lennart Poettering [Fri, 12 Jul 2019 07:10:13 +0000 (09:10 +0200)] 
test: modernize test-alloc-util.c test a bit

4 years agoalloc-util: drop _alloc_(2, 3) decorator from memdup_suffix0_multiply()
Lennart Poettering [Fri, 12 Jul 2019 07:06:28 +0000 (09:06 +0200)] 
alloc-util: drop _alloc_(2, 3) decorator from memdup_suffix0_multiply()

This decorator tells compilers that the memory we return is shorter than
it actually is, thus triggering misleading bad memory access complaints.

Fixes: #13026
4 years agoMerge pull request #13022 from keszybz/coverity-cleanups
Lennart Poettering [Fri, 12 Jul 2019 05:37:44 +0000 (07:37 +0200)] 
Merge pull request #13022 from keszybz/coverity-cleanups

Coverity cleanups

4 years agoMerge pull request #13031 from yuwata/network-route-type-local-12975-2
Yu Watanabe [Fri, 12 Jul 2019 05:31:50 +0000 (14:31 +0900)] 
Merge pull request #13031 from yuwata/network-route-type-local-12975-2

network: make Route.Type= support local or friends

4 years agotree-wide: get rid of strappend()
Lennart Poettering [Thu, 11 Jul 2019 17:14:16 +0000 (19:14 +0200)] 
tree-wide: get rid of strappend()

It's a special case of strjoin(), so no need to keep both. In particular
as typing strjoin() is even shoert than strappend().

4 years agotest-network: add tests for route with type local, multicast, anycast, or broadcast 13031/head
Yu Watanabe [Sun, 7 Jul 2019 12:57:22 +0000 (21:57 +0900)] 
test-network: add tests for route with type local, multicast, anycast, or broadcast

4 years agonetwork: also show route protocol in debugging logs
Yu Watanabe [Tue, 9 Jul 2019 15:18:53 +0000 (00:18 +0900)] 
network: also show route protocol in debugging logs

4 years agonetwork: use string table for route protocol
Yu Watanabe [Mon, 8 Jul 2019 11:36:19 +0000 (20:36 +0900)] 
network: use string table for route protocol

4 years agonetwork: use string table to parse route table or scope
Yu Watanabe [Mon, 8 Jul 2019 11:19:28 +0000 (20:19 +0900)] 
network: use string table to parse route table or scope

4 years agonetwork: show route scope, table, and type in debugging logs
Yu Watanabe [Sun, 7 Jul 2019 12:50:05 +0000 (21:50 +0900)] 
network: show route scope, table, and type in debugging logs

4 years agonetwork: update log message
Yu Watanabe [Sun, 7 Jul 2019 11:34:54 +0000 (20:34 +0900)] 
network: update log message

Follow-up for 7f474ed78df138677557fb43701efeb6e2588c6f and
44e891bbf6908e494856fcf3011e88a70a12e087.

4 years agonetwork: make Route.Type= support local, broadcast, anycast, multicast, nat, and...
Yu Watanabe [Sun, 7 Jul 2019 00:40:17 +0000 (09:40 +0900)] 
network: make Route.Type= support local, broadcast, anycast, multicast, nat, and xresolve

Closes #12975.

4 years agonetwork: use string table to parse route type
Yu Watanabe [Sat, 6 Jul 2019 23:43:33 +0000 (08:43 +0900)] 
network: use string table to parse route type

4 years agotest-network: test more bridge properties
Yu Watanabe [Sat, 6 Jul 2019 22:46:08 +0000 (07:46 +0900)] 
test-network: test more bridge properties

Imported from networkd-test.py

4 years agoMerge pull request #12971 from yuwata/network-reassign-static-routes
Yu Watanabe [Fri, 12 Jul 2019 00:36:16 +0000 (09:36 +0900)] 
Merge pull request #12971 from yuwata/network-reassign-static-routes

network: reassign static routes and process reply address messages

4 years agoMerge pull request #13024 from poettering/errno-or-else
Yu Watanabe [Fri, 12 Jul 2019 00:33:21 +0000 (09:33 +0900)] 
Merge pull request #13024 from poettering/errno-or-else

Errno or else

4 years agoshared/ask-password-api: backspace all chars at once 13022/head
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 07:00:49 +0000 (09:00 +0200)] 
shared/ask-password-api: backspace all chars at once

We'd call loop_write() separately for each char. Let's be nice to
serial console users, and write the full string in one go.

Coverity was complaining that we're not checking the return value
from loop_write(). Rework the code a bit and add voidify.
CID#1402323.

4 years agotest-process-util: invert reporting to make sure that we're not dividing by 0
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 06:47:41 +0000 (08:47 +0200)] 
test-process-util: invert reporting to make sure that we're not dividing by 0

CID#1402334.

4 years agoudevd: add helper with error handling to synthesize "change" events
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 06:43:45 +0000 (08:43 +0200)] 
udevd: add helper with error handling to synthesize "change" events

Coverity was unhappy that we ignore the return value from write_string_file().
We should at least warn. CID#1302373.

4 years agotest: minor modernization
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 05:54:04 +0000 (07:54 +0200)] 
test: minor modernization

Coverity was complaining that read() does not terminate the data. But
we did that termination earlier, so covirity is wrong (CID#1402306, CID#1402340).
Let's modernize the style a bit nevertheless.

(size_t) cast is needed to avoid the warning about comparison, iff
the value is not a constant.

4 years agotree-wide: make use of errno_or_else() everywhere 13024/head
Lennart Poettering [Thu, 11 Jul 2019 13:42:14 +0000 (15:42 +0200)] 
tree-wide: make use of errno_or_else() everywhere

4 years agoerrno-util: add new errno_or_else() helper
Lennart Poettering [Thu, 4 Jul 2019 15:55:36 +0000 (17:55 +0200)] 
errno-util: add new errno_or_else() helper

4 years agoMerge pull request #13025 from poettering/tmpfiles-fixo
Frantisek Sumsal [Thu, 11 Jul 2019 19:55:55 +0000 (19:55 +0000)] 
Merge pull request #13025 from poettering/tmpfiles-fixo

unbreak the build

4 years agoMerge pull request #13017 from yuwata/network-neighbor-lladdr-13015
Lennart Poettering [Thu, 11 Jul 2019 17:23:29 +0000 (19:23 +0200)] 
Merge pull request #13017 from yuwata/network-neighbor-lladdr-13015

network: rename Neighbor.MACAddress= and also support IPv4 address

4 years agotmpfiles: use path_join() where it makes sense 13025/head
Lennart Poettering [Thu, 11 Jul 2019 16:42:26 +0000 (18:42 +0200)] 
tmpfiles: use path_join() where it makes sense

4 years agotmpfiles: fix build
Lennart Poettering [Thu, 11 Jul 2019 16:41:14 +0000 (18:41 +0200)] 
tmpfiles: fix build

After I merged #12750 we don't build anymore, since the merged PR (which
passed CI) uses prefix_root() which doesn't exist anymore. Let's fix
that.

4 years agotests: turn on the "object-size" UBSan check on Fuzzit
Evgeny Vereshchagin [Thu, 11 Jul 2019 13:32:05 +0000 (15:32 +0200)] 
tests: turn on the "object-size" UBSan check on Fuzzit

Now that 2eb1c19881678851a7e is merged it should be safe.

4 years agoMerge pull request #12750 from keszybz/tmpfiles-c-copy
Lennart Poettering [Thu, 11 Jul 2019 16:13:19 +0000 (18:13 +0200)] 
Merge pull request #12750 from keszybz/tmpfiles-c-copy

Make tmpfiles C use --root

4 years agoudevadm: ensure 'udevadm info -w' show updated result
Yu Watanabe [Thu, 27 Jun 2019 18:18:22 +0000 (03:18 +0900)] 
udevadm: ensure 'udevadm info -w' show updated result

This seems not necessary, but just for safety.

4 years agoMerge pull request #12461 from Werkov/fix-job-ordering
Lennart Poettering [Thu, 11 Jul 2019 14:43:58 +0000 (16:43 +0200)] 
Merge pull request #12461 from Werkov/fix-job-ordering

Refactor job ordering implementation (and fix cycle detection)

4 years agotest-network: add test for route reassignment 12971/head
Yu Watanabe [Sat, 6 Jul 2019 00:34:35 +0000 (09:34 +0900)] 
test-network: add test for route reassignment

4 years agonetwork: re-assign static routes when dynamic address is updated
Yu Watanabe [Sat, 6 Jul 2019 00:04:10 +0000 (09:04 +0900)] 
network: re-assign static routes when dynamic address is updated

Follow-up for b5799eeb0787deacb30d5984f6ac78f88f23b97e.

Closes #7354.

4 years agonetwork: process address reply message
Yu Watanabe [Sat, 6 Jul 2019 00:03:02 +0000 (09:03 +0900)] 
network: process address reply message

4 years agonetwork: rework route_scope_from_address()
Yu Watanabe [Sat, 6 Jul 2019 02:17:48 +0000 (11:17 +0900)] 
network: rework route_scope_from_address()

4 years agoutil: introduce in4_addr_equal()
Yu Watanabe [Sat, 6 Jul 2019 02:14:43 +0000 (11:14 +0900)] 
util: introduce in4_addr_equal()

4 years agonetwork: route_configure() do nothing when it returns 0
Yu Watanabe [Fri, 5 Jul 2019 23:47:24 +0000 (08:47 +0900)] 
network: route_configure() do nothing when it returns 0

4 years agotest-network: add testcase that Neighbor.LinkLayerAddress= is IP address 13017/head
Yu Watanabe [Wed, 10 Jul 2019 18:26:30 +0000 (03:26 +0900)] 
test-network: add testcase that Neighbor.LinkLayerAddress= is IP address

4 years agotest-network: use Neighbor.LinkLayerAddress= instead of deprecated Neighbor.MACAddress=
Yu Watanabe [Wed, 10 Jul 2019 17:25:21 +0000 (02:25 +0900)] 
test-network: use Neighbor.LinkLayerAddress= instead of deprecated Neighbor.MACAddress=

4 years agonetwork: fdb: use ether_addr_from_string()
Yu Watanabe [Thu, 11 Jul 2019 01:48:41 +0000 (10:48 +0900)] 
network: fdb: use ether_addr_from_string()

4 years agonetwork: fdb: do not allocate separated memory for lladdr
Yu Watanabe [Thu, 11 Jul 2019 01:44:36 +0000 (10:44 +0900)] 
network: fdb: do not allocate separated memory for lladdr

4 years agonetwork: drop invalid [Neighbor] section earlier
Yu Watanabe [Wed, 10 Jul 2019 18:08:31 +0000 (03:08 +0900)] 
network: drop invalid [Neighbor] section earlier

4 years agonetwork: rename Neighbor.MACAddress= to Neighbor.LinkLayerAddress=
Yu Watanabe [Wed, 10 Jul 2019 17:23:41 +0000 (02:23 +0900)] 
network: rename Neighbor.MACAddress= to Neighbor.LinkLayerAddress=

And make it support IPv4 address.

Closes #13015.

4 years agonetwork: NDA_LLADDR attribute can also take struct in_addr
Yu Watanabe [Thu, 11 Jul 2019 01:17:30 +0000 (10:17 +0900)] 
network: NDA_LLADDR attribute can also take struct in_addr

4 years agosd-netlink: make sd_netlink_message_read() returns size of read data
Yu Watanabe [Thu, 11 Jul 2019 01:12:35 +0000 (10:12 +0900)] 
sd-netlink: make sd_netlink_message_read() returns size of read data

4 years agoMerge pull request #12176 from poettering/clean-dir2
Lennart Poettering [Thu, 11 Jul 2019 13:12:02 +0000 (15:12 +0200)] 
Merge pull request #12176 from poettering/clean-dir2

add "systemctl clean" operation for clearing out StateDirectory=, CacheDirectory=, … of a service unit

4 years agojson: always allocate at least sizeof(JsonVariant) bytes
Lennart Poettering [Thu, 11 Jul 2019 09:15:06 +0000 (11:15 +0200)] 
json: always allocate at least sizeof(JsonVariant) bytes

ubsan apparently doesn't like us being too smart here. Given the
difference is just a few bytes, let's avoid the noise.

Fixes: #13020
4 years agoupdate TODO 12176/head
Lennart Poettering [Mon, 1 Apr 2019 17:42:03 +0000 (19:42 +0200)] 
update TODO

4 years agoman: document new "systemctl clean…" operation
Lennart Poettering [Mon, 1 Apr 2019 15:28:29 +0000 (17:28 +0200)] 
man: document new "systemctl clean…" operation

4 years agotest: add testcase for new CleanUnit logic
Lennart Poettering [Mon, 1 Apr 2019 14:51:55 +0000 (16:51 +0200)] 
test: add testcase for new CleanUnit logic

4 years agosystemctl: port "systemctl start --wait" logic to new bus-wait-for-units.c API
Lennart Poettering [Fri, 29 Mar 2019 19:23:33 +0000 (20:23 +0100)] 
systemctl: port "systemctl start --wait" logic to new bus-wait-for-units.c API

4 years agosystemctl: add new "clean" operation to systemctl
Lennart Poettering [Mon, 1 Apr 2019 16:57:46 +0000 (18:57 +0200)] 
systemctl: add new "clean" operation to systemctl

This exposes the CleanUnit() bus calls in systemctl, i.e. makes all the
infrastructure we previously added useful to people.

4 years agoshared: add generic logic for waiting for a unit to enter some state
Lennart Poettering [Mon, 1 Apr 2019 16:54:59 +0000 (18:54 +0200)] 
shared: add generic logic for waiting for a unit to enter some state

This is a generic implementation of a client-side logic of waiting until
a unit enters or leaves some state.

This is a more generic implementation of the WaitContext logic currently
in systemctl.c, and is supposed to replace it (a later commit does
this). It's similar to bus-wait-for-jobs.c and we probably should fold
that one into it later on.

This code is more powerful and cleaner than the WaitContext logic
however. In addition to waiting for a unit to exit this also allows us
to wait for a unit to leave the "maintainance" state.

This commit only implements the generic logic, and adds no users of it
yet.

4 years agocore: expose per-service cleaning properties on the bus, too
Lennart Poettering [Mon, 1 Apr 2019 16:52:40 +0000 (18:52 +0200)] 
core: expose per-service cleaning properties on the bus, too

4 years agocore: expose new clean operation on the bus
Lennart Poettering [Mon, 1 Apr 2019 16:51:49 +0000 (18:51 +0200)] 
core: expose new clean operation on the bus

This adds CanClean() and Clean() as new methods on the Unit object that
initiate the cleaning operation.

4 years agocore: add type of resource string table
Lennart Poettering [Tue, 25 Jun 2019 09:31:57 +0000 (11:31 +0200)] 
core: add type of resource string table

4 years agocore: hook up timer unit type with clean operation
Lennart Poettering [Mon, 1 Apr 2019 16:49:40 +0000 (18:49 +0200)] 
core: hook up timer unit type with clean operation

timer units maintain state on disk (the persistent touch file), hence
let's expose cleaning it up generically with the new cleaning operation
for units.

This is a much simpler implementation as for the service unit type:
instead of forking out a worker process we just remove the touch file
directly. That should be OK since we only need to remove a single
(empty) file, instead of a recursive user-controlled directory tree.

Fixes: #4930
4 years agocore: hook up service unit type with the new clean operation
Lennart Poettering [Mon, 1 Apr 2019 16:48:20 +0000 (18:48 +0200)] 
core: hook up service unit type with the new clean operation

The implementation is pretty straight-foward: when we get a request to
clean some type of resources we fork off a process doing that, and while
it is running we are in the "cleaning" state.

4 years agocore: add generic "clean" operation to units
Lennart Poettering [Tue, 25 Jun 2019 09:31:28 +0000 (11:31 +0200)] 
core: add generic "clean" operation to units

This adds basic infrastructure to implement a "clean" operation for unit
types. This "clean" operation is supposed to remove on-disk resources of
units, and is supposed to be used in a later commit to clean our
RuntimeDirectory=, StateDirectory= and so on of service units.

Later commits will open this up to the bus, and hook up service units
with this.

This also adds a new generic ActiveState called UNIT_MAINTENANCE. It's
supposed to cover all kinds of "maintainance" state of units.
Specifically, this is supposed to cover the "cleaning" operations later
added for service units which might take a bit of time. This high-level,
generic, abstract state is called UNIT_MAINTENANCE instead of the
more specific "UNIT_CLEANING", since I think this should be kept open
for different operations possibly later on that could be nicely subsumed
under this (for example, maybe a recursive chown()ing operation could be
covered by this, and similar).

4 years agorm-rf: introduce new flag REMOVE_MISSING_OK
Lennart Poettering [Fri, 29 Mar 2019 15:13:03 +0000 (16:13 +0100)] 
rm-rf: introduce new flag REMOVE_MISSING_OK

This new flag suppresses error if the top-level path specified doesn't
exist. This is useful since suppressing this on the caller side isn't
easy, since ENOENT migh be propagate for some reason from further inside
and we can't distuingish that.

While we are at it, also be a bit more careful witht the various
combinations of flags.

(Note that in some cases rm_rf() was already ignoring ENOENT from
unlink() or rmdir(), however that was pretty useless, since we always
open() the top-level path with O_DIRECTORY and if that hit ENOENT we
didn't ignore the failure).

4 years agosd-bus: when installing a match make sure not to apply it to already queued messages
Lennart Poettering [Fri, 29 Mar 2019 14:43:40 +0000 (15:43 +0100)] 
sd-bus: when installing a match make sure not to apply it to already queued messages

This tweaks match installation a bit: the match callbacks are now only
called for messages read after the AddMatch() reply was received and
never anything already read before. Thus, installing a match gives you a
time guarantee: only messages received after it will be matched.

This is useful when listening to PropertiesChanged signals as an example
to ensure that only changes after the point the match was installed are
honoured, nothing before.

4 years agosd-bus: destroy AddMatch() reply slot in failure case too
Lennart Poettering [Fri, 29 Mar 2019 14:42:38 +0000 (15:42 +0100)] 
sd-bus: destroy AddMatch() reply slot in failure case too

If AddMatch() doesn't work, let's destroy the slot for it too as soon as
we received the failure for it.

This way the mere existance of the slot tells us whether the AddMatch()
method call is still pending or is complete.

4 years agosd-bus: maintain a counter for incoming msgs
Lennart Poettering [Fri, 29 Mar 2019 14:40:56 +0000 (15:40 +0100)] 
sd-bus: maintain a counter for incoming msgs

Let's count incoming messages and attach the current counter when we
first read them to the message objects. This allows us to nicely order
messages later on.

4 years agoMerge pull request #13018 from yuwata/network-tunnel-follow-up-13016
Lennart Poettering [Thu, 11 Jul 2019 10:10:39 +0000 (12:10 +0200)] 
Merge pull request #13018 from yuwata/network-tunnel-follow-up-13016

network: drop assertions about Tunnel.family

4 years agotest-alloc-util: assert on the return value to appease coverity
Zbigniew Jędrzejewski-Szmek [Thu, 11 Jul 2019 05:45:13 +0000 (07:45 +0200)] 
test-alloc-util: assert on the return value to appease coverity

Coverity is right that we should check the return value…
CID#1403006.

4 years agopid1: shorten dump output a bit by not repeating unit id twice
Zbigniew Jędrzejewski-Szmek [Fri, 5 Jul 2019 11:34:54 +0000 (13:34 +0200)] 
pid1: shorten dump output a bit by not repeating unit id twice

Most units have just one name, but we'd print it twice:
-> Unit systemd-sysctl.service:
        ...
Name: systemd-sysctl.service

Let's only print the "main" name once, and call the other names Aliases.

4 years agotest-network: drop test_udev_driver as it is unstable
Yu Watanabe [Mon, 8 Jul 2019 12:08:10 +0000 (21:08 +0900)] 
test-network: drop test_udev_driver as it is unstable

The test unexpectedly succeeds on KVM with sanitizer CI.
At least tentatively, let's drop the test.

4 years agoMerge pull request #13006 from yuwata/network-split-dhcp-12917
Lennart Poettering [Thu, 11 Jul 2019 08:28:03 +0000 (10:28 +0200)] 
Merge pull request #13006 from yuwata/network-split-dhcp-12917

networkd: DHCPv6 - separate DHCPv6 options from DHCPv4 options

4 years agoMerge pull request #13010 from poettering/fsck-usr-wants
Yu Watanabe [Thu, 11 Jul 2019 06:13:51 +0000 (15:13 +0900)] 
Merge pull request #13010 from poettering/fsck-usr-wants

generator: downgrade Requires= → Wants= of fsck from /usr mount unit

4 years agotest-network: add testcases Tunnel.Remote=any and Local=any 13018/head
Yu Watanabe [Thu, 11 Jul 2019 02:39:27 +0000 (11:39 +0900)] 
test-network: add testcases Tunnel.Remote=any and Local=any

4 years agonetwork: ip6tnl and vti6 does not support the case both Local= and Remote= are any
Yu Watanabe [Thu, 11 Jul 2019 02:05:15 +0000 (11:05 +0900)] 
network: ip6tnl and vti6 does not support the case both Local= and Remote= are any

This partially revert feb0c8b86f05330c8c7581463b8adf35ea68e5a9.

This also drop assertions about Tunnel.family.

4 years agoMerge pull request #13013 from yuwata/network-xfrm-follow-ups
Yu Watanabe [Thu, 11 Jul 2019 06:08:13 +0000 (15:08 +0900)] 
Merge pull request #13013 from yuwata/network-xfrm-follow-ups

network: follow-ups for XFRM netdevs and introduce AssignToLoopback= for Tunnel devices

4 years agotest-network: add test for Xfrm netdev 13013/head
Yu Watanabe [Wed, 10 Jul 2019 14:54:26 +0000 (23:54 +0900)] 
test-network: add test for Xfrm netdev

4 years agotest-network: add test for AssignToLoopback= setting
Yu Watanabe [Wed, 10 Jul 2019 14:53:30 +0000 (23:53 +0900)] 
test-network: add test for AssignToLoopback= setting

4 years agonetwork: add AssignToLoopback= setting to [Tunnel] section
Yu Watanabe [Wed, 10 Jul 2019 14:49:17 +0000 (23:49 +0900)] 
network: add AssignToLoopback= setting to [Tunnel] section

networkd does not manage loopback interface lo. So, previously, we have
no way to assign tunnel devices to lo.