platform/upstream/systemd.git
5 years agofirstboot: actually accept empty input to mean skip
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 16:48:15 +0000 (18:48 +0200)]
firstboot: actually accept empty input to mean skip

We'd loop if the input was empty. We need to return to the caller.

5 years agofirstboot: fix hang waiting for second Enter on input
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 16:35:34 +0000 (18:35 +0200)]
firstboot: fix hang waiting for second Enter on input

The comment explains the reason: we'd wait for the second \n
and then ungetc() it. Then the buffered \n would cause a problem
when the next prompt was issued, so in effect it wasn't possible
to answer the second question.

5 years agofirstboot: only list all options on demand
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:17:29 +0000 (17:17 +0200)]
firstboot: only list all options on demand

The user most likely knows the name of their locale/keymap/whatever,
and paging through multiple pages of output has little benefit.

The header that was printed before is now not printed anymore. But
now it's obvious from the context what we are printing, so we don't
need to print the header.

5 years agofirstboot: use free_and_strdup, free_and_replace
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:16:42 +0000 (17:16 +0200)]
firstboot: use free_and_strdup, free_and_replace

5 years agowait-online: change log level
Yu Watanabe [Tue, 16 Jul 2019 01:21:18 +0000 (10:21 +0900)]
wait-online: change log level

During boot, systemd-networkd-wait-online writes following logs many
times:
```
systemd-networkd-wait-online[753]: lo: link is ignored
```

5 years agoMerge pull request #13067 from yuwata/news-network-section
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 12:38:24 +0000 (14:38 +0200)]
Merge pull request #13067 from yuwata/news-network-section

NEWS: update section name

5 years agodoc: update explanation of IPv6AcceptRA=
Yu Watanabe [Tue, 16 Jul 2019 01:46:27 +0000 (10:46 +0900)]
doc: update explanation of IPv6AcceptRA=

5 years agoMerge pull request #13062 from yuwata/analyze-use-table
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:28:34 +0000 (13:28 +0200)]
Merge pull request #13062 from yuwata/analyze-use-table

systemd-analyze: use Table

5 years agoMerge pull request #13063 from keszybz/cgroup-path-fixes
Lennart Poettering [Tue, 16 Jul 2019 09:53:31 +0000 (11:53 +0200)]
Merge pull request #13063 from keszybz/cgroup-path-fixes

Cgroup path fixes

5 years agoNEWS: update section name
Yu Watanabe [Tue, 16 Jul 2019 01:30:47 +0000 (10:30 +0900)]
NEWS: update section name

5 years agoMerge pull request #13058 from yuwata/network-enter-failed
Yu Watanabe [Tue, 16 Jul 2019 00:38:39 +0000 (09:38 +0900)]
Merge pull request #13058 from yuwata/network-enter-failed

network: make link enter failed state when a configuration fails

5 years agotree-wide: drop duplicated blank lines
Yu Watanabe [Sun, 14 Jul 2019 16:59:14 +0000 (01:59 +0900)]
tree-wide: drop duplicated blank lines

```
$ for i in */*.[ch] */*/*.[ch]; do sed -e '/^$/ {N; s/\n$//g}' -i $i; done
$ git checkout HEAD -- basic/linux shared/linux
```

5 years agoApply empty_to_root() in three more spots for safety
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 16:16:03 +0000 (18:16 +0200)]
Apply empty_to_root() in three more spots for safety

5 years agopid1: fix GetUnitProcesses
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 15:29:56 +0000 (17:29 +0200)]
pid1: fix GetUnitProcesses

This effectively reverts one chunk of 657ee2d82b73818d0ee8c3c5962c1cb2dbd52b76.

For a while I couldn't figure out why 'systemctl status -- -.slice' fails to
list any processes...

5 years agosystemctl: emit warning when we get an invalid process entry from pid1 and continue
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 15:27:26 +0000 (17:27 +0200)]
systemctl: emit warning when we get an invalid process entry from pid1 and continue

Output looks like this:
Invalid process description in GetUnitProcesses reply: cgroup="machine.slice/machine-rawhide.scope/payload/system.slice/systemd-journald.service" pid=638367 command="/usr/lib/systemd/systemd-journald", ignoring: Invalid argument

