]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoboot: Handle shift and logo keys too 22582/head
Jan Janssen [Mon, 21 Feb 2022 12:45:06 +0000 (13:45 +0100)] 
boot: Handle shift and logo keys too

Some firmware supports sending input events for shift and logo keys.
Previously, we would suppress these with EFI_NOT_READY unless
some other key was pressed alongside, but it is really the job of the
caller to decide how to handle these.

Note that for keys that already have a printable shift representation
the reported input event will not have the shift key bits set
(Shift+a is reported as A). Should some firmware turn out to violate the
spec here we can always remove that part.

3 years agoboot: Properly check status code of console_key_read
Jan Janssen [Mon, 21 Feb 2022 11:52:30 +0000 (12:52 +0100)] 
boot: Properly check status code of console_key_read

In some cases there was a unlikely possibility that we would look
at an uninitialized key value.
Also, returning in case of unexpected input error cases should prevent
infinite looping.

3 years agocore: really skip automatic restart when a JOB_STOP job is pending
Franck Bui [Fri, 18 Feb 2022 09:06:24 +0000 (10:06 +0100)] 
core: really skip automatic restart when a JOB_STOP job is pending

It's not clear why we rescheduled a service auto restart while a stop job for
the unit was pending. The comment claims that the unit shouldn't be restarted
but the code did reschedule an auto restart meanwhile.

In practice that was rarely an issue because the service waited for the next
auto restart to be rescheduled, letting the queued stop job to be proceed and
service_stop() to be called preventing the next restart to complete.

However when RestartSec=0, the timer expired right away making PID1 to
reschedule the unit again, making the timer expired right away... and so
on. This busy loop prevented PID1 to handle any queued jobs (and hence giving
no chance to the start rate limiting to trigger), which made the busy loop last
forever.

This patch breaks this loop by skipping the reschedule of the unit auto restart
and hence not depending on the value of u->restart_usec anymore.

Fixes: #13667
3 years agosystemctl: improve error messages related to halt failures
Ludwig Nussel [Wed, 9 Feb 2022 09:59:22 +0000 (10:59 +0100)] 
systemctl: improve error messages related to halt failures

3 years agoMerge pull request #22585 from poettering/analyze-split-up
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 10:02:57 +0000 (11:02 +0100)] 
Merge pull request #22585 from poettering/analyze-split-up

analyze: split out each verb into its own .c/.h pair

3 years agohwdb: Force release calculator key on all HP OMEN laptops
Lan Tian [Tue, 22 Feb 2022 07:43:32 +0000 (01:43 -0600)] 
hwdb: Force release calculator key on all HP OMEN laptops

