]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoUse consistent formatting for `PID 1` across `docs/` 23349/head
Elias Probst [Wed, 11 May 2022 13:31:07 +0000 (15:31 +0200)] 
Use consistent formatting for `PID 1` across `docs/`

3 years agoTypo (`swich-root` → `switch-root`)
Elias Probst [Wed, 11 May 2022 13:30:21 +0000 (15:30 +0200)] 
Typo (`swich-root` → `switch-root`)

3 years agoMerge pull request #23331 from kmoriwak/tmpfiles-quickref
Zbigniew Jędrzejewski-Szmek [Wed, 11 May 2022 07:08:39 +0000 (09:08 +0200)] 
Merge pull request #23331 from kmoriwak/tmpfiles-quickref

man: add missing cleanup-age to tmpfiles.d quickref

3 years agoman: mention to Age parameter in C Type 23331/head
Kazuo Moriwaka [Wed, 11 May 2022 06:08:34 +0000 (15:08 +0900)] 
man: mention to Age parameter in C Type

3 years agomeson: sort files
Yu Watanabe [Tue, 10 May 2022 14:46:55 +0000 (23:46 +0900)] 
meson: sort files

3 years agoMerge pull request #23335 from keszybz/fuzz-json-more-coverage
Yu Watanabe [Tue, 10 May 2022 17:12:57 +0000 (02:12 +0900)] 
Merge pull request #23335 from keszybz/fuzz-json-more-coverage

More coverage in fuzz-json

3 years agofuzz-bootspec: limit input size
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 09:55:37 +0000 (11:55 +0200)] 
fuzz-bootspec: limit input size

https://oss-fuzz.com/testcase-detail/5680508182331392 has the
first timeout with 811kb of input. As in the other cases, the code
is known to be slow with lots of repeated entries and we're fine with
that.

3 years agoMerge pull request #23336 from keszybz/fuzz-calendarspec-more-coverage
Yu Watanabe [Tue, 10 May 2022 17:12:11 +0000 (02:12 +0900)] 
Merge pull request #23336 from keszybz/fuzz-calendarspec-more-coverage

More coverage in fuzz-calendarspec

3 years agoshared/json: fix memleak in sort 23335/head
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 08:51:43 +0000 (10:51 +0200)] 
shared/json: fix memleak in sort

3 years agoshared/json: fix another memleak in normalization
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 07:05:43 +0000 (09:05 +0200)] 
shared/json: fix another memleak in normalization

3 years agofuzz-json: also try self-merge operations
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 13:14:33 +0000 (15:14 +0200)] 
fuzz-json: also try self-merge operations

This might even work ;)

3 years agobasic/alloc-util: remove unnecessary parens
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 13:11:20 +0000 (15:11 +0200)] 
basic/alloc-util: remove unnecessary parens

Those symbols are not macros anymore, so we can drop parens.

3 years agoshared/json: add helper to ref first, unref second
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 13:10:36 +0000 (15:10 +0200)] 
shared/json: add helper to ref first, unref second

This normally wouldn't happen, but if some of those places were called
with lhs and rhs being the same object, we could unref the last ref first,
and then try to take the ref again. It's easier to be safe, and with the
helper we save some lines too.

3 years agoshared/calendarspec: fix formatting of entries which collapse to a star 23336/head
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 09:35:52 +0000 (11:35 +0200)] 
shared/calendarspec: fix formatting of entries which collapse to a star

We canonicalize repeats that cover the whole range: "0:0:0/1" → "0:0:*".  But
we'd also do "0:0:0/1,0" → "0:0:*,0", which we then refuse to parse.  Thus,
first go throug the whole chain, and print a '*' and nothing else if any of the
components covers the whole range.

3 years agoMerge pull request #23329 from superm1/mlimonci/lg850-gl
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 11:52:36 +0000 (13:52 +0200)] 
Merge pull request #23329 from superm1/mlimonci/lg850-gl

Set auto-suspend delay on LG850-GL

3 years agocore/timer: fix potential use-after-free
Yu Watanabe [Tue, 10 May 2022 05:10:17 +0000 (14:10 +0900)] 
core/timer: fix potential use-after-free