5 years agotest-network: make wait_online() check setup state
Yu Watanabe [Mon, 15 Jul 2019 05:18:06 +0000 (14:18 +0900)]
test-network: make wait_online() check setup state

Previously, event if link's setup state is in failed, tests may pass,
as systemd-networkd-wait-online success if the state is in failed state.
This makes tests be checked more strictly.

5 years agobash-completion: add missing 'systemd-analyze timestamp'
Yu Watanabe [Mon, 15 Jul 2019 16:15:57 +0000 (01:15 +0900)]
bash-completion: add missing 'systemd-analyze timestamp'

5 years agoanalyze: format output of 'systemd-analyze timestamp' by using Table
Yu Watanabe [Mon, 15 Jul 2019 16:14:20 +0000 (01:14 +0900)]
analyze: format output of 'systemd-analyze timestamp' by using Table

5 years agoanalyze: format output of 'systemd-analyze timespan' by using Table
Yu Watanabe [Mon, 15 Jul 2019 16:07:31 +0000 (01:07 +0900)]
analyze: format output of 'systemd-analyze timespan' by using Table

5 years agoanalyze: format output of 'systemd-analyze calendar' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:45:05 +0000 (00:45 +0900)]
analyze: format output of 'systemd-analyze calendar' by using Table

5 years agoformat-table: add TABLE_TIMESTAMP_UTC and _RELATIVE
Yu Watanabe [Mon, 15 Jul 2019 15:44:14 +0000 (00:44 +0900)]
format-table: add TABLE_TIMESTAMP_UTC and _RELATIVE

5 years agoanalyze: format output of 'systemd-analyze blame' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:19:59 +0000 (00:19 +0900)]
analyze: format output of 'systemd-analyze blame' by using Table

5 years agoformat-table: add TABLE_TIMESPAN_MSEC
Yu Watanabe [Mon, 15 Jul 2019 15:09:39 +0000 (00:09 +0900)]
format-table: add TABLE_TIMESPAN_MSEC

5 years agonetwork: make link enter failed state when a configuration fails
Yu Watanabe [Sun, 14 Jul 2019 15:35:49 +0000 (00:35 +0900)]
network: make link enter failed state when a configuration fails

Some path of configuring address, route or etc., go to failed state, but
some do not. E.g., failure in address configuration which is provided by
DHCPv4 goes to failed state, but static address does not.

This is just for consistency. This should not change anything if
everything is fine.

This also voidify manager_rtnl_process_address().

5 years agosystemctl: do not suggest passing --all if the user passed --state=
Alan Jenkins [Tue, 4 Dec 2018 17:31:51 +0000 (17:31 +0000)]
systemctl: do not suggest passing --all if the user passed --state=

"systemctl --failed" suggested I pass "--all" to see units in the inactive
state as well.  I thought this was not very useful.  If you explicitly
asked for units in a specific state, then you already know you have
narrowed it down.  And if you ran "systemctl --state=inactive", it is even
more strange to see this message.

@keszybz suggests we probably don't want to suggest "list-unit-files"
either :-).  Let's only suggest that if the user passed "--state=inactive".

Finally, this means the output for "systemctl --failed" could be just
"0 loaded units listed".  In this case, we don't need any highlight on that
text, to distinguish it from the hint.  This matches "list-unit-files".
This also means we happen to avoid using red highlight, when there are zero
failed units, as if that itself was a failure.  @kesbyz pointed out that
old behaviour was a bit weird.

5 years agoMerge pull request #13054 from yuwata/network-dhcp-use-domains-8174
Yu Watanabe [Sun, 14 Jul 2019 18:29:19 +0000 (03:29 +0900)]
Merge pull request #13054 from yuwata/network-dhcp-use-domains-8174

network:dhcp4: request domain search list if UseDomains=yes

5 years agonetwork: show known route protocol name nicely in debugging logs
Yu Watanabe [Sun, 14 Jul 2019 00:51:54 +0000 (09:51 +0900)]
network: show known route protocol name nicely in debugging logs

5 years agotest-network: add tests for DHCPv4.UseDomains=
Yu Watanabe [Sun, 14 Jul 2019 01:46:16 +0000 (10:46 +0900)]
test-network: add tests for DHCPv4.UseDomains=

5 years agoUpdate NEWS
Boucman [Sun, 14 Jul 2019 14:41:19 +0000 (16:41 +0200)]
Update NEWS

