Yu Watanabe [Mon, 27 May 2019 01:50:52 +0000 (10:50 +0900)]
resolvectl: support networkd managed interfaces
Closes #9808.
Yu Watanabe [Sun, 26 May 2019 23:52:27 +0000 (08:52 +0900)]
network: implement DBus methods to set DNS related properties
Yu Watanabe [Sun, 26 May 2019 23:35:28 +0000 (08:35 +0900)]
resolve: expose dns_server_address_valid()
Yu Watanabe [Fri, 12 Jul 2019 02:11:08 +0000 (11:11 +0900)]
network: introduce GetLinkByName and GetLinkByIndex bus methods
Yu Watanabe [Sun, 26 May 2019 20:35:52 +0000 (05:35 +0900)]
network: implement ListLinks DBus method
Yu Watanabe [Tue, 2 Jul 2019 14:26:03 +0000 (23:26 +0900)]
network: move manager dbus prototypes to networkd-manager-bus.h
Yu Watanabe [Tue, 16 Jul 2019 21:56:32 +0000 (06:56 +0900)]
Merge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-lost
network: do not configure routes when dropping addresses
Franck Bui [Wed, 10 Jul 2019 15:00:46 +0000 (17:00 +0200)]
pid1: make sure to restore correct default values for some rlimits
Commit
fb39af4ce42d7ef9af63009f271f404038703704 forgot to restore the default
rlimit values (RLIMIT_NOFILE and RLIMIT_MEMLOCK) while PID1 is reloading.
This patch extracts the code in charge of initializing the default values for
those rlimits in order to create dedicated functions, which take care of their
initialization.
These functions are then called in parse_configuration() so we make sure that
the default values for these rlimits get restored every time PID1 is reloading
its configuration.
Frantisek Sumsal [Tue, 16 Jul 2019 18:51:59 +0000 (18:51 +0000)]
Merge pull request #12851 from evverx/test-01-basic-asan
tests: run TEST-01-BASIC under ASAN+UBSan again
Frantisek Sumsal [Tue, 16 Jul 2019 18:46:30 +0000 (18:46 +0000)]
Merge pull request #13077 from poettering/activate-n-fds
activate: move array allocation to heap
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 18:02:26 +0000 (20:02 +0200)]
Merge pull request #13076 from keszybz/pr/13062
Timer formatting fixes
Yu Watanabe [Tue, 16 Jul 2019 16:01:07 +0000 (01:01 +0900)]
test-network: extend sleep time
Even if addresses provided by DHCP is assigned, the state file may not
be written yet, or resolved may not receive the state change signal
yet, or resolved may not process the signal yet...
Yu Watanabe [Tue, 16 Jul 2019 04:02:38 +0000 (13:02 +0900)]
network: do not configure routes when dropping addresses
Follow-up for
4ff296b02411bb4f0dc38f48cbab06f8645d2a08.
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 15:09:29 +0000 (17:09 +0200)]
Merge pull request #13038 from poettering/pam-fixes
tmpfiles factory PAM tweaks
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:26 +0000 (15:01 +0000)]
tests: bump up QEMU_MEM
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:04 +0000 (15:01 +0000)]
tests: run TEST-01-BASIC under ASAN+UBSan again
Not that `journalctl --flush` is no longer flaky, it should be
safe to bring the test back.
Lennart Poettering [Tue, 16 Jul 2019 14:23:42 +0000 (16:23 +0200)]
Merge pull request #12925 from yuwata/network-generator
network-generator: introduce new tool systemd-network-generator
Lennart Poettering [Tue, 16 Jul 2019 14:03:54 +0000 (16:03 +0200)]
Merge pull request #13074 from poettering/format-tree-many
table_add_many() improvements
Lennart Poettering [Tue, 16 Jul 2019 13:59:31 +0000 (15:59 +0200)]
Merge pull request #13073 from poettering/variety-galore
Variety galore
Lennart Poettering [Tue, 16 Jul 2019 13:22:26 +0000 (15:22 +0200)]
journal: properly read unaligned le64 integers
Fixes: #13051
Replaces: #13064
Lennart Poettering [Tue, 16 Jul 2019 12:52:07 +0000 (14:52 +0200)]
activate: move array allocation to heap
In theory 'n' could get quite large, and some sanitizers notice that,
let's hence avoid the stack, and use the heap instead.
Moreover, there's no need to include the first 3 fds in the array,
close_all() excludes those anyway.
See: #13064
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
```
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
Yu Watanabe [Tue, 16 Jul 2019 01:46:27 +0000 (10:46 +0900)]
doc: update explanation of IPv6AcceptRA=
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:32:51 +0000 (13:32 +0200)]
tree-wide: use lowercase table headers
https://github.com/systemd/systemd/pull/13062#discussion_r303847484
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 11:08:41 +0000 (13:08 +0200)]
pid1: split out another helper func for two similar code paths
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:54:05 +0000 (12:54 +0200)]
pid1: split out helper func for two similar code paths
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:22:37 +0000 (12:22 +0200)]
run: move comment to appropriate place
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:16:24 +0000 (12:16 +0200)]
systemctl: print non-elapsing timers as "n/a" not "(null)"
TimersCalendar={ OnCalendar=1970-01-01 00:00:00 UTC ; next_elapse=(null) }
↓
TimersCalendar={ OnCalendar=1970-01-01 00:00:00 UTC ; next_elapse=n/a }
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
Lennart Poettering [Tue, 16 Jul 2019 10:45:38 +0000 (12:45 +0200)]
analyze: port over one part of systemd-analyze to use new table_add_many() concepts
Lennart Poettering [Tue, 16 Jul 2019 10:45:13 +0000 (12:45 +0200)]
format-table: add some minimal testing for new table_add_many() features
Lennart Poettering [Tue, 16 Jul 2019 10:43:42 +0000 (12:43 +0200)]
format-table: add ability to set cell attributes within table_add_many()
table_add_many() is so much shorter and easier to read than
table_add_cell() with its accessors. Let's teach table_add_many() more
tricks, so that reverting to table_add_cell() is not needed that often
anymore.
Lennart Poettering [Tue, 16 Jul 2019 10:42:43 +0000 (12:42 +0200)]
test: make sure colors don't confuse our test
Lennart Poettering [Tue, 16 Jul 2019 10:42:19 +0000 (12:42 +0200)]
format-table: fix parameter name
Lennart Poettering [Tue, 16 Jul 2019 10:09:02 +0000 (12:09 +0200)]
shared: no need to check result of strndupa()
Lennart Poettering [Tue, 16 Jul 2019 10:08:47 +0000 (12:08 +0200)]
tree-wide: use empty-to-root a bit more
Lennart Poettering [Tue, 16 Jul 2019 09:54:12 +0000 (11:54 +0200)]
cryptsetup: no need to zero-initialize zero-initialized structures
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
Yu Watanabe [Tue, 16 Jul 2019 01:30:47 +0000 (10:30 +0900)]
NEWS: update section name
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
Zbigniew Jędrzejewski-Szmek [Mon, 15 Jul 2019 17:11:16 +0000 (19:11 +0200)]
analyze: fix formatting of timestamps with 0 µs
There is a rule that "%.0d" formats 0 as "". There is no such rule for
"%0d" and 0 :(. The output had an extra 0 if usec was 0.
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
```
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
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...
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
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.
Yu Watanabe [Mon, 15 Jul 2019 16:15:57 +0000 (01:15 +0900)]
bash-completion: add missing 'systemd-analyze timestamp'
Yu Watanabe [Mon, 15 Jul 2019 16:14:20 +0000 (01:14 +0900)]
analyze: format output of 'systemd-analyze timestamp' 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
Yu Watanabe [Mon, 15 Jul 2019 15:45:05 +0000 (00:45 +0900)]
analyze: format output of 'systemd-analyze calendar' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:44:14 +0000 (00:44 +0900)]
format-table: add TABLE_TIMESTAMP_UTC and _RELATIVE
Yu Watanabe [Mon, 15 Jul 2019 15:19:59 +0000 (00:19 +0900)]
analyze: format output of 'systemd-analyze blame' by using Table
Yu Watanabe [Mon, 15 Jul 2019 15:09:39 +0000 (00:09 +0900)]
format-table: add TABLE_TIMESPAN_MSEC
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().
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.
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
Yu Watanabe [Sun, 14 Jul 2019 00:51:54 +0000 (09:51 +0900)]
network: show known route protocol name nicely in debugging logs
Yu Watanabe [Sun, 14 Jul 2019 01:46:16 +0000 (10:46 +0900)]
test-network: add tests for DHCPv4.UseDomains=
Boucman [Sun, 14 Jul 2019 14:41:19 +0000 (16:41 +0200)]
Update NEWS
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.
Yu Watanabe [Sun, 14 Jul 2019 01:30:24 +0000 (10:30 +0900)]
network: honor IPv6AcceptRA.UseDomains= setting
Yu Watanabe [Sun, 14 Jul 2019 01:29:40 +0000 (10:29 +0900)]
network:dhcp4: request domain search list if UseDomains=yes
Closes #8174.
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
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>
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.
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.
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.
Yu Watanabe [Fri, 12 Jul 2019 19:37:19 +0000 (04:37 +0900)]
test: add TEST-35-NETWORK-GENERATOR
Yu Watanabe [Fri, 12 Jul 2019 18:35:51 +0000 (03:35 +0900)]
test: add simple tests for network-generator
Yu Watanabe [Fri, 12 Jul 2019 18:35:04 +0000 (03:35 +0900)]
network-generator: introduce new tool systemd-network-generator
The new tool parses dracut's command line options and generates
relevant .network, .netdev, and .link files.
Johannes Schmitz [Sat, 13 Jul 2019 12:43:54 +0000 (14:43 +0200)]
po: Fix typo in German translation
Piotr Drąg [Sat, 13 Jul 2019 12:43:13 +0000 (14:43 +0200)]
po: update Polish translation
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
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
Yu Watanabe [Fri, 12 Jul 2019 14:47:27 +0000 (23:47 +0900)]
udev: make Match.OriginalName=* matches all interfaces
Fixes #13035.
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…
Lennart Poettering [Fri, 12 Jul 2019 11:52:01 +0000 (13:52 +0200)]
firstboot: use color in welcome text
Lennart Poettering [Fri, 12 Jul 2019 11:43:31 +0000 (13:43 +0200)]
firstboot: suppress locale menu if there's nothing to choose from
Lennart Poettering [Fri, 12 Jul 2019 10:48:51 +0000 (12:48 +0200)]
factory: include pam_keyinit.so in PAM factory configuration
We use the keyring, so let's make sure it gets properly initialized for
sessions in factory reset mode.
Lennart Poettering [Fri, 12 Jul 2019 10:20:11 +0000 (12:20 +0200)]
factory: add comment to PAM file, explaining that the defaults are not useful
Lennart Poettering [Fri, 12 Jul 2019 10:17:12 +0000 (12:17 +0200)]
factory: tighten PAM configuration
Apparently PAM reacts differently on different systems (?) and if no
authoritative matching module is found might either succeed/fail,
depending on the system.
Let's lock this down explicitly, by hooking in pam_deny.so.
Of course, these PAM files are just examples, and no distro in its right
mind would ship these unmodified, but let's default to something safe.
Fixes: #12950
Lennart Poettering [Fri, 12 Jul 2019 09:04:12 +0000 (11:04 +0200)]
main: use sysctl_writef() where appropriate
Lennart Poettering [Fri, 12 Jul 2019 08:42:31 +0000 (10:42 +0200)]
shutdown: merge variable declaration lines a bit
Lennart Poettering [Fri, 12 Jul 2019 08:41:28 +0000 (10:41 +0200)]
shutdown: bump kmsg log level to LOG_WARNING only
Fixes: #12337
Lennart Poettering [Fri, 12 Jul 2019 08:41:06 +0000 (10:41 +0200)]
shutdown: rework bump_sysctl_printk_log_level() to use sysctl_writef()
Lennart Poettering [Fri, 12 Jul 2019 08:34:04 +0000 (10:34 +0200)]
sysctl: add sysctl_writef() helper
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.
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.
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
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.
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.
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
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
Lennart Poettering [Fri, 12 Jul 2019 07:55:05 +0000 (09:55 +0200)]
man: add example for setting multiple properties at once
Fixes: #4908
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.
Lennart Poettering [Fri, 12 Jul 2019 07:45:21 +0000 (09:45 +0200)]
man: document that WakeSystem= requires privs
Fixes: #11677
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
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
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