3 years agocore/timer: fix memleak
Yu Watanabe [Tue, 10 May 2022 05:09:24 +0000 (14:09 +0900)] 
core/timer: fix memleak

Fixes #23326.

3 years agoshared/calendarspec: fix printing of second ranges which start with 0
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 08:25:01 +0000 (10:25 +0200)] 
shared/calendarspec: fix printing of second ranges which start with 0

0..3 is not the same as 0..infinity, we need to check both ends of the range.
This logic was added in 3215e35c405278491f55fb486d349f132e93f516, and back then
the field was called .value. .stop was added later and apparently wasn't taken
into account here.

3 years agotest-calendarspec: tighten tests and add more logging
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 08:22:48 +0000 (10:22 +0200)] 
test-calendarspec: tighten tests and add more logging

3 years agoshared/calendarspec: wrap long comments and reduce scope of one var
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 07:52:14 +0000 (09:52 +0200)] 
shared/calendarspec: wrap long comments and reduce scope of one var

3 years agofuzz-calendarspec: increase coverage by calculating occurences
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 07:49:27 +0000 (09:49 +0200)] 
fuzz-calendarspec: increase coverage by calculating occurences

Coverage data shows that we didn't test calendar_spec_next_usec() and
associated functions at all.

The input samples so far were only used until the first NUL. We take advantage
of that by using the part until the second NUL as the starting timestamp,
retaining backwards compatibility for how the first part is used.

3 years agofuzz-calendarspec: add input sample with a list of weekdays and all syntax characters
Zbigniew Jędrzejewski-Szmek [Tue, 10 May 2022 08:40:20 +0000 (10:40 +0200)] 
fuzz-calendarspec: add input sample with a list of weekdays and all syntax characters

This should make the fuzzer searches start off a bit better.

3 years agoshared/calendarspec: make function static void
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 06:57:36 +0000 (08:57 +0200)] 
shared/calendarspec: make function static void

calendar_spec_from_string() already calls calendar_spec_normalize(), so
there is no point in calling it from the fuzzer. Once that's removed, there's
just one internal caller and it can be made static.

3 years agoshared/json: fix memory leak on failed normalization
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 12:28:36 +0000 (14:28 +0200)] 
shared/json: fix memory leak on failed normalization

We need to increase the counter immediately after taking the ref,
otherwise we may not unref it properly if we fail before incrementing.

3 years agoshared/json: wrap long comments
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 11:37:35 +0000 (13:37 +0200)] 
shared/json: wrap long comments

3 years agofuzz-json: also do sorting and normalizing and other easy calls
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 09:07:06 +0000 (11:07 +0200)] 
fuzz-json: also do sorting and normalizing and other easy calls

3 years agoshared/json: reduce scope of variables
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 09:01:32 +0000 (11:01 +0200)] 
shared/json: reduce scope of variables

3 years agofuzz-json: optionally allow logging and output
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 08:41:36 +0000 (10:41 +0200)] 
fuzz-json: optionally allow logging and output

Similarly to other fuzzers… this makes development easier.

3 years agojson: align table
Zbigniew Jędrzejewski-Szmek [Mon, 9 May 2022 08:24:36 +0000 (10:24 +0200)] 
json: align table

3 years agoadd missing cleanup-age to quickref
Kazuo Moriwaka [Tue, 10 May 2022 08:41:21 +0000 (17:41 +0900)] 
add missing cleanup-age to quickref

3 years agoresolve: reallocate DNS scope when DNSSEC and/or DNS-over-TLS settings are changed
Yu Watanabe [Sun, 8 May 2022 05:50:39 +0000 (14:50 +0900)] 
resolve: reallocate DNS scope when DNSSEC and/or DNS-over-TLS settings are changed

Fixes #23227.

3 years agoMerge pull request #23300 from DaanDeMeyer/device-debug
Yu Watanabe [Tue, 10 May 2022 05:29:35 +0000 (14:29 +0900)] 
Merge pull request #23300 from DaanDeMeyer/device-debug

core/device: Add more logging

3 years agocore: annotate Reexecute() as NoReply
Frantisek Sumsal [Mon, 9 May 2022 21:43:40 +0000 (23:43 +0200)] 
core: annotate Reexecute() as NoReply

