]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoconf-parser: add specific parser for PID values 22458/head
Lennart Poettering [Wed, 9 Feb 2022 09:13:59 +0000 (10:13 +0100)] 
conf-parser: add specific parser for PID values

3 years agotree-wide: use config_parse_safe_string() at various places
Lennart Poettering [Wed, 9 Feb 2022 09:07:17 +0000 (10:07 +0100)] 
tree-wide: use config_parse_safe_string() at various places

3 years agoconf-parser: update config_item_*_lookup() to follow modern coding style
Lennart Poettering [Wed, 9 Feb 2022 08:55:21 +0000 (09:55 +0100)] 
conf-parser: update config_item_*_lookup() to follow modern coding style

Let's rename the return parameters ret_xyz, and always initialize them
if we return >= 0, as per our current coding style.

3 years agoconf-parser: refuse section headers with control characters early, just in case
Lennart Poettering [Wed, 9 Feb 2022 08:47:53 +0000 (09:47 +0100)] 
conf-parser: refuse section headers with control characters early, just in case

3 years agoconf-parser: minor refactorings/modernizations
Lennart Poettering [Wed, 9 Feb 2022 08:47:50 +0000 (09:47 +0100)] 
conf-parser: minor refactorings/modernizations

3 years agoconf-parser: use _cleanup_free_ where appropriate
Lennart Poettering [Wed, 9 Feb 2022 08:47:10 +0000 (09:47 +0100)] 
conf-parser: use _cleanup_free_ where appropriate

3 years agoconf-parse: add generic config_parse_safe_string() helper
Lennart Poettering [Wed, 9 Feb 2022 08:45:12 +0000 (09:45 +0100)] 
conf-parse: add generic config_parse_safe_string() helper

This helper is just like config_parse_string() but does some superficial
checks for control characters and quotes.

In most cases we currently use config_parse_string() we probably want to
use config_parse_safe_string() for safety reasons.

3 years agoAdd support for `isolated` parameter
Santa Wiryaman [Mon, 3 May 2021 22:48:26 +0000 (18:48 -0400)] 
Add support for `isolated` parameter

Add the "Isolated" parameter in the *.network file, e.g.,

[Bridge]
Isolated=true|false

When the Isolated parameter is true, traffic coming out of this port
will only be forward to other ports whose Isolated parameter is false.

When Isolated is not specified, the port uses the kernel default
setting (false).

The "Isolated" parameter was introduced in Linux 4.19.
See man bridge(8) for more details.
But even though the kernel and bridge/iproute2 recognize the "Isolated"
parameter, systemd-networkd did not have a way to set it.

3 years agoci: validate actions and fix actionlint warnings
Evgeny Vereshchagin [Tue, 8 Feb 2022 17:34:10 +0000 (17:34 +0000)] 
ci: validate actions and fix actionlint warnings

some actions like Coverity and CFLite aren't run on every PR so to make
sure they are more or less fine when they are changed it makes sense to
at least check them with superlinter/actionlint: https://github.com/rhysd/actionlint

The following warnings were fixed along the way:
```
.github/workflows/mkosi.yml:55:7: shellcheck reported issue in this script: SC2086:info:6:14: Double quote to prevent globbing and word splitting [shellcheck]
   |
55 |       run: |
   |       ^~~~
.github/workflows/mkosi.yml:55:7: shellcheck reported issue in this script: SC2046:warning:6:40: Quote this to prevent word splitting [shellcheck]
   |
55 |       run: |
   |       ^~~~
.github/workflows/mkosi.yml:55:7: shellcheck reported issue in this script: SC2006:style:6:40: Use $(...) notation instead of legacy backticked `...` [shellcheck]
   |
55 |       run: |
   |       ^~~~
```
```
.github/workflows/coverity.yml:31:9: shellcheck reported issue in this script: SC2086:info:1:93: Double quote to prevent globbing and word splitting [shellcheck]
   |
31 |         run: echo "COVERITY_SCAN_NOTIFICATION_EMAIL=$(git log -1 ${{ github.sha }} --pretty=\"%aE\")" >> $GITHUB_ENV
   |         ^~~~
```

3 years agoUpdate footer.html
Eduard Tolosa [Thu, 3 Feb 2022 18:25:57 +0000 (13:25 -0500)] 
Update footer.html

3 years agoMerge pull request #22446 from poettering/sd-boot-cpuid-vm-tscd
Lennart Poettering [Tue, 8 Feb 2022 20:57:38 +0000 (21:57 +0100)] 
Merge pull request #22446 from poettering/sd-boot-cpuid-vm-tscd