3 years agohwdb: add CST Laser Trackball (#22583)
prumian [Tue, 22 Feb 2022 06:47:39 +0000 (07:47 +0100)] 
hwdb: add CST Laser Trackball (#22583)

Set the default to 800DPI as this is what user manual suggests.

3 years agoenv-util: drop unsetenv_erase()
Lennart Poettering [Mon, 21 Feb 2022 16:31:33 +0000 (17:31 +0100)] 
env-util: drop unsetenv_erase()

Follow-up for: e99ca1474145f7fad38bb0255d344f4ad7717ef5

Found by @grigorig: https://github.com/systemd/systemd/commit/e99ca1474145f7fad38bb0255d344f4ad7717ef5#r67071855

3 years agoanalyze: modernize pretty_boot_time() a bit 22585/head
Lennart Poettering [Mon, 21 Feb 2022 15:07:19 +0000 (16:07 +0100)] 
analyze: modernize pretty_boot_time() a bit

Use simple strextend() backed by dynamic memory instead of format string
logic with fixed buffer.

3 years agoanalyze: systematically name verb entry point functions verb_xyz()
Lennart Poettering [Mon, 21 Feb 2022 13:51:56 +0000 (14:51 +0100)] 
analyze: systematically name verb entry point functions verb_xyz()

Some of the functions so far were named do_xyz(), others dump_xyz() and
even others test_xyz(). let's instead name them exactly like the verb
exposed in the command line, just prefixed with verb_

3 years agoanalyze: move "condition" verb into analyze-condition.[ch]
Lennart Poettering [Mon, 21 Feb 2022 13:42:20 +0000 (14:42 +0100)] 
analyze: move "condition" verb into analyze-condition.[ch]

3 years agoanalyze: split out "verify" verb into own .c/.h file
Lennart Poettering [Mon, 21 Feb 2022 13:39:16 +0000 (14:39 +0100)] 
analyze: split out "verify" verb into own .c/.h file

This renames the old analyze-verify.[ch] pair →
analyze-verify-util.[ch], because it's used by the test logic as well,
and by keeping it separate from the verify verb logic we don't have to
import the arg_xyz variables.

3 years agoanalyze: move inspect-elf verb entrypoint into analyze-elf.[ch], too
Lennart Poettering [Mon, 21 Feb 2022 13:09:16 +0000 (14:09 +0100)] 
analyze: move inspect-elf verb entrypoint into analyze-elf.[ch], too

like for the other verbs, let's move the whole entry point for the verb,
too.

3 years agoanalyze: fully move "security" verb to analyze-security.[ch]
Lennart Poettering [Mon, 21 Feb 2022 13:06:15 +0000 (14:06 +0100)] 
analyze: fully move "security" verb to analyze-security.[ch]

let's move the verb entropy point too, like for the other verbs now.

3 years agoanalyze: split out "time" verb
Lennart Poettering [Mon, 21 Feb 2022 12:59:46 +0000 (13:59 +0100)] 
analyze: split out "time" verb

3 years agoanalyze: split out critical chain
Lennart Poettering [Mon, 21 Feb 2022 12:56:59 +0000 (13:56 +0100)] 
analyze: split out critical chain

3 years agoanalyze: split out "unit-files" verb
Lennart Poettering [Mon, 21 Feb 2022 12:50:35 +0000 (13:50 +0100)] 
analyze: split out "unit-files" verb

3 years agoanalyze: split out "unit-paths" verb
Lennart Poettering [Mon, 21 Feb 2022 12:47:38 +0000 (13:47 +0100)] 
analyze: split out "unit-paths" verb

3 years agoanalyze: split out log control verb
Lennart Poettering [Mon, 21 Feb 2022 12:44:37 +0000 (13:44 +0100)] 
analyze: split out log control verb

3 years agoanalyze: split out cat-config verb
Lennart Poettering [Mon, 21 Feb 2022 12:40:45 +0000 (13:40 +0100)] 
analyze: split out cat-config verb

3 years agoanalyze: split out "plot" verb
Lennart Poettering [Mon, 21 Feb 2022 12:36:40 +0000 (13:36 +0100)] 
analyze: split out "plot" verb

3 years agoanalyze: split out "blame" verb + time helpers
Lennart Poettering [Mon, 21 Feb 2022 12:27:08 +0000 (13:27 +0100)] 
analyze: split out "blame" verb + time helpers

3 years agoanalyze: split out "capability" verb
Lennart Poettering [Mon, 21 Feb 2022 10:04:31 +0000 (11:04 +0100)] 
analyze: split out "capability" verb

3 years agoanalyze: split out "exit-status" verb
Lennart Poettering [Mon, 21 Feb 2022 10:00:53 +0000 (11:00 +0100)] 
analyze: split out "exit-status" verb

3 years agoanalyze: highlight the range of deprecated verbs in comments a bit better
Lennart Poettering [Mon, 21 Feb 2022 09:54:06 +0000 (10:54 +0100)] 
analyze: highlight the range of deprecated verbs in comments a bit better

3 years agoanalyze: split out "service-watchdogs" verb
Lennart Poettering [Mon, 21 Feb 2022 09:52:49 +0000 (10:52 +0100)] 
analyze: split out "service-watchdogs" verb

3 years agoanalyze: split out "dot" verb
Lennart Poettering [Mon, 21 Feb 2022 09:47:48 +0000 (10:47 +0100)] 
analyze: split out "dot" verb

3 years agoanalyze: split out "dump" verb
Lennart Poettering [Mon, 21 Feb 2022 09:39:09 +0000 (10:39 +0100)] 
analyze: split out "dump" verb

3 years agoanalyze: split out "syscall-filter" verb
Lennart Poettering [Mon, 21 Feb 2022 09:30:53 +0000 (10:30 +0100)] 
analyze: split out "syscall-filter" verb

3 years agoanalyze: split out "filesystems" verb into its own .c/.h file pair
Lennart Poettering [Mon, 21 Feb 2022 09:25:36 +0000 (10:25 +0100)] 
analyze: split out "filesystems" verb into its own .c/.h file pair

3 years agoanalyze: split out calendar verb into own .c/.h file
Lennart Poettering [Mon, 21 Feb 2022 09:18:57 +0000 (10:18 +0100)] 
analyze: split out calendar verb into own .c/.h file

3 years agoanalyze: split out "timestamp" verb into its own .c/.h files
Lennart Poettering [Mon, 21 Feb 2022 09:14:57 +0000 (10:14 +0100)] 
analyze: split out "timestamp" verb into its own .c/.h files

3 years agoanalyze: split out "timespan" verb into its own .c/.h file
Lennart Poettering [Mon, 21 Feb 2022 09:09:06 +0000 (10:09 +0100)] 
analyze: split out "timespan" verb into its own .c/.h file

3 years agoMerge pull request #22573 from mrc0mmand/epoch-timestamp
Lennart Poettering [Mon, 21 Feb 2022 15:13:47 +0000 (16:13 +0100)] 
Merge pull request #22573 from mrc0mmand/epoch-timestamp

time-util: introduce TIMESTAMP_UNIX

3 years agosystemctl,man: update docs for `--timestamp=` 22573/head
Frantisek Sumsal [Mon, 21 Feb 2022 12:14:18 +0000 (13:14 +0100)] 
systemctl,man: update docs for `--timestamp=`

3 years agotime-util: introduce TIMESTAMP_UNIX
Frantisek Sumsal [Mon, 21 Feb 2022 12:08:20 +0000 (13:08 +0100)] 
time-util: introduce TIMESTAMP_UNIX

Allow formatting timestamps as number of seconds since the Epoch for easier
machine parsing.

Fixes: #22567
```
$ systemctl show systemd-journald | grep Timestamp
WatchdogTimestampMonotonic=0
ExecMainStartTimestamp=Sat 2021-12-11 15:25:57 CET
ExecMainStartTimestampMonotonic=13030408
ExecMainExitTimestampMonotonic=0
StateChangeTimestamp=Sat 2021-12-11 15:25:57 CET
StateChangeTimestampMonotonic=13049273
InactiveExitTimestamp=Sat 2021-12-11 15:25:57 CET
InactiveExitTimestampMonotonic=13030430
ActiveEnterTimestamp=Sat 2021-12-11 15:25:57 CET
ActiveEnterTimestampMonotonic=13049273
ActiveExitTimestamp=Sat 2021-12-11 15:25:57 CET
ActiveExitTimestampMonotonic=12997236
InactiveEnterTimestamp=Sat 2021-12-11 15:25:57 CET
InactiveEnterTimestampMonotonic=13028890
ConditionTimestamp=Sat 2021-12-11 15:25:57 CET
ConditionTimestampMonotonic=13029539
AssertTimestamp=Sat 2021-12-11 15:25:57 CET
AssertTimestampMonotonic=13029540

$ systemctl show --timestamp=unix systemd-journald | grep Timestamp
WatchdogTimestampMonotonic=0
ExecMainStartTimestamp=@1639232757
ExecMainStartTimestampMonotonic=13030408
ExecMainExitTimestampMonotonic=0
StateChangeTimestamp=@1639232757
StateChangeTimestampMonotonic=13049273
InactiveExitTimestamp=@1639232757
InactiveExitTimestampMonotonic=13030430
ActiveEnterTimestamp=@1639232757
ActiveEnterTimestampMonotonic=13049273
ActiveExitTimestamp=@1639232757
ActiveExitTimestampMonotonic=12997236
InactiveEnterTimestamp=@1639232757
InactiveEnterTimestampMonotonic=13028890
ConditionTimestamp=@1639232757
ConditionTimestampMonotonic=13029539
AssertTimestamp=@1639232757
AssertTimestampMonotonic=13029540
```

3 years agoMerge pull request #22579 from ml-/fix-discoverable-partitions-table
Zbigniew Jędrzejewski-Szmek [Mon, 21 Feb 2022 08:02:05 +0000 (09:02 +0100)] 
Merge pull request #22579 from ml-/fix-discoverable-partitions-table

docs: fix discoverable partitions table

3 years agodocs: swap Name and Partition Type UUID in header 22579/head
Matthias Lisin [Mon, 21 Feb 2022 01:46:57 +0000 (02:46 +0100)] 
docs: swap Name and Partition Type UUID in header

3 years agotools: adjust re.match to recent gpt.h additions
Matthias Lisin [Mon, 21 Feb 2022 01:32:25 +0000 (02:32 +0100)] 
tools: adjust re.match to recent gpt.h additions

with addition of SD_ID128_MAKE_UUID_STR entries to src/shared/gpt.h the tool
failed halfway due to falsly matching the new entries

3 years agoenv-util: replace unsetenv_erase() by new getenv_steal_erase() helper
Lennart Poettering [Fri, 18 Feb 2022 23:08:39 +0000 (00:08 +0100)] 
env-util: replace unsetenv_erase() by new getenv_steal_erase() helper

The new helper combines a bunch of steps every invocation of
unsetenv_erase() did so far: getenv() + strdup() + unsetenv_erase().
Let's unify this into one helper that is harder to use incorrectly. It's
in inspired by TAKE_PTR() in a way: get the env var out and invalidate
where it was before.

3 years agoNEWS: fix typo
Yu Watanabe [Sun, 20 Feb 2022 02:10:44 +0000 (11:10 +0900)] 
NEWS: fix typo

3 years agomkosi CI: mask isc-dhcp-server units
Luca Boccassi [Fri, 18 Feb 2022 22:56:56 +0000 (22:56 +0000)] 
mkosi CI: mask isc-dhcp-server units

The packages are installed to provide the dhcpd binary, used by
test/test-network/systemd-networkd-tests.py, but we don't need the units
to run, and in fact in some cases the image fails to boot because of
them:

Spawning container image on /home/runner/work/systemd/systemd/image.raw.
Press ^] three times within 1s to kill container.
● isc-dhcp-server.service  loaded failed failed ISC DHCP IPv4 server
● isc-dhcp-server6.service loaded failed failed ISC DHCP IPv6 server
Container image failed with error code 1.
Error: Process completed with exit code 1.

Mask the units with an --extra-tree.

3 years agosystemctl: make `--timestamp=` affect the `show` verb as well
Frantisek Sumsal [Fri, 18 Feb 2022 22:09:18 +0000 (23:09 +0100)] 
systemctl: make `--timestamp=` affect the `show` verb as well

Currently the `--timestamp=` option has no effect on timestamps shown by
`systemctl show`, let's fix that.

Spotted in #22567.

Before:
```
$ systemctl show --timestamp=us+utc systemd-journald | grep Timestamp=
ExecMainStartTimestamp=Sat 2021-12-11 15:25:57 CET
StateChangeTimestamp=Sat 2021-12-11 15:25:57 CET
InactiveExitTimestamp=Sat 2021-12-11 15:25:57 CET
ActiveEnterTimestamp=Sat 2021-12-11 15:25:57 CET
ActiveExitTimestamp=Sat 2021-12-11 15:25:57 CET
InactiveEnterTimestamp=Sat 2021-12-11 15:25:57 CET
ConditionTimestamp=Sat 2021-12-11 15:25:57 CET
AssertTimestamp=Sat 2021-12-11 15:25:57 CET
```

After:
```
$ systemctl show --timestamp=us+utc systemd-journald | grep Timestamp=
ExecMainStartTimestamp=Sat 2021-12-11 14:25:57.177848 UTC
StateChangeTimestamp=Sat 2021-12-11 14:25:57.196714 UTC
InactiveExitTimestamp=Sat 2021-12-11 14:25:57.177871 UTC
ActiveEnterTimestamp=Sat 2021-12-11 14:25:57.196714 UTC
ActiveExitTimestamp=Sat 2021-12-11 14:25:57.144677 UTC
InactiveEnterTimestamp=Sat 2021-12-11 14:25:57.176331 UTC
ConditionTimestamp=Sat 2021-12-11 14:25:57.176980 UTC
AssertTimestamp=Sat 2021-12-11 14:25:57.176980 UTC

```

3 years agogenerator: Rename password arg
Jan Janssen [Fri, 18 Feb 2022 18:38:09 +0000 (19:38 +0100)] 
generator: Rename password arg

This function does not expect a password, but a key file path. The
cryptsetup helper binary even calls it that.

No Code changes.

Follow up on: 6e41f4dd916293f35d7d35cea7eed1807d7ea771
Fixes: https://github.com/systemd/systemd/security/code-scanning/81
3 years agoMerge pull request #22546 from poettering/resolved-bus-error-reply-rework
Luca Boccassi [Fri, 18 Feb 2022 22:20:17 +0000 (22:20 +0000)] 
Merge pull request #22546 from poettering/resolved-bus-error-reply-rework

resolved: rework how we reply to D-Bus messages for resolution requests

3 years agoresolved: rework how we reply to D-Bus messages for resolution requests 22546/head
Lennart Poettering [Thu, 17 Feb 2022 10:48:31 +0000 (11:48 +0100)] 
resolved: rework how we reply to D-Bus messages for resolution requests

This reworks how we reply to D-Bus messages that come in for resolution
requests. Previously, we'd store them in the .bus_request field of
the main DnsQuery (but not any auxiliary one), and reply to it whenever
we had something to reply. In error paths this could mean we'd
accidentally reply twice.

This cleans this logic up: whenever we reply to a message we'll now go up
the tree of auxiliary queries, to find the primary query, i.e. the one
we actually want to reply to. Once we found it, we take out the bus
message object, resetting it to NULL. This way we can be sure we'll
reply at most once to each message.

Fixes: #22477
3 years agoresolve: add reference of the original bus message to the aux queries
Yu Watanabe [Fri, 11 Feb 2022 00:43:16 +0000 (09:43 +0900)] 
resolve: add reference of the original bus message to the aux queries

Otherwise, the error in aux queries cannot be replied.

Fixes #22477.

3 years agoMerge pull request #22562 from poettering/logind-bool-fix
Lennart Poettering [Fri, 18 Feb 2022 13:39:44 +0000 (14:39 +0100)] 
Merge pull request #22562 from poettering/logind-bool-fix

machined: fix confusion around "bool" and sd-bus

3 years agomachined: use one_zero() on one more occasion 22562/head
Lennart Poettering [Fri, 18 Feb 2022 12:08:19 +0000 (13:08 +0100)] 
machined: use one_zero() on one more occasion

3 years agomachined: sd-bus expects 'int', not 'bool' when returning unmarshalled booleans
Lennart Poettering [Fri, 18 Feb 2022 12:06:18 +0000 (13:06 +0100)] 
machined: sd-bus expects 'int', not 'bool' when returning unmarshalled booleans

Fixes: #22555
Follow-up for: #22160

3 years agoMerge pull request #22552 from poettering/nss-by-pass-bus-rework
Lennart Poettering [Fri, 18 Feb 2022 11:32:37 +0000 (12:32 +0100)] 
Merge pull request #22552 from poettering/nss-by-pass-bus-rework

fix nss deadlock between dbus-daemon and PID 1

3 years agopid1: set SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon 22552/head
Lennart Poettering [Thu, 17 Feb 2022 13:49:54 +0000 (14:49 +0100)] 
pid1: set SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon

There's currently a deadlock between PID 1 and dbus-daemon: in some
cases dbus-daemon will do NSS lookups (which are blocking) at the same
time PID 1 synchronously blocks on some call to dbus-daemon. Let's break
that by setting SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon,
which will disable synchronously blocking varlink calls from nss-systemd
to PID 1.

In the long run we should fix this differently: remove all synchronous
calls to dbus-daemon from PID 1. This is not trivial however: so far we
had the rule that synchronous calls from PID 1 to the dbus broker are OK
as long as they only go to interfaces implemented by the broke itself
rather than services reachable through it. Given that the relationship
between PID 1 and dbus is kinda special anyway, this was considered
acceptable for the sake of simplicity, since we quite often need
metadata about bus peers from the broker, and the asynchronous logic
would substantially complicate even the simplest method handlers.

This mostly reworks the existing code that sets SYSTEMD_NSS_BYPASS_BUS=
(which is a similar hack to deal with deadlocks between nss-systemd and
dbus-daemon itself) to set SYSTEMD_NSS_DYNAMIC_BYPASS=1 instead. No code
was checking SYSTEMD_NSS_BYPASS_BUS= anymore anyway, and it used to
solve a similar problem, hence it's an obvious piece of code to rework
like this.

Issue originally tracked down by Lukas Märdian. This patch is inspired
and closely based on his patch:

       https://github.com/systemd/systemd/pull/22038

Fixes: #15316
Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
3 years agodocs: $SYSTEMD_NSS_BYPASS_BUS is not honoured anymore, don't document it
Lennart Poettering [Thu, 17 Feb 2022 13:47:34 +0000 (14:47 +0100)] 
docs: $SYSTEMD_NSS_BYPASS_BUS is not honoured anymore, don't document it

It was removed back in 1684c56f40f020e685e70b3d1785d596ff16f892

Follow-up for: 1684c56f40f020e685e70b3d1785d596ff16f892

3 years agopid1: lookup owning PID of BusName= name of services asynchronously
Lennart Poettering [Thu, 17 Feb 2022 13:40:25 +0000 (14:40 +0100)] 
pid1: lookup owning PID of BusName= name of services asynchronously

A first step of removing blocking calls to the D-Bus broker from PID 1.
There's a lot more to got (i.e. grep src/core/ for sd_bus_creds
basically), but it's a start.