So we're able to tell from the introspection data that the method
doesn't reply.

3 years agoAdd HUION Inspiroy H420X to hwdb
Yutsuten [Mon, 9 May 2022 15:01:20 +0000 (00:01 +0900)] 
Add HUION Inspiroy H420X to hwdb

3 years agoSet autosuspend delay for Fibocom LG850-GL 23329/head
Mario Limonciello [Tue, 10 May 2022 01:16:26 +0000 (20:16 -0500)] 
Set autosuspend delay for Fibocom LG850-GL

It has been shown that the autosuspend delay for this device enacted
by modem manager will race with suspend and cause system suspend
failures.

This occurred in ChromiumOS on a chromebook, but there is no reason
it won't happen in regular notebooks with the same WWAN.  To avoid
the failure delay autosuspend to a frequency longer than the polling
rate used by modem manager.

Link: https://chromium-review.googlesource.com/c/chromiumos/overlays/board-overlays/+/3635003
Link: https://github.com/freedesktop/ModemManager/blob/43e76bf1bbca8207e37d3fbddfed4bb8578f0170/src/mm-iface-modem.c#L1633
3 years agoAdd support to set autosuspend delay via hwdb
Mario Limonciello [Tue, 10 May 2022 01:16:22 +0000 (20:16 -0500)] 
Add support to set autosuspend delay via hwdb

3 years agoMerge pull request #23321 from poettering/sockaddr-no-cast
Yu Watanabe [Mon, 9 May 2022 14:44:01 +0000 (23:44 +0900)] 
Merge pull request #23321 from poettering/sockaddr-no-cast

tests: avoid sockaddr casts

3 years agocore/slice: make slice_freezer_action() return 0 if freezing state is unchanged
Yu Watanabe [Fri, 6 May 2022 05:01:22 +0000 (14:01 +0900)] 
core/slice: make slice_freezer_action() return 0 if freezing state is unchanged

Fixes #23278.

3 years agomkosi: add shadow package to SUSE Tumbleweed
Luca Boccassi [Mon, 9 May 2022 13:37:20 +0000 (14:37 +0100)] 
mkosi: add shadow package to SUSE Tumbleweed

[1958/1958] Generating export-dbus-interfaces with a custom command
/root/mkosi.build: line 70: groupadd: command not found

3 years agotest: JSON_BUILD_REAL nowadays expects 'double', not 'long double'
Lennart Poettering [Mon, 9 May 2022 10:07:54 +0000 (12:07 +0200)] 
test: JSON_BUILD_REAL nowadays expects 'double', not 'long double'

Follow-up for 337712e777bff389f53e26d5b378d2ceba7d98a8, aka "the great
un-long-double-ification of 2021".

3 years agotests: avoid (struct sockaddr*) casts 23321/head
Lennart Poettering [Mon, 9 May 2022 11:56:39 +0000 (13:56 +0200)] 
tests: avoid (struct sockaddr*) casts

We prefer using using union sockaddr_union instead of casting sockaddr
to the correct types.

Coding style, nothing else.

Follow-up for 0dd5ec58faa329410f1f363769209e95b058b7c3.

3 years agosocket-util: don't reference field by macro parameter name
Lennart Poettering [Mon, 9 May 2022 11:55:28 +0000 (13:55 +0200)] 
socket-util: don't reference field by macro parameter name

Let's avoid ambigituies here. (Interesting that the current users
compiled at all, in fact)

3 years agoupdate TODO
Lennart Poettering [Mon, 9 May 2022 10:17:08 +0000 (12:17 +0200)] 
update TODO

3 years agonetwork: set/unset enumerating flag before/after loop
Yu Watanabe [Mon, 9 May 2022 07:30:36 +0000 (16:30 +0900)] 
network: set/unset enumerating flag before/after loop

3 years agoshared: Fix memory leak in bus_append_execute_property()
Daan De Meyer [Mon, 9 May 2022 07:50:32 +0000 (09:50 +0200)] 
shared: Fix memory leak in bus_append_execute_property()

Fixes #23317

3 years agoMerge pull request #23310 from keszybz/suppress-fuzzer-timeouts-and-errors
Yu Watanabe [Mon, 9 May 2022 06:50:29 +0000 (15:50 +0900)] 
Merge pull request #23310 from keszybz/suppress-fuzzer-timeouts-and-errors

