]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoMerge pull request #12927 from fbuihuu/coredump-cleanup-part-2
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 07:14:20 +0000 (09:14 +0200)] 
Merge pull request #12927 from fbuihuu/coredump-cleanup-part-2

Coredump cleanup part 2

4 years agoMerge pull request #13082 from ddstreet/minor
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jul 2019 06:44:01 +0000 (08:44 +0200)] 
Merge pull request #13082 from ddstreet/minor

Minor fixes in test framework

4 years agotest/test-functions: fix install_dmeventd to correctly install bin/libs
Dan Streetman [Sun, 14 Jul 2019 03:03:26 +0000 (23:03 -0400)] 
test/test-functions: fix install_dmeventd to correctly install bin/libs

4 years agoFree up some resources on Azure Pipelines
Evgeny Vereshchagin [Wed, 17 Jul 2019 02:48:02 +0000 (02:48 +0000)] 
Free up some resources on Azure Pipelines

Let's drop the tests we also run on CentOS CI to free up some resources
for something more useful.

4 years agotest/test-functions: instmods call to find should use -type f 13082/head
Dan Streetman [Sun, 14 Jul 2019 01:39:03 +0000 (21:39 -0400)] 
test/test-functions: instmods call to find should use -type f

without using -type f, the logs print an error such as:

E:  E: modprobe: FATAL: Module asymmetric_keys not found in directory /lib/modules/4.15.0-54-generic

while this doesn't appear to cause problems, it can be extremely
distracting when trying to debug real failures.

4 years agotest: when stripping binaries, ignore case in suppressing "File format not recognized"
Dan Streetman [Sat, 13 Jul 2019 17:29:48 +0000 (13:29 -0400)] 
test: when stripping binaries, ignore case in suppressing "File format not recognized"

The grep -v matches all lowercase, but "file" is captialized; just ignore case so
it's suppressed for either all lowercase or capital File.

4 years agotest: ignore errors during test cleanup, so cleanup can finish
Dan Streetman [Fri, 12 Jul 2019 18:09:48 +0000 (14:09 -0400)] 
test: ignore errors during test cleanup, so cleanup can finish

Also move TESTDIR and STATEFILE removal into test_cleanup

4 years agotest: add create_empty_image_rootdir() to simplify testcase setup
Dan Streetman [Fri, 12 Jul 2019 15:47:26 +0000 (11:47 -0400)] 
test: add create_empty_image_rootdir() to simplify testcase setup

Almost all tests were manually mounting/unmounting $TESTDIR/root
from the loopback image; this moves all that into test-functions
so the test setup functions are simplier.

Also add test_setup_cleanup() function, to cleanup what is mounted
by create_empty_image_rootdir()

4 years agoMerge pull request #13069 from yuwata/network-do-not-set-routes-when-carrier-lost
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

4 years agopid1: make sure to restore correct default values for some rlimits
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.

4 years agoMerge pull request #12851 from evverx/test-01-basic-asan
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

4 years agoMerge pull request #13077 from poettering/activate-n-fds
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

4 years agoMerge pull request #13076 from keszybz/pr/13062
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

4 years agotest-network: extend sleep time 13069/head
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...

4 years agonetwork: do not configure routes when dropping addresses
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.

4 years agocoredump: (void)ify all calls of iovw_put_string_field() where we ignore failure... 12927/head
Franck Bui [Fri, 5 Jul 2019 13:35:47 +0000 (15:35 +0200)] 
coredump: (void)ify all calls of iovw_put_string_field() where we ignore failure on purpose

All those calls are dealing with optional metadata.

4 years agocoredump: gather all process metadata in iovecs first and then cache them
Franck Bui [Thu, 27 Jun 2019 16:23:01 +0000 (18:23 +0200)] 
coredump: gather all process metadata in iovecs first and then cache them

Now we first gather all process metadata and populate the process info cache
with them. In this way, the cache only references metadata recorded in iovecs[]
so there's no need to bother freeing (part of) cached metadata later.

The other advantage is that the coredump handler mode and the service mode are
more similar as the cache is populated in the same way for both cases.

It also renames the array indexes so it becomes clear which metadata are passed
by the kernel and which ones are retrieved from the runtime environment.

4 years agocoredump: use 'input_fd' name for the pipe fd passed by the kernel everywhere
Franck Bui [Fri, 28 Jun 2019 04:52:07 +0000 (06:52 +0200)] 
coredump: use 'input_fd' name for the pipe fd passed by the kernel everywhere