sd-boot: don't read TSC in VM environments, and other TSC fixes

3 years agoMerge pull request #22448 from poettering/coredump-raise-sizes
Yu Watanabe [Tue, 8 Feb 2022 16:23:07 +0000 (01:23 +0900)] 
Merge pull request #22448 from poettering/coredump-raise-sizes

coredump: raise limits

3 years agoRevert "ci: switch to fedora-35 on i386 on Packit"
Yu Watanabe [Sat, 22 Jan 2022 18:07:52 +0000 (03:07 +0900)] 
Revert "ci: switch to fedora-35 on i386 on Packit"

This reverts commit 478c632e00ffbf50012b1946a8a025494c012353.

3 years agoRevert "packit: switch the remaining jobs to F35"
Yu Watanabe [Sat, 22 Jan 2022 18:07:18 +0000 (03:07 +0900)] 
Revert "packit: switch the remaining jobs to F35"

This reverts commit e7642152ae6e867fc569206e905464321a41e58a.

3 years agoudev/net: support to set MDI-X mode
Yu Watanabe [Fri, 4 Feb 2022 04:06:27 +0000 (13:06 +0900)] 
udev/net: support to set MDI-X mode

Closes #22386.

3 years agoMerge pull request #22423 from poettering/repart-sector-size
Lennart Poettering [Tue, 8 Feb 2022 13:47:00 +0000 (14:47 +0100)] 
Merge pull request #22423 from poettering/repart-sector-size

repart: fix sector size handling

3 years agowatchdog: saturate to kernel's max watchdog timeout
Curtis Klein [Sun, 10 Oct 2021 01:18:54 +0000 (18:18 -0700)] 
watchdog: saturate to kernel's max watchdog timeout

Since version 4.5, the max possible timeout is UINT_MAX / 1000 since it
does calculations in milliseconds. A small helper function is added to
make this conversion and saturation and will be used more in the next
commit.

Also document the usage of signed integers by the kernel userspace API.

3 years agoMerge pull request #22442 from DaanDeMeyer/fix-entry-iteration
Lennart Poettering [Tue, 8 Feb 2022 13:29:24 +0000 (14:29 +0100)] 
Merge pull request #22442 from DaanDeMeyer/fix-entry-iteration

journal: Fix entry array iteration in case of corruption

3 years agoMerge pull request #22366 from poettering/journal-file-punch-fix
Daan De Meyer [Tue, 8 Feb 2022 13:03:03 +0000 (13:03 +0000)] 
Merge pull request #22366 from poettering/journal-file-punch-fix

journald: some journal file hole punching fixes

3 years agosd-boot: don't use TSC in virtualized environments 22446/head
Lennart Poettering [Tue, 8 Feb 2022 10:35:10 +0000 (11:35 +0100)] 
sd-boot: don't use TSC in virtualized environments

Replaces: f699bd81e8e18da2d2fc11e7fb7dce95f8bb3f9e

Fixes: #22060
3 years agosd-boot: return 0 (not 1) from ticks_read() in fallback implementation
Lennart Poettering [Tue, 8 Feb 2022 10:27:48 +0000 (11:27 +0100)] 
sd-boot: return 0 (not 1) from ticks_read() in fallback implementation

The single consumer of ticks_read() (i.e. time_usec()) checks for == 0
to detect the "not supported/invalid" case, hence actually return the
right value for that.

3 years agosd-boot: encapsulate freq cache in ticks_freq()
Lennart Poettering [Tue, 8 Feb 2022 10:26:49 +0000 (11:26 +0100)] 
sd-boot: encapsulate freq cache in ticks_freq()

It's usually nicer to abstract a cache away in the provider of a value,
hence do so.

3 years agosd-boot: don't export ticks_read() and ticks_freq()
Lennart Poettering [Tue, 8 Feb 2022 10:25:07 +0000 (11:25 +0100)] 
sd-boot: don't export ticks_read() and ticks_freq()

They only have a single user in time_usec(), hence don't expose them.

3 years agosd-boot: add overflow check to TSC reads
Lennart Poettering [Tue, 8 Feb 2022 10:23:19 +0000 (11:23 +0100)] 
sd-boot: add overflow check to TSC reads

On some archs the counter is 32bit, and in case of virtualization it
might actually overflow, who knows.