Suppress fuzzer timeouts and errors

3 years agoMerge pull request #23311 from keszybz/bootspec-fuzzer
Yu Watanabe [Mon, 9 May 2022 06:46:49 +0000 (15:46 +0900)] 
Merge pull request #23311 from keszybz/bootspec-fuzzer

Fuzzer for bootspec.c and associated fixes

3 years agoshared/calendarspec: reduce scope of variables 23310/head
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 14:21:10 +0000 (16:21 +0200)] 
shared/calendarspec: reduce scope of variables

3 years agoshared/dissect-image: apply standard indentation
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 14:20:04 +0000 (16:20 +0200)] 
shared/dissect-image: apply standard indentation

3 years agobasic/virt: use STRV_FOREACH instead of iteration with ELEMENTSOF
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 10:49:19 +0000 (12:49 +0200)] 
basic/virt: use STRV_FOREACH instead of iteration with ELEMENTSOF

I think it's a bit simpler, we don't have two indexes.

3 years agolibsystemd-network: constify casts
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 10:39:15 +0000 (12:39 +0200)] 
libsystemd-network: constify casts

It is better to not drop the const-ness from the argument.

3 years agotree-wide: drop de-constifying casts for strv iteration
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 10:30:51 +0000 (12:30 +0200)] 
tree-wide: drop de-constifying casts for strv iteration

When the the iterator variable is declared automatically, it "inherits" the
const/non-const status from the argument. We don't need to cast a const
table to non-const. If we had a programming error and tried to modify the
string, the compiler could now catch this.

3 years agofuzz-journal-remote: allow -ENODATA too
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 09:18:14 +0000 (11:18 +0200)] 
fuzz-journal-remote: allow -ENODATA too

It seems that we try to create a new file, which fails with -ENOSPC, and we
later fail when reading a file with ENODATA.  journal_file_open() will return
-ENODATA if the file is too short or if journal_file_verify_header() fails.
We'll unlink a file we newly created if we fail to initialize it immediately
after creation. I'm not sure if the file we fail to open is the one we newly
created and e.g. failed to create the arena and such, or if it's the file we
were trying to rotate away from. Either way, I think we should be OK with
with a non-fully-initialized journal file.

Failed to create rotated journal: No space left on device
Failed to write entry of 2 bytes: No space left on device
sd_journal_open_files(["/tmp/fuzz-journal-remote.vELRpI.journal"]) failed: No data available
Assertion 'IN_SET(r, -ENOMEM, -EMFILE, -ENFILE)' failed at src/journal-remote/fuzz-journal-remote.c:70, function int LLVMFuzzerTestOneInput(const uint8_t *, size_t)(). Aborting.

oss-fuzz-39238: https://oss-fuzz.com/issue/4609851129462784

3 years agofuzz-systemctl-parse-argv: refuse commandlines above 1k entries
Zbigniew Jędrzejewski-Szmek [Sun, 8 May 2022 07:41:32 +0000 (09:41 +0200)] 
fuzz-systemctl-parse-argv: refuse commandlines above 1k entries

oss-fuzz reports timeouts which are created by appending to a very long strv.
The code is indeed not very efficient, but it's designed for normal
command-line use, where we don't expect more than a dozen of entries. The fact
that it is slow with ~100k entries is not particularly interesting.

In the future we could rework the code to have better algorithmic complexity.
But let's at least stop oss-fuzz from wasting more time on such examples.

(My first approach was to set max_len in .options, but apparently this doesn't
work for hongfuzz and and AFL.)

oss-fuzz-34527: https://oss-fuzz.com/issue/5722283944574976

3 years agocore/unit: fix use-after-free
Yu Watanabe [Sun, 8 May 2022 15:56:05 +0000 (00:56 +0900)] 
core/unit: fix use-after-free

Fixes #23312.

3 years agoshared/bootspec: add missing terminator to table 23311/head
Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2022 20:36:06 +0000 (22:36 +0200)] 
shared/bootspec: add missing terminator to table