5 years agoNEWS: add some notes for v243
Lennart Poettering [Sun, 14 Jul 2019 11:18:37 +0000 (13:18 +0200)]
NEWS: add some notes for v243

Let's get this ball rolling.

5 years agonetwork: honor IPv6AcceptRA.UseDomains= setting
Yu Watanabe [Sun, 14 Jul 2019 01:30:24 +0000 (10:30 +0900)]
network: honor IPv6AcceptRA.UseDomains= setting

5 years agonetwork:dhcp4: request domain search list if UseDomains=yes
Yu Watanabe [Sun, 14 Jul 2019 01:29:40 +0000 (10:29 +0900)]
network:dhcp4: request domain search list if UseDomains=yes

Closes #8174.

5 years agoMerge pull request #13042 from poettering/locale-utf8-fix
Lennart Poettering [Sun, 14 Jul 2019 11:31:40 +0000 (13:31 +0200)]
Merge pull request #13042 from poettering/locale-utf8-fix

Locale utf8 fix

5 years agoman: offline-updates: make dependence on system-update.target explicit
Michael Zhivich [Fri, 12 Jul 2019 16:22:30 +0000 (12:22 -0400)]
man: offline-updates: make dependence on system-update.target explicit

Current operation of system-update-cleanup.service (removing /system-update
symlink and rebooting) implies that any update must complete *before*
system-update.target is reached.

Update recommendations to include explicitly setting
Before=system-update.target in services that use offline-updates mode.

Signed-off-by: Michael Zhivich <mzhivich@akamai.com>
5 years agolocale-util: suppress non-UTF-8 locales when enumerating them
Lennart Poettering [Fri, 12 Jul 2019 11:38:43 +0000 (13:38 +0200)]
locale-util: suppress non-UTF-8 locales when enumerating them

Let's hide non-UTF-8 locales by default. It's 2019 after all.

Let's add an undocumented env var to reenable listing them though.

This should substantially shorten the list of choices we offer users,
and only show realistic choices.

note that only firstboot and localectl make use of this information, and
both allow configuration of values outside of these lists, hence all
this change does is hide legacy options, but they are still available if
you know what you do, and that's how it should be.

5 years agolocale-util: normalize UTF-8 locale names
Lennart Poettering [Fri, 12 Jul 2019 11:37:13 +0000 (13:37 +0200)]
locale-util: normalize UTF-8 locale names

Let's generate out lists in the format people expect.

5 years agonetwork: do not change to configuring state needlessly
Yu Watanabe [Sat, 13 Jul 2019 15:02:44 +0000 (00:02 +0900)]
network: do not change to configuring state needlessly

When DHCP or any other dynamic addresses are changed, then
link_request_set_routes() is invoked, and even if no static routes
are configured, the operational state is needlessly changed to
configuring state.
This makes the state is changed only when static routes are configured.

5 years agopo: Fix typo in German translation
Johannes Schmitz [Sat, 13 Jul 2019 12:43:54 +0000 (14:43 +0200)]
po: Fix typo in German translation

5 years agopo: update Polish translation
Piotr Drąg [Sat, 13 Jul 2019 12:43:13 +0000 (14:43 +0200)]
po: update Polish translation

5 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

5 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

5 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.

5 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…

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

5 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

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

5 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

5 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

5 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()

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

5 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.

5 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.

5 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

5 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.

5 years agotree-wide: some more [static] related fixes
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.

5 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

5 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

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

Fixes: #4908

5 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.

5 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

5 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

5 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

5 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

5 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

5 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

5 years agotest: modernize test-alloc-util.c test a bit
Lennart Poettering [Fri, 12 Jul 2019 07:10:13 +0000 (09:10 +0200)]
test: modernize test-alloc-util.c test a bit

5 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

5 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

5 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

5 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().

5 years agotest-network: add tests for route with type local, multicast, anycast, or broadcast
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

5 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

5 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

5 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

5 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

5 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.

5 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.

5 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

5 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

5 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

5 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

5 years agoshared/ask-password-api: backspace all chars at once
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.

5 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.

5 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.

5 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.

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

5 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

5 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

5 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

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

5 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.

5 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.

5 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

5 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.

5 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)

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

5 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.

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

5 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()

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