3 years agosd-boot: split out TSC/time API
Lennart Poettering [Tue, 8 Feb 2022 10:18:44 +0000 (11:18 +0100)] 
sd-boot: split out TSC/time API

These are a whole family of functions, let's give them their own .c/.h
file.

No code changes, just splitting things out.

3 years agoRevert "boot-timestamps: Discard firmware init time when running in a VM"
Lennart Poettering [Thu, 3 Feb 2022 11:06:54 +0000 (12:06 +0100)] 
Revert "boot-timestamps: Discard firmware init time when running in a VM"

This reverts commit f699bd81e8e18da2d2fc11e7fb7dce95f8bb3f9e (#22063)

We should suppress the TSC data when we generate it if we assume its
invalid, not when we consume it, because at that point we don't even
know if the data stems from TSC or something else.

3 years agodocs: Improve HOME_DIRECTORY.md
adrian5 [Tue, 8 Feb 2022 11:42:19 +0000 (12:42 +0100)] 
docs: Improve HOME_DIRECTORY.md

3 years agoMerge pull request #22430 from yuwata/resolve-fix-memleak-and-use-after-free
Luca Boccassi [Tue, 8 Feb 2022 12:01:14 +0000 (12:01 +0000)] 
Merge pull request #22430 from yuwata/resolve-fix-memleak-and-use-after-free

resolve: fix memleak and use-after-free, and several cleanups

3 years agoman: coredump.conf: document defaults limits 22448/head
Lennart Poettering [Tue, 8 Feb 2022 10:54:37 +0000 (11:54 +0100)] 
man: coredump.conf: document defaults limits

3 years agocoredump: raise the coredump save size on 64bit systems to 32G (and lower it to 1G...
Lennart Poettering [Tue, 8 Feb 2022 10:52:17 +0000 (11:52 +0100)] 
coredump: raise the coredump save size on 64bit systems to 32G (and lower it to 1G on 32bit systems)

Apparently 2G is too low for various real-life systems. But raising it
universally above 2^32 sounds wrong to me, since that makes no sense on
32bit systems, that we still support.

Hence, let's raise the limit to 32G on 64bit systems, and *lower* it to
1G on 32bit systems.

32G is 4 orders of magnitude higher then the old settings. Let's hope
that's enough for now. Should this not be enough we can raise it
further.

Fixes: #22076
3 years agoREADME: CONFIG_KCMP is the new kernel compile time option for kcmp()
Lennart Poettering [Tue, 8 Feb 2022 10:45:00 +0000 (11:45 +0100)] 
README: CONFIG_KCMP is the new kernel compile time option for kcmp()

Fixes: #21947
3 years agotests: add repart tests for block devices with 1024, 2048, 4096 byte sector sizes 22423/head
Lennart Poettering [Mon, 7 Feb 2022 13:35:40 +0000 (14:35 +0100)] 
tests: add repart tests for block devices with 1024, 2048, 4096 byte sector sizes

let's make sure repart works with 4K drives and exotic sector sizes.

3 years agorepart: fix sector size handling
Lennart Poettering [Fri, 4 Feb 2022 16:39:44 +0000 (17:39 +0100)] 
repart: fix sector size handling

This queries the sector size from libfdisk instead of assuming 512, and
uses that when converting from bytes to the offset/size values libfdisk
expects.

This is an alternative to Tom Yan's #21823, but prefers using libfdisk's
own ideas of the sector size instead of going directly to the backing
device via ioctls. (libfdisk can after all also operate on regular
files, where the sector size concept doesn't necessarily apply the same
way.)

This also makes the "grain" variable, i.e. how we'll align the
partitions. Previously this was hardcoded to 4K, and that still will be
the minimum grain we use, but should the sector size be larger than that
we'll use the next multiple of the sector size instead.

3 years agoresolve: reuse timer event source for DnsQuery 22430/head
Yu Watanabe [Sat, 5 Feb 2022 13:31:06 +0000 (22:31 +0900)] 
resolve: reuse timer event source for DnsQuery

If the query get CNAME or DNAME, then the query will be restarted.
Even in that case, previously, the event source was freed and allocated
again. Let's slightly optimize it.

3 years agoresolve: use _cleanup_ attribute for freeing DnsQuery
Yu Watanabe [Sat, 5 Feb 2022 13:04:42 +0000 (22:04 +0900)] 
resolve: use _cleanup_ attribute for freeing DnsQuery

3 years agoresolve: fix possible memleak
Yu Watanabe [Sat, 5 Feb 2022 13:03:19 +0000 (22:03 +0900)] 
resolve: fix possible memleak

Fortunately, unlike the issue fixed in the previous commit, the memleak
should be superficial and not become apparent, as the queries handled
here are managed by the stub stream, and will be freed when the stream
is closed.

Just for safety, and slightly reducing the runtime memory usage by the
stub stream.

3 years agoresolve: fix potential memleak and use-after-free
Yu Watanabe [Sat, 5 Feb 2022 12:37:01 +0000 (21:37 +0900)] 
resolve: fix potential memleak and use-after-free

When stub stream is closed early, then queries associated to the stream
are freed. Previously, the timer event source for queries may not be
disabled, hence may be triggered with already freed query.
See also dns_stub_stream_complete().

Note that we usually not set NULL or zero when freeing simple objects.
But, here DnsQuery is large and complicated object, and the element may
be referenced in subsequent freeing process in the future. Hence, for
safety, let's set NULL to the pointer.

3 years agohwbd: 60-sensor.hwdb: Add Pipo W2Pro
Matt Walton [Fri, 4 Feb 2022 17:47:08 +0000 (11:47 -0600)] 
hwbd: 60-sensor.hwdb: Add Pipo W2Pro

Add accelerometer matrix for Pipo W2Pro tablet. Y-axis was backwards (normal <--> bottom-up).

3 years agooom: Cleanup of information dump code after kill
Benjamin Berg [Mon, 7 Feb 2022 16:34:21 +0000 (17:34 +0100)] 
oom: Cleanup of information dump code after kill

This is a follow up to 29f4185a9cdc ("oomd: Dump top offenders after a
kill action") to clean up the code a bit for review comments that
happened after the code had been merged already.

3 years agowatchdog: work around Coverity confusion
Lennart Poettering [Mon, 7 Feb 2022 09:59:05 +0000 (10:59 +0100)] 
watchdog: work around Coverity confusion

Coverity (and I, initially) get really confused about "fn"'s validity
here. it doesn't grok that free_and_strdup() is actually a NOP in case
the string isn't changed, and assumes it always invalidates the
specified buffer, which it doesn't do though.

Follow-up for: f4b1a6b6419b771d26342a9b75b1d77ee9d90133

3 years agojournal: Improve handling of corruption during upwards entry iteration 22442/head
Daan De Meyer [Mon, 7 Feb 2022 20:19:29 +0000 (20:19 +0000)] 
journal: Improve handling of corruption during upwards entry iteration

If we're going upwards in the journal file during entry iteration and we
can't reach the current entry due to corruption, start iterating upwards
from the last reachable entry array. This is equivalent to skipping
all entries in the array that can't be reached anymore.

Fixes #22431

3 years agojournal: Fix upwards iteration of entry items in case of corruption
Daan De Meyer [Mon, 7 Feb 2022 20:15:07 +0000 (20:15 +0000)] 
journal: Fix upwards iteration of entry items in case of corruption

8d801e35cb155faa08235a5af8b4d6ad60715837 didn't take into account
upwards iteration of entry items when we're working on a corrupted
journal file. Instead of moving to the previous entry array, we'd
always move to the next array, regardless of the iteration direction.

To fix this, we introduce bump_entry_array() that moves to the next
or previous entry array depending on the given direction. Since the
entry array chains are singly linked lists, we have to start iterating
from the front to find the previous array. We only reach this logic
if we're working on a corrupted journal file so being slow here shouldn't
matter too much.

3 years agoMerge pull request #22383 from yuwata/network-generator-keep-configuration
Luca Boccassi [Mon, 7 Feb 2022 18:06:24 +0000 (18:06 +0000)] 
Merge pull request #22383 from yuwata/network-generator-keep-configuration

network: enable KeepConfiguration= when running on network filesystem

3 years agologin: typo fix
Michael Biebl [Mon, 7 Feb 2022 16:49:26 +0000 (17:49 +0100)] 
login: typo fix

3 years agoman: fix typo
Michael Biebl [Mon, 7 Feb 2022 13:57:00 +0000 (14:57 +0100)] 
man: fix typo

3 years agoUpdate CODING_STYLE.md
bearhoney [Mon, 7 Feb 2022 10:41:41 +0000 (11:41 +0100)] 
Update CODING_STYLE.md

Fixed typo.

3 years agotests: also fuzz packets sent in the DHCP6_STATE_SOLICITATION state
Evgeny Vereshchagin [Fri, 4 Feb 2022 15:17:25 +0000 (15:17 +0000)] 
tests: also fuzz packets sent in the DHCP6_STATE_SOLICITATION state

With aborts enabled the fuzzer can catch issues like
https://github.com/systemd/systemd/commit/26a63b81322a3bd8b9fbd43f75897c391708de2c
Let's extend it a bit to let it cover issues like
https://github.com/systemd/systemd/pull/22406#discussion_r798932098

3 years agosd-dhcp6-client: fix sending prefix delegation request during rebind
Thomas Haller [Thu, 3 Feb 2022 17:55:18 +0000 (18:55 +0100)] 
sd-dhcp6-client: fix sending prefix delegation request during rebind

Fixes an assertion failure "pd->type == SD_DHCP6_OPTION_IA_PD" in dhcp6_option_append_pd().

Something similar was done in commit 26a63b81322a ('sd-dhcp6-client: Fix
sending prefix delegation request (#17136)'). The justification is
probably the same.

3 years agonetwork: enable KeepConfiguration= when running on network filesystem 22383/head
Yu Watanabe [Fri, 4 Feb 2022 06:33:38 +0000 (15:33 +0900)] 
network: enable KeepConfiguration= when running on network filesystem

Also, set KeepConfiguration=dhcp-on-stop by default when running in
initrd.

Fixes #21967.

3 years agoMerge pull request #22416 from fbuihuu/misc
Yu Watanabe [Sat, 5 Feb 2022 00:26:40 +0000 (09:26 +0900)] 
Merge pull request #22416 from fbuihuu/misc

Misc

3 years agoMerge pull request #22395 from benzea/benzea/oomd-dump-offenders
Anita Zhang [Fri, 4 Feb 2022 22:44:04 +0000 (14:44 -0800)] 
Merge pull request #22395 from benzea/benzea/oomd-dump-offenders

oomd: Dump top offenders after a kill action

3 years agooomd: Dump top offenders after a kill action 22395/head
Benjamin Berg [Thu, 3 Feb 2022 14:50:31 +0000 (15:50 +0100)] 
oomd: Dump top offenders after a kill action

This hopefully makes it more transparent why a specific cgroup was
killed by systemd-oomd.

3 years agoman: systemd-stdio-bridge doesn't connect "two busses"
Lennart Poettering [Thu, 3 Feb 2022 14:57:00 +0000 (15:57 +0100)] 
man: systemd-stdio-bridge doesn't connect "two busses"

In D-Bus, clients connect to a bus (the usual case), or use direct
questions to each other (the unusual case). A bus is a program one can
connect to and implemented by dbus-daemon or dbus-broker. HOwever,
busses never connect between each other, that doesn't exist. Hence don't
claim so.

This is probably confusion about the fact that sd-bus calls D-Bus
connection objects just "sd_bus" for simplicity, given they are used in
99% of the cases to connect to a bus — only in exceptional cases they
are used for direct connections between peers without involving a bus.

Follow-up for b7bb58ef70b0c876941a1c31ed4e2f5f1dc5ed0e

3 years agojournal-file: explicitly handle file systems that do not support hole punching 22366/head
Lennart Poettering [Wed, 2 Feb 2022 09:42:37 +0000 (10:42 +0100)] 
journal-file: explicitly handle file systems that do not support hole punching

Apparently the error code fallocate() returns if hole punching is not
supported is not too well defined (man page just says "an error is
returned"), hence let's accept the usual set of errors, and the
normalize it to EOPNOTSUPP, and generate a clear error message in this
case.

3 years agojournal-file: fix error handling of pread() in journald_file_punch_holes()
Lennart Poettering [Wed, 2 Feb 2022 09:42:10 +0000 (10:42 +0100)] 
journal-file: fix error handling of pread() in journald_file_punch_holes()

3 years agoMerge pull request #22378 from bluca/on_fail_follow_ups
Lennart Poettering [Fri, 4 Feb 2022 15:29:09 +0000 (16:29 +0100)] 
Merge pull request #22378 from bluca/on_fail_follow_ups

Follow-ups for #20833

3 years agoMerge pull request #22375 from michaelolbrich/watchdog
Lennart Poettering [Fri, 4 Feb 2022 15:28:41 +0000 (16:28 +0100)] 
Merge pull request #22375 from michaelolbrich/watchdog

fix watchdog handling during reboot

3 years agosystemd.netdev(5): fix acronym for DOVE extensions
Ruben Kerkhof [Fri, 4 Feb 2022 15:07:12 +0000 (16:07 +0100)] 
systemd.netdev(5): fix acronym for DOVE extensions

3 years agoshutdown: don't stop the watchdog 22375/head
Michael Olbrich [Wed, 2 Feb 2022 14:33:07 +0000 (15:33 +0100)] 
shutdown: don't stop the watchdog

This basically reverts #22079.

Stopping the watchdog is wrong. The reboot watchdog is supposed to cover
the whole time from the point when systemd start systemd-reboot until the
hardware resets.
Otherwise the system may hang in the final shutdown phase.

Add a comment, why keeping the watchdog running is correct here.

3 years agowatchdog: fix watchdog_set_device() when the default watchdog device is used
Michael Olbrich [Wed, 2 Feb 2022 14:26:53 +0000 (15:26 +0100)] 
watchdog: fix watchdog_set_device() when the default watchdog device is used

If watchdog_set_device() is not called before open_watchdog() then
'watchdog_device' remains 'NULL' while the device is open.

As a result, the "same device" check in watchdog_set_device() does not work
correctly: If no device is specified (e.g. from watchdog_free_device())
then the current fd is not closed.

Fix this by setting 'watchdog_device' to the correct device during
open_watchdog()

3 years agoudev/net_id: show the correct identifier in the debug output of dev_pci_onboard() 22416/head
Franck Bui [Thu, 27 Jan 2022 18:13:24 +0000 (19:13 +0100)] 
udev/net_id: show the correct identifier in the debug output of dev_pci_onboard()

3 years agocore: make use of VALID_CHARS_WITH_AT in unit_name_is_valid()
Franck Bui [Tue, 18 Jan 2022 14:14:12 +0000 (15:14 +0100)] 
core: make use of VALID_CHARS_WITH_AT in unit_name_is_valid()

3 years agostat-util: introduce path_is_network_fs()
Yu Watanabe [Fri, 4 Feb 2022 06:22:20 +0000 (15:22 +0900)] 
stat-util: introduce path_is_network_fs()

3 years agonetwork-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
Yu Watanabe [Thu, 3 Feb 2022 03:14:19 +0000 (12:14 +0900)] 
network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4

To emphasize this is DHCPv4. No behavior is changed.

3 years agohwdb: add HP calculators
Davide Cavalca [Thu, 3 Feb 2022 16:35:35 +0000 (08:35 -0800)] 
hwdb: add HP calculators

3 years agohostnamed: trivial optimization
Lennart Poettering [Thu, 3 Feb 2022 16:19:32 +0000 (17:19 +0100)] 
hostnamed: trivial optimization

3 years agoportable: reopen socket with O_RDONLY
Luca Boccassi [Thu, 3 Feb 2022 17:43:45 +0000 (17:43 +0000)] 
portable: reopen socket with O_RDONLY

Follow-up for e3f7ed944ae750a40685c52349f3cc850db0876e

3 years agoMerge pull request #22408 from mrc0mmand/test-network-cleanup
Luca Boccassi [Thu, 3 Feb 2022 22:50:38 +0000 (22:50 +0000)] 
Merge pull request #22408 from mrc0mmand/test-network-cleanup

test-network: code cleanup

3 years agoMerge pull request #22355 from yuwata/network-tunnel-external
Anita Zhang [Thu, 3 Feb 2022 22:20:43 +0000 (14:20 -0800)] 
Merge pull request #22355 from yuwata/network-tunnel-external

network: tunnel: support external mode

3 years agoboot: Fix some error messages
Jan Janssen [Thu, 3 Feb 2022 18:40:42 +0000 (19:40 +0100)] 
boot: Fix some error messages

3 years agoMerge pull request #22400 from poettering/resolved-single-invalid-list
Anita Zhang [Thu, 3 Feb 2022 19:54:00 +0000 (11:54 -0800)] 
Merge pull request #22400 from poettering/resolved-single-invalid-list

resolved: maintain only a single list of "dont-resolve" domain names

3 years agohostnamed: drop "iteractive" parameter from GetHardwareSerial()
Lennart Poettering [Thu, 3 Feb 2022 16:41:04 +0000 (17:41 +0100)] 
hostnamed: drop "iteractive" parameter from GetHardwareSerial()

Since a long time the D-Bus spec knows a special bit in its message
header for indicating that "interactive" authentication is OK. The
original hostnamed API is before that was added hence most functions
expose that boolean as explicit argument.

For new added functions let's get rid of it, the message flag is good
enough and replaces it with complete functionality.

No new APIs should carry the "interactive" boolean flag explicitly as
argument anymore.

Follow-up for: 9697662915e47a4797b05003cb1970fe2b01e530

3 years agoMerge pull request #22394 from bluca/requires_restart_doc
Anita Zhang [Thu, 3 Feb 2022 19:50:06 +0000 (11:50 -0800)] 
Merge pull request #22394 from bluca/requires_restart_doc

man: explicitly mention that Requires propagates restarts

3 years agosystemctl: use STR_IN_SET() where appropriate
Lennart Poettering [Thu, 3 Feb 2022 12:42:55 +0000 (13:42 +0100)] 
systemctl: use STR_IN_SET() where appropriate

Follow-up for: 8e98568165ee3db049160045d94ce030dc7fbb79

3 years agotest-network: disable irrelevant or one-time pylint checks 22408/head
Frantisek Sumsal [Thu, 3 Feb 2022 18:31:15 +0000 (19:31 +0100)] 
test-network: disable irrelevant or one-time pylint checks

3 years agotest-network: use specific exceptions instead of the Exception class
Frantisek Sumsal [Thu, 3 Feb 2022 18:30:11 +0000 (19:30 +0100)] 
test-network: use specific exceptions instead of the Exception class

3 years agotest-network: avoid name clashing/redefinition
Frantisek Sumsal [Thu, 3 Feb 2022 18:20:42 +0000 (19:20 +0100)] 
test-network: avoid name clashing/redefinition

3 years agotest-network: disable 'no-member' warning for the Utilities class
Frantisek Sumsal [Thu, 3 Feb 2022 18:13:06 +0000 (19:13 +0100)] 
test-network: disable 'no-member' warning for the Utilities class

The warning is correct, since we don't inherit the necessary
unittest.TestCase class, but that's on purpose, since the Utilities
class is not supposed to be instantiated on its own, but should
complement other classes' definitions which do inherit from the
unittest.TestCase class.

3 years agotest-network: use raw strings for regexes with backslashes
Frantisek Sumsal [Thu, 3 Feb 2022 17:55:12 +0000 (18:55 +0100)] 
test-network: use raw strings for regexes with backslashes

It currently works because `\(` and `\)` are not valid escape sequences,
so they're not treated differently. Using raw strings (or double
backslashes) is a more correct solution.

3 years agotest-network: explicitly set check=False for subprocess.run()
Frantisek Sumsal [Thu, 3 Feb 2022 17:49:35 +0000 (18:49 +0100)] 
test-network: explicitly set check=False for subprocess.run()

since we're checking the returned error code explicitly via the
`returncode` member.

3 years agotest-network: convert certain multiline strings to comments
Frantisek Sumsal [Thu, 3 Feb 2022 17:42:41 +0000 (18:42 +0100)] 
test-network: convert certain multiline strings to comments

Multiline comments are converted to docstrings only when they're the
first statement in a function/method. Even though they're still a no-op
otherwise, let's use "true" comments to make pylint happy.

3 years agotest-network: drop unused variables
Frantisek Sumsal [Thu, 3 Feb 2022 17:17:53 +0000 (18:17 +0100)] 
test-network: drop unused variables

3 years agotest-network: drop unnecessary else statements
Frantisek Sumsal [Thu, 3 Feb 2022 17:14:44 +0000 (18:14 +0100)] 
test-network: drop unnecessary else statements

3 years agotest-network: drop unnecessary semicolons
Frantisek Sumsal [Thu, 3 Feb 2022 17:11:26 +0000 (18:11 +0100)] 
test-network: drop unnecessary semicolons

3 years agotest-network: drop superfluous parens
Frantisek Sumsal [Thu, 3 Feb 2022 17:10:06 +0000 (18:10 +0100)] 
test-network: drop superfluous parens

3 years agoresolved: maintain only a single list of "dont-resolve" domain names 22400/head
Lennart Poettering [Thu, 3 Feb 2022 16:16:11 +0000 (17:16 +0100)] 
resolved: maintain only a single list of "dont-resolve" domain names

Follow-up for: 46b53e8035fb60c9a7f26dd32d6689ab3b7da97c

3 years agoman: explicitly mention that Requires propagates restarts 22394/head
Luca Boccassi [Thu, 3 Feb 2022 14:48:27 +0000 (14:48 +0000)] 
man: explicitly mention that Requires propagates restarts

It's implicit, but the actions are different, so let's be explicit to
avoid any confusion.

3 years agofix italian translations to display unit name
Leviticoh [Thu, 3 Feb 2022 13:23:15 +0000 (14:23 +0100)] 
fix italian translations to display unit name

3 years agoboot: fix pretty nasty typo
Lennart Poettering [Thu, 3 Feb 2022 10:41:49 +0000 (11:41 +0100)] 
boot: fix pretty nasty typo

Note to self: should I ever become a black hat hacker, this is how I'd
hide a vulnerability. ;-)

(No, this one is not a vulnerability)

Follow-up for: 163d1ea5dd69c75d889ba4c2d1b51432ed14127f

3 years agojournal: when copying journal file to undo NOCOW flag, go via fd
Lennart Poettering [Wed, 2 Feb 2022 14:21:27 +0000 (15:21 +0100)] 
journal: when copying journal file to undo NOCOW flag, go via fd

We have the journal file open already, hence reference it via the fd
insted of the file name. After all, some other tool might have
renamed/deleted it already.

Let's not actually reuse the fd though, since we want a separate file
offset for the copying, hence just make it simply and reopen via
/proc/self/fd/.

Follow-up for d71ece3f0b85c7a3decc50143b68ac07fc5831ae

3 years agotests: pass FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION to fuzzers
Evgeny Vereshchagin [Thu, 3 Feb 2022 02:22:53 +0000 (02:22 +0000)] 
tests: pass FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION to fuzzers

to let them use reproducible identifiers, which should make it possible
to really use files copied from OSS-Fuzz to reproduce issues on
GHActions and locally. Prompted by https://github.com/systemd/systemd/pull/22365

3 years agosd-boot: rename LOADER_STUB → LOADER_UNIFIED_LINUX
Lennart Poettering [Wed, 2 Feb 2022 16:28:35 +0000 (17:28 +0100)] 
sd-boot: rename LOADER_STUB → LOADER_UNIFIED_LINUX

No actual code changes, just renaming.

Rationale: the focus here should be on the fact that these are "unified"
images, whether our stub is used or not, or something else doesn't
really matter. Moreover, these are still Linux entries. Hence, emphasize
that these are *unified* images, and *Linux* images, and deemphesize
that our sd-stub is likely used.

3 years agotests: fuzz client_send_message
Evgeny Vereshchagin [Tue, 1 Feb 2022 13:11:41 +0000 (13:11 +0000)] 
tests: fuzz client_send_message

to make sure outgoing packets based on incoming packets are fine.
It's just another follow-up to
https://github.com/systemd/systemd/pull/10200.
Better late than never :-)

3 years agotest-network: add testcase for external tunnel 22355/head
Yu Watanabe [Thu, 3 Feb 2022 02:11:37 +0000 (11:11 +0900)] 
test-network: add testcase for external tunnel

3 years agonetwork: tunnel: support external mode
Yu Watanabe [Tue, 1 Feb 2022 23:56:14 +0000 (08:56 +0900)] 
network: tunnel: support external mode

Closes #22352.

3 years agonetwork: tunnel: reorder setting ip6tnl attributes
Yu Watanabe [Tue, 1 Feb 2022 23:54:52 +0000 (08:54 +0900)] 
network: tunnel: reorder setting ip6tnl attributes

Just for improving readability.

3 years agonetwork: tunnel: reduce indentation in config_parse_encap_limit()
Yu Watanabe [Tue, 1 Feb 2022 23:25:38 +0000 (08:25 +0900)] 
network: tunnel: reduce indentation in config_parse_encap_limit()

3 years agonetwork: tunnel: reduce indentation in config_parse_ipv6_flowlabel()
Yu Watanabe [Tue, 1 Feb 2022 23:25:10 +0000 (08:25 +0900)] 
network: tunnel: reduce indentation in config_parse_ipv6_flowlabel()

3 years agonetwork: tunnel: use "data" field to assign result
Yu Watanabe [Tue, 1 Feb 2022 23:23:59 +0000 (08:23 +0900)] 
network: tunnel: use "data" field to assign result

3 years agoudevadm: don't claim a sysattr was write only just because we get EPERM on read
Lennart Poettering [Wed, 2 Feb 2022 14:20:30 +0000 (15:20 +0100)] 
udevadm: don't claim a sysattr was write only just because we get EPERM on read

it might be totally inaccessible, hence weaken our language a bit and
just say "not readable", thus making not claim whether it is writable or
not.

Follow-up for 3a90bef55a5a71a03629a762470b0f9014cd8453