3 years agofuzz-bootspec: also add loader autoentries
Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2022 09:08:04 +0000 (11:08 +0200)] 
fuzz-bootspec: also add loader autoentries

3 years agofuzz-bootspec: one more test case that was fixed in strv code
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 16:31:09 +0000 (18:31 +0200)] 
fuzz-bootspec: one more test case that was fixed in strv code

3 years agoshared/bootspec: avoid crashing on config without a value
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 15:36:47 +0000 (17:36 +0200)] 
shared/bootspec: avoid crashing on config without a value

3 years agoAdd fuzzer for the bootspec parser
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 17:04:01 +0000 (19:04 +0200)] 
Add fuzzer for the bootspec parser

3 years agoshared/bootspec: also export boot_config_load_type1()
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 12:44:05 +0000 (14:44 +0200)] 
shared/bootspec: also export boot_config_load_type1()

The reallocation of memory and counter incrementation is moved from
the only caller to the function. This way the callers can remain oblivious
of the BootConfig internals.

3 years agoshared/bootspec: expose more parts of the config parsing
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 20:44:35 +0000 (22:44 +0200)] 
shared/bootspec: expose more parts of the config parsing

3 years agoMove printing of boot entries from bootctl.c to shared/
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 14:22:45 +0000 (16:22 +0200)] 
Move printing of boot entries from bootctl.c to shared/

I want to use this for fuzzing, but also later to return jsonified
list of entries from logind.

3 years agoshared/bootspec: add one more assert
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 12:38:16 +0000 (14:38 +0200)] 
shared/bootspec: add one more assert

All callers assume that boot_entry_title() always returns something.
It will, as long as it's not called on an uninitialized entry.

3 years agomeson: sort list of fuzzers
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 16:51:12 +0000 (18:51 +0200)] 
meson: sort list of fuzzers

3 years agodocs/ARCHITECTURE: describe fuzzer locations and use
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 16:35:10 +0000 (18:35 +0200)] 
docs/ARCHITECTURE: describe fuzzer locations and use

3 years agodissect: drop unnecessary {}
Zbigniew Jędrzejewski-Szmek [Sat, 7 May 2022 20:36:23 +0000 (22:36 +0200)] 
dissect: drop unnecessary {}

3 years agobash-completion: resolvectl: add missing options and verb
Yu Watanabe [Sun, 8 May 2022 04:34:11 +0000 (13:34 +0900)] 
bash-completion: resolvectl: add missing options and verb

3 years agocore/device: Add logging to device_is_ready() 23300/head
Daan De Meyer [Sat, 7 May 2022 15:52:44 +0000 (17:52 +0200)] 
core/device: Add logging to device_is_ready()

3 years agocore/device: Improve device_dispatch_io() logging messages
Daan De Meyer [Sat, 7 May 2022 14:20:20 +0000 (16:20 +0200)] 
core/device: Improve device_dispatch_io() logging messages

3 years agocore/device: Log when we can't retrieve SYSTEMD_ALIAS property
Daan De Meyer [Sat, 7 May 2022 13:56:34 +0000 (15:56 +0200)] 
core/device: Log when we can't retrieve SYSTEMD_ALIAS property

3 years agocore/device: Log when we skip device unit creation for symlink
Daan De Meyer [Sat, 7 May 2022 13:53:52 +0000 (15:53 +0200)] 
core/device: Log when we skip device unit creation for symlink

3 years agocore/device: Log if we fail to open a device
Daan De Meyer [Sat, 7 May 2022 13:18:32 +0000 (15:18 +0200)] 
core/device: Log if we fail to open a device

We also shorten the logic by getting rid of the validate_node()
function. An extra check is added to verify we're dealing with
a device before calling sd_device_new_from_devname() since that
will return -EINVAL if anything other than a device is passed.

3 years agocore/device: Log on every event received from udev
Daan De Meyer [Sat, 7 May 2022 14:15:00 +0000 (16:15 +0200)] 
core/device: Log on every event received from udev

We already debug log on device unit state changes but additionally,
let's debug log for every event received from udev as well.

3 years agohwdb: add rammus accelerometer support
lucagoc [Sat, 7 May 2022 16:30:22 +0000 (18:30 +0200)] 
hwdb: add rammus accelerometer support