'input_fd' variable name is used mostly everywhere except in process_socket()
where it's named 'coredump_fd', which is pretty confusing since 'coredump_fd'
is used for the coredump filename in submit_coredump().

So let's use 'input_fd' consistently as name for the pipe fd passed by the
kernel.

No functional changes.

4 years agoMerge pull request #13038 from poettering/pam-fixes
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

4 years agotests: bump up QEMU_MEM 12851/head
Evgeny Vereshchagin [Tue, 16 Jul 2019 15:01:26 +0000 (15:01 +0000)] 
tests: bump up QEMU_MEM

4 years agotests: run TEST-01-BASIC under ASAN+UBSan again
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.

4 years agoMerge pull request #12925 from yuwata/network-generator
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

4 years agoMerge pull request #13074 from poettering/format-tree-many
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

4 years agoMerge pull request #13073 from poettering/variety-galore
Lennart Poettering [Tue, 16 Jul 2019 13:59:31 +0000 (15:59 +0200)] 
Merge pull request #13073 from poettering/variety-galore

Variety galore

4 years agojournal: properly read unaligned le64 integers 13077/head
Lennart Poettering [Tue, 16 Jul 2019 13:22:26 +0000 (15:22 +0200)] 
journal: properly read unaligned le64 integers

Fixes: #13051
Replaces: #13064

4 years agoactivate: move array allocation to heap
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

4 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
```

4 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

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

4 years agotree-wide: use lowercase table headers 13076/head
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.

4 years agopid1: split out another helper func for two similar code paths
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

4 years agopid1: split out 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

4 years agorun: move comment to appropriate place
Zbigniew Jędrzejewski-Szmek [Tue, 16 Jul 2019 10:22:37 +0000 (12:22 +0200)] 
run: move comment to appropriate place

4 years agosystemctl: print non-elapsing timers as "n/a" not "(null)"
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 }

4 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

4 years agoanalyze: port over one part of systemd-analyze to use new table_add_many() concepts 13074/head
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

4 years agoformat-table: add some minimal testing for new table_add_many() features
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

4 years agoformat-table: add ability to set cell attributes within table_add_many()
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.

4 years agotest: make sure colors don't confuse our test
Lennart Poettering [Tue, 16 Jul 2019 10:42:43 +0000 (12:42 +0200)] 
test: make sure colors don't confuse our test

4 years agoformat-table: fix parameter name
Lennart Poettering [Tue, 16 Jul 2019 10:42:19 +0000 (12:42 +0200)] 
format-table: fix parameter name

4 years agoshared: no need to check result of strndupa() 13073/head
Lennart Poettering [Tue, 16 Jul 2019 10:09:02 +0000 (12:09 +0200)] 
shared: no need to check result of strndupa()

4 years agotree-wide: use empty-to-root a bit more
Lennart Poettering [Tue, 16 Jul 2019 10:08:47 +0000 (12:08 +0200)] 
tree-wide: use empty-to-root a bit more

4 years agocryptsetup: no need to zero-initialize zero-initialized structures
Lennart Poettering [Tue, 16 Jul 2019 09:54:12 +0000 (11:54 +0200)] 
cryptsetup: no need to zero-initialize zero-initialized structures

4 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

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

4 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

4 years agoanalyze: fix formatting of timestamps with 0 µs
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.

4 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
```

4 years agoApply empty_to_root() in three more spots for safety 13063/head
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

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

4 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

4 years agotest-network: make wait_online() check setup state 13058/head
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.

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

4 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

4 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

4 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

4 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

4 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

4 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

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

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

4 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

4 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

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

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

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

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

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

4 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

4 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>
4 years agolocale-util: suppress non-UTF-8 locales when enumerating them 13042/head
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.

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

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

4 years agotest: add TEST-35-NETWORK-GENERATOR 12925/head
Yu Watanabe [Fri, 12 Jul 2019 19:37:19 +0000 (04:37 +0900)] 
test: add TEST-35-NETWORK-GENERATOR

4 years agotest: add simple tests for network-generator
Yu Watanabe [Fri, 12 Jul 2019 18:35:51 +0000 (03:35 +0900)] 
test: add simple tests for network-generator

4 years agonetwork-generator: introduce new tool systemd-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.

4 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

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

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 agofactory: include pam_keyinit.so in PAM factory configuration 13038/head
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.

4 years agofactory: add comment to PAM file, explaining that the defaults are not useful
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

4 years agofactory: tighten PAM configuration
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
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