Removing blocking calls to D-Bus broker deals systematicallly with
deadlocks caused by dbus-daemon blocking on synchronous IPC calls back
to PID1 (e.g. Varlink calls through nss-systemd). Bugs such as #15316.

Also-see: https://github.com/systemd/systemd/pull/22038#issuecomment-1042958390

3 years agopid1: watch bus name always when we have it
Lennart Poettering [Thu, 17 Feb 2022 16:23:48 +0000 (17:23 +0100)] 
pid1: watch bus name always when we have it

Previously we'd only watch configured service bus names if Type=dbus was
set. Let's also watch it for other types. This is useful to pick up the
main PID of such a service. In fact the code to pick it up was already
in place, alas it didn't do anything given the signal was never received
for it. Fix that.

(It's also useful for debugging)

3 years agoudev-util: add parentheses to make coverity silent
Yu Watanabe [Fri, 18 Feb 2022 05:06:31 +0000 (14:06 +0900)] 
udev-util: add parentheses to make coverity silent

Fixes CID#1474365.

3 years agohwdb: 60-keyboard: Support the buttons on CZC P10T tablet
Lubomir Rintel [Sat, 21 Jul 2018 22:25:51 +0000 (00:25 +0200)] 
hwdb: 60-keyboard: Support the buttons on CZC P10T tablet

The machine has tree buttons connected to an EC that acts as a regular
AT-compatible keyboard controller. It can be either in "Windows 7" or
"Android" mode. It boots up with the earlier, but the Android build on
the tablet switches it on bootup (Windows presumably leaves it as-is).

The "Windows 7" mode, the behavior is very inconvenient: the Home button
emits multiple key presses that presumably do something in Windws 7 while
the second button toggles the RF Kill Switch in addition to producing a
scancode (it's labeled "Back" on Android version of the tablet).

The "Android" mode just sends the good ol' scan codes and this patch
handles them. On mainline Linux, the "x86-android-tablets" driver makes
sure we're in the correct mode.

3 years agomkosi: Add more packages required to run systemd-networkd-tests.py
Daan De Meyer [Thu, 17 Feb 2022 15:41:58 +0000 (15:41 +0000)] 
mkosi: Add more packages required to run systemd-networkd-tests.py

Let's also add the required packages to run systemd-networkd-tests.py
for Ubuntu and Debian. The Fedora and Arch lists are also updated to
include python which is also required to run the tests.

3 years agoMerge pull request #22545 from yuwata/network-match-kind
Yu Watanabe [Thu, 17 Feb 2022 16:20:18 +0000 (01:20 +0900)] 
Merge pull request #22545 from yuwata/network-match-kind

network, udev: introduce Kind= setting in [Match] section

3 years agopackit: drop unnumbered patches as well
Frantisek Sumsal [Thu, 17 Feb 2022 13:02:04 +0000 (14:02 +0100)] 
packit: drop unnumbered patches as well

3 years agotest: set `ReadWritePaths=` only for units from TEST-20
Frantisek Sumsal [Wed, 16 Feb 2022 14:55:09 +0000 (15:55 +0100)] 
test: set `ReadWritePaths=` only for units from TEST-20

as setting it system-wide has some undesirable side-effects.

Follow-up to b6fc524.

3 years agonetwork,udev/net: add Kind= settings in [Match] section 22545/head
Yu Watanabe [Thu, 17 Feb 2022 12:06:12 +0000 (21:06 +0900)] 
network,udev/net: add Kind= settings in [Match] section

This may be useful for writing .network or .link files matching with
virtual interfaces.

Closes #22541.

3 years agoMerge pull request #22540 from yuwata/network-call-ethtool-after-initialized
Yu Watanabe [Thu, 17 Feb 2022 13:59:24 +0000 (22:59 +0900)] 
Merge pull request #22540 from yuwata/network-call-ethtool-after-initialized

network: call ethtool after link is initialized by udevd

3 years agoresolve: refuse AF_UNSPEC when resolving address
Yu Watanabe [Fri, 11 Feb 2022 00:49:13 +0000 (09:49 +0900)] 
resolve: refuse AF_UNSPEC when resolving address

Fixes #22480.

3 years agonetworkctl: show netdev kind
Yu Watanabe [Thu, 17 Feb 2022 12:14:36 +0000 (21:14 +0900)] 
networkctl: show netdev kind

3 years agonetwork: call ethtool after link is initialized by udevd 22540/head
Yu Watanabe [Wed, 16 Feb 2022 20:24:26 +0000 (05:24 +0900)] 
network: call ethtool after link is initialized by udevd

Fixes #22538.

3 years agonetwork: use udev_available() where applicable
Yu Watanabe [Thu, 17 Feb 2022 09:55:24 +0000 (18:55 +0900)] 
network: use udev_available() where applicable

3 years agoudev-util: introduce udev_available() helper function
Yu Watanabe [Thu, 17 Feb 2022 09:47:26 +0000 (18:47 +0900)] 
udev-util: introduce udev_available() helper function

3 years agoMerge pull request #22535 from poettering/dbusctl-range-display
Yu Watanabe [Thu, 17 Feb 2022 07:45:39 +0000 (16:45 +0900)] 
Merge pull request #22535 from poettering/dbusctl-range-display

userdbctl: show UID ranges in output too

3 years agosd-dhcp-server: do not offer server address
Yu Watanabe [Wed, 16 Feb 2022 15:49:21 +0000 (00:49 +0900)] 
sd-dhcp-server: do not offer server address

The server address may be in the pool.

3 years agoMerge pull request #22543 from poettering/logind-fix-bus-bool-prop
Yu Watanabe [Thu, 17 Feb 2022 07:44:51 +0000 (16:44 +0900)] 
Merge pull request #22543 from poettering/logind-fix-bus-bool-prop

logind: fix some sd-bus int/bool/unsigned mixups

3 years agouserdbctl: add a dash of color to users of different dispositions 22535/head
Lennart Poettering [Wed, 16 Feb 2022 14:51:53 +0000 (15:51 +0100)] 
userdbctl: add a dash of color to users of different dispositions

3 years agouserdbctl: show min/max UID boundaries in userdbctl output
Lennart Poettering [Wed, 16 Feb 2022 14:51:20 +0000 (15:51 +0100)] 
userdbctl: show min/max UID boundaries in userdbctl output

3 years agologind: fix bool/int confusion for KillUserProcesses bus property 22543/head
Lennart Poettering [Wed, 16 Feb 2022 21:58:19 +0000 (22:58 +0100)] 
logind: fix bool/int confusion for KillUserProcesses bus property

sd-bus for compat with old C expects "int" for booleans. Internally we
prefer to use C99 "bool" however. When pointing a pointer to it, we need
to handle the fact that they are typically differently sized, hence use
te right accessors for it.

3 years agologind: fix internal types used for EnableWallMessages
Lennart Poettering [Wed, 16 Feb 2022 21:56:47 +0000 (22:56 +0100)] 
logind: fix internal types used for EnableWallMessages

The value is used as a boolean, but stored in an unsigned. It's exposed
with sd-bus default boolean handling which however expects a (signed)
int. Let's clear this up, and use "bool" for this everywhere in
non-local scope, and make sure that when we pass it to sd-bus we
properly pass an "int".

3 years agouser-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.h
Lennart Poettering [Wed, 16 Feb 2022 13:53:57 +0000 (14:53 +0100)] 
user-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.h

Let's have them at a common place, so that we have the ranges altogether
at a minimal set of places.

3 years agoglyph-util: add new glyphs for up/down arrows
Lennart Poettering [Wed, 16 Feb 2022 13:53:34 +0000 (14:53 +0100)] 
glyph-util: add new glyphs for up/down arrows

3 years agoMerge pull request #22531 from poettering/mempcpy-cocci
Lennart Poettering [Wed, 16 Feb 2022 21:20:33 +0000 (22:20 +0100)] 
Merge pull request #22531 from poettering/mempcpy-cocci

coccinelle: add semantic patch for using more mempcpy() instead of memcpy()

3 years agoRevert "resolved: filter out our own stub resolvers when parsing servers"
Lennart Poettering [Wed, 2 Feb 2022 14:45:59 +0000 (15:45 +0100)] 
Revert "resolved: filter out our own stub resolvers when parsing servers"

This reverts commit 0ad4efb14beea9148838a0d974821e3b98cafc47.

See
https://github.com/systemd/systemd/pull/20559#issuecomment-1028011030
for reasoning. Quoting:

> I think it should be OK to advertise extra stub listeners to local
> clients, but you prohibit this now. i.e. there are two different
> concepts here, and we shouldn't mix them up:
>
> 1. tracking configured dns servers and advertise them to local programs
> 2. actually using them ourselves
>
> I am pretty sure that our own stubs are OK for 1 but not OK for 2,
> hence we should filter at the time of use not at the time of parse.

3 years agoMerge pull request #22498 from yuwata/cgroup-threaded-mode
Luca Boccassi [Wed, 16 Feb 2022 18:59:06 +0000 (18:59 +0000)] 
Merge pull request #22498 from yuwata/cgroup-threaded-mode

cgroup: ignore error in attaching process when threaded mode is used

3 years agovirt: Fix Xen Dom0 detection logic to no longer report as VM
Richard Neill [Wed, 2 Feb 2022 18:18:46 +0000 (18:18 +0000)] 
virt: Fix Xen Dom0 detection logic to no longer report as VM

Fixes regression introduced in 599be274c13c503806c85073d7beb1a155ac27bd

Moving the Xen check before the CPUID check, in order to handle the case where
a Xen domain is nested within a hypervisor which can be detected by via the
CPUID check, had an unintended consequence of causing Dom0 to report as a Xen
VM when it is not nested.

This patch stops further checks once it has been determined that Dom0 is not
nested within another hypervisor, meaning that the non-nested case matches its
previous logic (where it does not report as a VM).

Also, tidy the conditionals for the Xen and UML checks by removing handling of
a VIRTUALIZATION_VM_OTHER result, which has no code path.

Fixes #22511

3 years agotree-wide: some coccinelle fixes 22531/head
Lennart Poettering [Wed, 16 Feb 2022 10:50:48 +0000 (11:50 +0100)] 
tree-wide: some coccinelle fixes

3 years agococcinelle: automatically switch some uses of memcpy() → mempcpy()
Lennart Poettering [Wed, 16 Feb 2022 09:52:51 +0000 (10:52 +0100)] 
coccinelle: automatically switch some uses of memcpy() → mempcpy()

Inspired by #22520, let's add a coccinelle script that converts this
automatically.

3 years agotimesync: add missing setting in template
Yu Watanabe [Wed, 16 Feb 2022 14:14:39 +0000 (23:14 +0900)] 
timesync: add missing setting in template

Follow-up for e81a44bf5faa80ec6ca2ef835d559a65c7e27c35.

3 years agoMerge pull request #22526 from poettering/homed-container-uid-range
Lennart Poettering [Wed, 16 Feb 2022 15:36:25 +0000 (16:36 +0100)] 
Merge pull request #22526 from poettering/homed-container-uid-range

homed: map container UID range for homed home directories

3 years agoMerge pull request #22502 from yuwata/udev-net-virtual-wlan-interface
Yu Watanabe [Wed, 16 Feb 2022 14:03:52 +0000 (23:03 +0900)] 
Merge pull request #22502 from yuwata/udev-net-virtual-wlan-interface

network: add virtual wlan interface support

3 years agoMerge pull request #22520 from yuwata/sd-dhcp6-client-cosmetic-follow-ups
Yu Watanabe [Wed, 16 Feb 2022 14:02:51 +0000 (23:02 +0900)] 
Merge pull request #22520 from yuwata/sd-dhcp6-client-cosmetic-follow-ups

sd-dhcp6-client: several cosmetic follow-ups

3 years agoMerge pull request #22271 from keszybz/manager-reexec-freeze
Yu Watanabe [Wed, 16 Feb 2022 14:02:21 +0000 (23:02 +0900)] 
Merge pull request #22271 from keszybz/manager-reexec-freeze

Freeze manager if reexec fails

3 years agoNEWS: update excerpt on container UID/GID mappings 22526/head
Lennart Poettering [Tue, 15 Feb 2022 21:40:34 +0000 (22:40 +0100)] 
NEWS: update excerpt on container UID/GID mappings

3 years agodocs: document homed's use of the container UID mapping
Lennart Poettering [Tue, 15 Feb 2022 21:40:29 +0000 (22:40 +0100)] 
docs: document homed's use of the container UID mapping

3 years agohomed: when using id mapping on the home dirs, also do an identity mapping for the...
Lennart Poettering [Tue, 15 Feb 2022 17:22:37 +0000 (18:22 +0100)] 
homed: when using id mapping on the home dirs, also do an identity mapping for the container UID ranges

Apparently people really want to put high UIDs in their homedirs. Let's
add some minimal support for that.

Further discussion: https://github.com/systemd/systemd/pull/22239#issuecomment-1040421552

Inspired by, based on, and replacing #22239 by Christian Brauner.

3 years agoTODO
Lennart Poettering [Wed, 16 Feb 2022 09:53:54 +0000 (10:53 +0100)] 
TODO

3 years agoman: fix virtualization table
Lennart Poettering [Wed, 16 Feb 2022 09:14:59 +0000 (10:14 +0100)] 
man: fix virtualization table

The count of VM types got out of sync, let's fix that.

Follow-up for b6eca3731dd92b009b182f188936e1c2544574da which forgot to
increase the count by one.

3 years agosd-dhcp6-client: use mempcpy() or mempcpy_safe() 22520/head
Yu Watanabe [Tue, 15 Feb 2022 14:51:28 +0000 (23:51 +0900)] 
sd-dhcp6-client: use mempcpy() or mempcpy_safe()

3 years agomemory-util: introdyce mempcpy_safe()
Yu Watanabe [Tue, 15 Feb 2022 14:50:14 +0000 (23:50 +0900)] 
memory-util: introdyce mempcpy_safe()

3 years agodhcp-identifier: use offsetof()
Yu Watanabe [Tue, 15 Feb 2022 14:43:15 +0000 (23:43 +0900)] 
dhcp-identifier: use offsetof()

Also use appropriate place to store UUID.

3 years agomanager: add {} around cpu sets, use range formatting 22271/head
Zbigniew Jędrzejewski-Szmek [Wed, 16 Feb 2022 07:07:02 +0000 (08:07 +0100)] 
manager: add {} around cpu sets, use range formatting

We would print "Setting NUMA policy to bind, with nodes .".
This is not very clear, change it to "… with nodes {}.".

Also use range formatting for masks to make output shorter.

3 years agomanager: add few ", ignoring" and adjust level in one message
Zbigniew Jędrzejewski-Szmek [Tue, 15 Feb 2022 15:23:04 +0000 (16:23 +0100)] 
manager: add few ", ignoring" and adjust level in one message

3 years agoMerge pull request #22523 from DaanDeMeyer/systemd-networkd-tests-fixes
Yu Watanabe [Wed, 16 Feb 2022 07:04:14 +0000 (16:04 +0900)] 
Merge pull request #22523 from DaanDeMeyer/systemd-networkd-tests-fixes

mkosi: Support running systemd-networkd-tests.py in QEMU

3 years agocore/execute: warn when threaded mode is detected 22498/head
Yu Watanabe [Sun, 13 Feb 2022 11:52:53 +0000 (20:52 +0900)] 
core/execute: warn when threaded mode is detected

Prompted by #22486.