3 years agocore/device: Add sysfs argument to device_process_new()
Daan De Meyer [Sat, 7 May 2022 12:57:52 +0000 (14:57 +0200)] 
core/device: Add sysfs argument to device_process_new()

Instead of retrieving the new sysfs path in device_process_new(),
let's pass the syspath we retrieved earlier to device_process_new()
similar to how we do for other functions in core/device.c.

3 years agocore/device: Use DEVICE_NOT_FOUND instead of 0.
Daan De Meyer [Sat, 7 May 2022 12:19:40 +0000 (14:19 +0200)] 
core/device: Use DEVICE_NOT_FOUND instead of 0.

Use the enum name instead of the value zero. This is a noop change
as DEVICE_NOT_FOUND == 0.

3 years agoboot: Fix null pointer dereference
Jan Janssen [Sat, 7 May 2022 09:15:33 +0000 (11:15 +0200)] 
boot: Fix null pointer dereference

3 years agoman: fix typo
Yu Watanabe [Sat, 7 May 2022 06:17:56 +0000 (15:17 +0900)] 
man: fix typo

3 years agoMerge pull request #23292 from alexhenrie/dhcpv6
Yu Watanabe [Sat, 7 May 2022 02:42:45 +0000 (11:42 +0900)] 
Merge pull request #23292 from alexhenrie/dhcpv6

network: clarify relationship between RA flags and DHCPv6 modes

3 years agoshared/json: disentangle flag mixup
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 12:37:01 +0000 (14:37 +0200)] 
shared/json: disentangle flag mixup

_DEBUG and _RELAX had the same value… I'm not sure what the effect
of this is.

3 years agonetwork: clarify the relationship between DHCP= and WithoutRA= 23292/head
Alex Henrie [Fri, 6 May 2022 20:01:53 +0000 (14:01 -0600)] 
network: clarify the relationship between DHCP= and WithoutRA=

Just setting DHCP=ipv6 is not enough to get DHCPv6 working without RA.
The WithoutRA option must also be changed from its default of "no".

3 years agonetwork: clarify the relationship between RA flags and DHCPv6 modes
Alex Henrie [Fri, 6 May 2022 20:01:53 +0000 (14:01 -0600)] 
network: clarify the relationship between RA flags and DHCPv6 modes

In the documentation, using the term "managed" for both the RA flag and
the DHCPv6 mode is confusing because the mode is referred to as
"solicit" both in the official DHCPv6 documentation (see RFC 8415) and
in the WithoutRA option.

Furthermore, calling the other RA flag "other information" or "other
address configuration" is confusing because its official name is simply
"other configuration" (see RFC 4861 and RFC 5175) and it isn't used to
assign IP addresses.

Rewrite the documentation for DHCPv6Client and WithoutRA to make it
clear that getting the "managed" RA flag triggers the same kind of DHCP
request as WithoutRA=solicit, whereas getting the "other configuration"
RA flag triggers the same kind of DHCP request as
WithoutRA=information-request.

3 years agoMerge pull request #23291 from yuwata/udev-rule-fix-regression
Yu Watanabe [Fri, 6 May 2022 19:58:20 +0000 (04:58 +0900)] 
Merge pull request #23291 from yuwata/udev-rule-fix-regression

udev: fix parent token handling

3 years agoMerge pull request #23290 from keszybz/three-fixes
Yu Watanabe [Fri, 6 May 2022 19:57:36 +0000 (04:57 +0900)] 
Merge pull request #23290 from keszybz/three-fixes

Three fixes

3 years agoMerge pull request #23272 from keszybz/logind-man-and-rules
Yu Watanabe [Fri, 6 May 2022 19:23:02 +0000 (04:23 +0900)] 
Merge pull request #23272 from keszybz/logind-man-and-rules

Logind man and rules

3 years agotest: add testcase for #23288 23291/head
Yu Watanabe [Fri, 6 May 2022 17:37:48 +0000 (02:37 +0900)] 
test: add testcase for #23288

3 years agoudev: fix parent token handling
Yu Watanabe [Fri, 6 May 2022 17:29:39 +0000 (02:29 +0900)] 
udev: fix parent token handling

This fixes a bug introduced by 03677889f0ef42cdc534bf3b31265a054b20a354.

Fixes #23288.

3 years agobasic/strv: fix splitting of strings with escape characters 23290/head
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 16:23:06 +0000 (18:23 +0200)] 
basic/strv: fix splitting of strings with escape characters

Plain strv_split() should not care if the strings contains backslashes
or quote characters. But extract_first_word() interprets backslashes
unless EXTRACT_RETAIN_ESCAPE is given.

I wonder how it's possible that nobody noticed this before. I think this
code was introduced in 0645b83a40d1c782f173c4d8440ab2fc82a75006.

3 years agoshared/terminal-util: don't use $COLORTERM to force colors
Zbigniew Jędrzejewski-Szmek [Fri, 6 May 2022 16:19:21 +0000 (18:19 +0200)] 
shared/terminal-util: don't use $COLORTERM to force colors

Fixup for a5efbf468c96190c9562bc8121eda32310dfd112: if $COLORTERM was set, we'd
unconditionally turn on colors, which is unexpected and wrong. It even breaks
our own tests when executed in gnome-terminal.

3 years agoREADME: mention kernel requirement for ambient capabilities
Yu Watanabe [Fri, 6 May 2022 05:08:45 +0000 (14:08 +0900)] 
README: mention kernel requirement for ambient capabilities

Closes #23231.

3 years agoresolve: Use sockaddr pointer type for bind()
Khem Raj [Fri, 6 May 2022 03:25:37 +0000 (20:25 -0700)] 
resolve: Use sockaddr pointer type for bind()

bind() expects sockaddr* but SERVER_ADDRESS is sockaddr_in type struct

Fixes errors with clang e.g.

../git/src/resolve/test-resolved-stream.c:112:32: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
        assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
                               ^~~~~~~~~~~~~~~
../git/src/resolve/test-resolved-stream.c:251:39: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
                r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));

Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 years agouserdbctl: initialize parameter `n` for uid_range_load_userns()
Thomas Weißschuh [Thu, 5 May 2022 23:06:08 +0000 (01:06 +0200)] 
userdbctl: initialize parameter `n` for uid_range_load_userns()

uid_range_load_userns() dereferences the n parameter.

Passing unitialized memory may lead to crashes, for example with version
251rc2-1 on ArchLinux.

3 years agodocs/RELEASE: typo in target name
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 17:49:26 +0000 (19:49 +0200)] 
docs/RELEASE: typo in target name

3 years agoMerge pull request #23277 from keszybz/news-and-hwdb-update v251-rc2
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 17:02:49 +0000 (19:02 +0200)] 
Merge pull request #23277 from keszybz/news-and-hwdb-update

News and hwdb update

3 years agoRevert "shared/install: create relative symlinks for enablement and aliasing"
Zbigniew Jędrzejewski-Szmek [Tue, 12 Apr 2022 20:01:10 +0000 (22:01 +0200)] 
Revert "shared/install: create relative symlinks for enablement and aliasing"

This reverts commit d6c9411072901556176ac130f2ce71a33107aa93.

I still think this is something that needs to be done, but we're hitting some
unexplained failures, e.g. https://github.com/systemd/systemd/issues/22920.
So let's revert this for now, so -rc2 can be released, with a plan to return
to this after a release.

Closes #22920.

3 years agoAmend documentation for LimitNPROC=
Jakob Lell [Sun, 1 May 2022 20:52:39 +0000 (22:52 +0200)] 
Amend documentation for LimitNPROC=

3 years agojournal: Make journal_default_metrics() static
Daan De Meyer [Thu, 5 May 2022 13:40:27 +0000 (15:40 +0200)] 
journal: Make journal_default_metrics() static

Only caller resides in the same file as were it's defined so no
need to have it be public.

3 years agoMerge pull request #23273 from keszybz/bootctl-quiet
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 14:30:53 +0000 (16:30 +0200)] 
Merge pull request #23273 from keszybz/bootctl-quiet

bootctl --quiet and --graceful

3 years agohwdb: run "update-hwdb" 23277/head
Zbigniew Jędrzejewski-Szmek [Thu, 5 May 2022 14:22:42 +0000 (16:22 +0200)] 
hwdb: run "update-hwdb"