]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoresolved: don't accept responses to query unless they completely answer our questions 19079/head
Lennart Poettering [Mon, 22 Mar 2021 17:27:46 +0000 (18:27 +0100)] 
resolved: don't accept responses to query unless they completely answer our questions

When we checking if the responses we collected for a DnsQuery are
sufficient to complete it we previously only check if one of the
collected response RRs matches at least one of the question RR keys.

This changes the logic to require that there must be at least one
response RR matched *each* of the question RR keys before considering
the answer complete.

Otherwise we might end up accepting an A reply as complete answer for an
A/AAAA query and vice versa, but we want to make sure we wait until we
get a reply on both types before returning this to the user in all
cases.

This has been broken for basically forever, but didn't surface until
b1eea703e01da1e280e179fb119449436a0c9b8e since until then we'd basically
ignore the auxiliary RRs included in CNAME/DNAME replies. Once that
commit was made we'd start using the auxiliary RRs included in
CNAME/DNAME replies but those typically included only A or only AAAA
which we then took for complete.

Fixe: #19049

4 years agoresolved: propagate correct error variable
Lennart Poettering [Mon, 22 Mar 2021 17:27:36 +0000 (18:27 +0100)] 
resolved: propagate correct error variable

4 years agomeson: fix warning about comparison between different types
Yu Watanabe [Mon, 22 Mar 2021 11:52:00 +0000 (20:52 +0900)] 
meson: fix warning about comparison between different types

Follow-up for e39288193fcdf3a36dbc49b78e6c9bf86a764e31.

4 years agologs-show: add missing newline in warning message
Antonio Terceiro [Sun, 21 Mar 2021 14:37:51 +0000 (11:37 -0300)] 
logs-show: add missing newline in warning message

4 years agomeson: fix build error of test-dnssec-complex
Yu Watanabe [Sun, 21 Mar 2021 04:58:12 +0000 (13:58 +0900)] 
meson: fix build error of test-dnssec-complex

Fixes #19065.

4 years agosystemd-boot: LLVM/lld does not support PE/COFF relocations. Bail out with an error...
tpgxyz [Thu, 18 Mar 2021 11:24:27 +0000 (12:24 +0100)] 
systemd-boot: LLVM/lld does not support PE/COFF relocations. Bail out with an error message

4 years agoblockdev-util: fix access to possibly invalidated dirent struct
Lennart Poettering [Fri, 19 Mar 2021 10:14:52 +0000 (11:14 +0100)] 
blockdev-util: fix access to possibly invalidated dirent struct

Let's copy out the string we need from the dirent, there's no reason to
believe the dirent struct might live for longer than one loop iteration.

4 years agorepart: make sure to grow partition table after growing backing loopback file
Lennart Poettering [Fri, 19 Mar 2021 09:36:48 +0000 (10:36 +0100)] 
repart: make sure to grow partition table after growing backing loopback file

This fixes the --size= switch, i.e. where we grow a disk image: after
growing it we need to expand the partition table so that its idea of the
the medium size matches the new reality. Otherwise our disk size
calculations in the subsequent steps might still use the original
ungrown size.

(This used to work, I guess this was borked when libfdisk learnt the
concept of "minimized" partition tables)

4 years agocorrect incorrect command in NEWS (#19048)
Michael Gisbers [Fri, 19 Mar 2021 10:38:53 +0000 (11:38 +0100)] 
correct incorrect command in NEWS (#19048)

* for /dev/vsock a file permission of 0o666 was mentioned but 0666 is probably better understood, so let's use that
* correct non existing command 'ip dev'

4 years agoWrong index in error message
Sam Lunt [Thu, 18 Mar 2021 19:50:30 +0000 (14:50 -0500)] 
Wrong index in error message

4 years agoudev: do not try to assign invalid ifname
Yu Watanabe [Thu, 18 Mar 2021 21:26:53 +0000 (06:26 +0900)] 
udev: do not try to assign invalid ifname

Fixes #19038.

4 years agohomepage: fix year in footer to 2021
Lennart Poettering [Thu, 18 Mar 2021 20:55:00 +0000 (21:55 +0100)] 
homepage: fix year in footer to 2021

(And while we are at it, let's fix the "Sources" link in the footer to point to the right git repo subdir)

4 years agoMerge pull request #19030 from dtardon/rhel9-covscan
Luca Boccassi [Thu, 18 Mar 2021 16:28:46 +0000 (16:28 +0000)] 
Merge pull request #19030 from dtardon/rhel9-covscan

a bunch of small fixes and clenups based on initial RHEL-9 covscan run

4 years agoMerge pull request #19036 from mrc0mmand/cocci-fixes
Luca Boccassi [Thu, 18 Mar 2021 14:26:04 +0000 (14:26 +0000)] 
Merge pull request #19036 from mrc0mmand/cocci-fixes

tree-wide: coccinelle fixes

4 years agoresolved-dns-rr: drop unneeded braces 19030/head
David Tardon [Thu, 18 Mar 2021 11:54:48 +0000 (12:54 +0100)] 
resolved-dns-rr: drop unneeded braces

4 years agoresolved-dns-rr: use already existing variable
David Tardon [Thu, 18 Mar 2021 11:50:27 +0000 (12:50 +0100)] 
resolved-dns-rr: use already existing variable

4 years agoresolved-dns-rr: avoid unnecessary reassignment
David Tardon [Thu, 18 Mar 2021 12:14:32 +0000 (13:14 +0100)] 
resolved-dns-rr: avoid unnecessary reassignment

4 years agoresolved-dns-rr: don't leak s if base64_append fails
David Tardon [Thu, 18 Mar 2021 12:13:04 +0000 (13:13 +0100)] 
resolved-dns-rr: don't leak s if base64_append fails

4 years agococcinelle: filter out a couple of 'false-positive' transformations 19036/head
Frantisek Sumsal [Thu, 18 Mar 2021 10:59:53 +0000 (11:59 +0100)] 
coccinelle: filter out a couple of 'false-positive' transformations

  * flag-set.cocci: perform the transformation only if the second
    argument is a constant
  * sd-journal/lookup3.c: skip the cocci completely for this file, since
    it's not "ours"
  * strjoina.cocci: skip the transformation on the "test_strjoina" test,
    since it intentionally tests the "incorrect" expression we're trying to
    transform (the same thing was already done in strjoin.cocci)

4 years agotree-wide: coccinelle fixes
Frantisek Sumsal [Thu, 18 Mar 2021 10:59:31 +0000 (11:59 +0100)] 
tree-wide: coccinelle fixes

Another batch of fixes (mostly) generated by Coccinelle.

4 years agoshutdown: fix typo
Ulrich Ölmann [Thu, 18 Mar 2021 08:43:13 +0000 (09:43 +0100)] 
shutdown: fix typo

4 years agosystemctl-edit: don't leak the old value of contents
David Tardon [Wed, 17 Mar 2021 13:42:06 +0000 (14:42 +0100)] 
systemctl-edit: don't leak the old value of contents

4 years agojournal-upload: use _cleanup_ for curl_slist
David Tardon [Wed, 17 Mar 2021 12:25:47 +0000 (13:25 +0100)] 
journal-upload: use _cleanup_ for curl_slist

4 years agojournal-upload: make the curl_slist cleanup actually work
David Tardon [Wed, 17 Mar 2021 11:20:11 +0000 (12:20 +0100)] 
journal-upload: make the curl_slist cleanup actually work

If h is NULL, it is pointless to call curl_slist_free_all() on it...

4 years agojournal-upload: cleanup CURL* on error
David Tardon [Wed, 17 Mar 2021 09:22:15 +0000 (10:22 +0100)] 
journal-upload: cleanup CURL* on error

4 years agojournal-gatewayd: use automatic cleanup
David Tardon [Wed, 17 Mar 2021 09:05:47 +0000 (10:05 +0100)] 
journal-gatewayd: use automatic cleanup

4 years agoMerge pull request #19011 from anitazha/pgscanrate v248-rc4
Lennart Poettering [Wed, 17 Mar 2021 22:26:49 +0000 (23:26 +0100)] 
Merge pull request #19011 from anitazha/pgscanrate

oomd: update pressure based kills to use pgscan rate

4 years agoMerge pull request #19034 from poettering/read-virtual-file-fix
Lennart Poettering [Wed, 17 Mar 2021 21:45:16 +0000 (22:45 +0100)] 
Merge pull request #19034 from poettering/read-virtual-file-fix

read_virtual_file() tweaks

4 years agooomd: clean up error handling 19011/head
Anita Zhang [Wed, 17 Mar 2021 00:57:50 +0000 (17:57 -0700)] 
oomd: clean up error handling

- Log debug if we're going to ignore an error
- Add %m if we use log_*_errno()
- log_oom() when checking ENOMEM

4 years agoMerge pull request #19031 from poettering/hwdb-248
Lennart Poettering [Wed, 17 Mar 2021 20:03:02 +0000 (21:03 +0100)] 
Merge pull request #19031 from poettering/hwdb-248

prepare 248-rc4

4 years agoresolved: simplify min_ttl check
Luca Boccassi [Wed, 17 Mar 2021 14:34:36 +0000 (14:34 +0000)] 
resolved: simplify min_ttl check

rr is asserted upon a few lines above, no need to check for null.
Coverity-found issue, CID 1450844

  CID 1450844:  Null pointer dereferences  (REVERSE_INULL)
  Null-checking "rr" suggests that it may be null, but it has already
    been dereferenced on all paths leading to the check.

4 years agofileio: add missing overflow checks to read_full_virtual_file() 19034/head
Lennart Poettering [Wed, 17 Mar 2021 17:48:01 +0000 (18:48 +0100)] 
fileio: add missing overflow checks to read_full_virtual_file()

given the source is trusted this is probably not a biggie, but let's
better be safe than sorry.

4 years agofileio: don't use realloc() in read_full_virtual_file()
Lennart Poettering [Wed, 17 Mar 2021 17:46:56 +0000 (18:46 +0100)] 
fileio: don't use realloc() in read_full_virtual_file()

We aren't interested in the data previousl read, hence free() followed
by malloc() is typically better since it means libc doesn't have to
restore the contained data needlessly.

4 years agosystemctl: pecify read_full_file() size argument as NULL
Lennart Poettering [Wed, 17 Mar 2021 17:44:51 +0000 (18:44 +0100)] 
systemctl: pecify read_full_file() size argument as NULL

If it is specified as NULL read_full_file() assumes the caller wants a C
string, and it looks for embedded NUL bytes to ensure that works. Given
we don#t actually use the size argument here, let's drop it.

(in one case the size argument is used, but not for actually processing
the full returned data, but just as a shortcut to compare things with
the original string. Let's drop use of that there, too given the risk of
embedded NUL bytes in the data read.)

4 years agotree-wide: use read_full_virtual_file() where appropriate
Lennart Poettering [Wed, 17 Mar 2021 17:43:42 +0000 (18:43 +0100)] 
tree-wide: use read_full_virtual_file() where appropriate

Wherever we read virtual files we better should use
read_full_virtual_file(), to make sure we get a consistent response
given how weird the kernel's handling with partial read on such file
systems is.

4 years agooomctl: show last_pgscan
Anita Zhang [Tue, 16 Mar 2021 00:38:45 +0000 (17:38 -0700)] 
oomctl: show last_pgscan

4 years agooomd: sort by pgscan rate not pgscan
Anita Zhang [Tue, 16 Mar 2021 00:21:45 +0000 (17:21 -0700)] 
oomd: sort by pgscan rate not pgscan

For pressure based killing we want to target who has the highest
increase in pgscan from the previous interval (vs. the previous logic
which used raw pgscan). This will prevent biasing towards long running
cgroups as mentioned in #19007.

4 years agoupdate TODO
Lennart Poettering [Wed, 17 Mar 2021 17:13:51 +0000 (18:13 +0100)] 
update TODO

4 years agoupdate NEWS for rc4 19031/head
Lennart Poettering [Wed, 17 Mar 2021 15:07:49 +0000 (16:07 +0100)] 
update NEWS for rc4

4 years agotools: exclude Weblate bot from "ninja git-contrib"
Lennart Poettering [Wed, 17 Mar 2021 15:50:27 +0000 (16:50 +0100)] 
tools: exclude Weblate bot from "ninja git-contrib"

Bots are not people, no reason to say thanks to them and list them as
authors or contributors.

4 years agomailmap: merge Weblate bot commiter into one
Lennart Poettering [Wed, 17 Mar 2021 15:46:02 +0000 (16:46 +0100)] 
mailmap: merge Weblate bot commiter into one

4 years agomeson.build: bump version of libudev
Lennart Poettering [Wed, 17 Mar 2021 15:11:12 +0000 (16:11 +0100)] 
meson.build: bump version of libudev

It didn't receive new API calls, bit it was changed, hence bump the
version accordingly.

4 years agohwdb: ninja update-hwdb
Lennart Poettering [Wed, 17 Mar 2021 14:58:15 +0000 (15:58 +0100)] 
hwdb: ninja update-hwdb

4 years agohwdb: ninja update-hwdb-autosuspend
Lennart Poettering [Wed, 17 Mar 2021 14:52:16 +0000 (15:52 +0100)] 
hwdb: ninja update-hwdb-autosuspend

4 years agodoc/RELEASE.md: document hwdb update step
Luca Boccassi [Wed, 17 Mar 2021 15:26:13 +0000 (15:26 +0000)] 
doc/RELEASE.md: document hwdb update step

4 years agoman: Specify that only d-bus methods can be answered async
igo95862 [Tue, 16 Mar 2021 18:43:12 +0000 (21:43 +0300)] 
man: Specify that only d-bus methods can be answered async

Not properties.

4 years agohwdb: unifying receiver match keys for Logitech MX Ergo
Dan Sanders [Wed, 17 Mar 2021 02:09:05 +0000 (19:09 -0700)] 
hwdb: unifying receiver match keys for Logitech MX Ergo

4 years agocg_unified_cached: return ENOMEDIUM if we cannot find a known hierarchy
Mike Gilbert [Tue, 9 Mar 2021 22:57:37 +0000 (17:57 -0500)] 
cg_unified_cached: return ENOMEDIUM if we cannot find a known hierarchy

When the test suite is being run in a foreign environment,
/sys/fs/cgroup might not be set up in a way that we recognize.
Returning ENOMEDIUM causes the tests to be skipped in this case.

Bug: https://bugs.gentoo.org/771819

4 years agooomd: update memory pressure candidates every interval
Anita Zhang [Mon, 15 Mar 2021 23:34:26 +0000 (16:34 -0700)] 
oomd: update memory pressure candidates every interval

4 years agooomd: new helper oomd_update_cgroup_contexts_between_hashmaps
Anita Zhang [Mon, 15 Mar 2021 23:06:42 +0000 (16:06 -0700)] 
oomd: new helper oomd_update_cgroup_contexts_between_hashmaps

4 years agodhcp6: fix wrong length for IA_PD dhcp6 option
Yu Watanabe [Tue, 16 Mar 2021 15:23:51 +0000 (00:23 +0900)] 
dhcp6: fix wrong length for IA_PD dhcp6 option

Fixes an issue introduced by 73b49d433c2c8e6304c8b82538bd4231d070fce4.

When PrefixDelegationHint= is not set, dhcp6_option_append_pd() sets
wrong length for IA_PD option, as `r` is `-EINVAL`.

Fixes #19021.

4 years agoMerge pull request #19009 from poettering/one-more-cname-fix
Lennart Poettering [Tue, 16 Mar 2021 20:29:06 +0000 (21:29 +0100)] 
Merge pull request #19009 from poettering/one-more-cname-fix

resolved: more CNAME redirect fixes

4 years agoMerge pull request #19022 from poettering/journal-dont-lose-facility
Lennart Poettering [Tue, 16 Mar 2021 20:28:21 +0000 (21:28 +0100)] 
Merge pull request #19022 from poettering/journal-dont-lose-facility

journald: don't lose facility of log streams on journald restart

4 years agojournald: restore syslog priority *with* facility bits for stream connections when... 19022/head
Lennart Poettering [Tue, 16 Mar 2021 15:09:47 +0000 (16:09 +0100)] 
journald: restore syslog priority *with* facility bits for stream connections when restarting journald

Fixes: #19019
4 years agojournald: use log_warning_errno() where appropriate
Lennart Poettering [Tue, 16 Mar 2021 15:07:42 +0000 (16:07 +0100)] 
journald: use log_warning_errno() where appropriate

4 years agosd-event: re-check new epoll events when a child event is queued
Yu Watanabe [Mon, 8 Mar 2021 06:39:53 +0000 (15:39 +0900)] 
sd-event: re-check new epoll events when a child event is queued

Previously, when a process outputs something and exit just after
epoll_wait() but before process_child(), then the IO event is ignored
even if the IO event has higher priority. See #18190.

This can be solved by checking epoll event again after process_child().

However, there exists a possibility that another process outputs and
exits just after process_child() but before the second epoll_wait().
When the IO event has lower priority than the child event, still IO
event is processed.

So, this makes new epoll events and child events are checked in a loop
until no new event is detected. To prevent an infinite loop, the number
of maximum trial is set to 10.

Fixes #18190.

4 years agomeson.build: make xinitrcdir configurable
Franck Bui [Mon, 15 Mar 2021 08:43:42 +0000 (09:43 +0100)] 
meson.build: make xinitrcdir configurable

SUSE uses a different xinitrcdir ("/usr/etc/X11/xinit/xinitrc.d").

4 years agopo: Translated using Weblate (Korean)
simmon [Tue, 16 Mar 2021 07:01:48 +0000 (08:01 +0100)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: simmon <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main

4 years agoresolved: don't flush answer RRs on CNAME redirect too early 19009/head
Lennart Poettering [Mon, 15 Mar 2021 22:26:46 +0000 (23:26 +0100)] 
resolved: don't flush answer RRs on CNAME redirect too early

When doing a CNAME/DNAME redirect let's first check if the answer we
already have fully answers the redirected question already. If so, let's
use that. If not, let's properly restart things.

This simply removes one call to dns_answer_reset() that was placed too
early: instead of resetting when we detect a CNAME/DNAME redirect, do so
only after checking if the answer we already have doesn't match the
reply, and then decide to *actually* follow it. Or in other words: rely
on the dns_answer_reset() call in dns_query_go() which we'll call to
actually begin with the redirected question.

This fixes an optimization path which was broken back in 7820b320eaa608748f66f8105621640cf80e483a.

(This doesn't really matter as much as one might think, since our cache
stepped in anyway and answered the questions before going back to the
network. However, this adds noise if RRs with very short TTLs are cached
– which some CDNs do – and is of course relavant when people turn off
the local cache.)

4 years agoresolved: match CNAME replies to right question
Lennart Poettering [Mon, 15 Mar 2021 21:15:18 +0000 (22:15 +0100)] 
resolved: match CNAME replies to right question

Previously by mistake we'd always match every single reply we get in a
CNAME chain to the original question from the stub client. That's
broken, we need to test it against the CNAME query we are currently
looking at.

The effect of this incorrect matching was that we'd assign the RRs to
the wrong section since we'd assume they'd be auxiliary answers instead
of primary answers.

Fixes: #18972
4 years agoresolved: add helper for dumping DnsQuestion, similar to what we have for DnsAnswer
Lennart Poettering [Mon, 15 Mar 2021 21:15:06 +0000 (22:15 +0100)] 
resolved: add helper for dumping DnsQuestion, similar to what we have for DnsAnswer

4 years agoresolved: show TTLs in answer dump
Lennart Poettering [Mon, 15 Mar 2021 21:14:43 +0000 (22:14 +0100)] 
resolved: show TTLs in answer dump

4 years agoresolved: use DNS_ANSWER_MASK_SECTIONS where appropriate
Lennart Poettering [Mon, 15 Mar 2021 20:36:42 +0000 (21:36 +0100)] 
resolved: use DNS_ANSWER_MASK_SECTIONS where appropriate

4 years agoresolved: let's tweak how we calculate TTL left
Lennart Poettering [Mon, 15 Mar 2021 20:18:52 +0000 (21:18 +0100)] 
resolved: let's tweak how we calculate TTL left

When responding from DNS cache, let's slightly tweak how the TTL is
lowered: as before let's round down when converting from our internal µs
to the external seconds. (This is preferable, since records should
better be cached too short instead of too long.) Let's avoid rounding
down to zero though, since that has special semantics in many cases (in
particular mDNS). Let's just use 1s in that case.

4 years agoresolved: take shortest TTL of all of RRs in answer as cache lifetime
Lennart Poettering [Mon, 15 Mar 2021 20:18:32 +0000 (21:18 +0100)] 
resolved: take shortest TTL of all of RRs in answer as cache lifetime

We nowadays cache full answer RRset combinations instead of just the
exact matching rrset. This means we should not cache RRs that are not
immediate answers to our question for longer then their own RRs. Or in
other words: let's determine the shortest TTL of all RRs in the whole
answer, and use that as cache lifetime.

4 years agoresolved: drop unnecessary local variable
Lennart Poettering [Mon, 15 Mar 2021 20:15:30 +0000 (21:15 +0100)] 
resolved: drop unnecessary local variable

4 years agoresolved: fix indentation
Lennart Poettering [Mon, 15 Mar 2021 19:48:35 +0000 (20:48 +0100)] 
resolved: fix indentation

4 years agoresolved: use dns_answer_isempty() where appropriate
Lennart Poettering [Mon, 15 Mar 2021 19:48:18 +0000 (20:48 +0100)] 
resolved: use dns_answer_isempty() where appropriate

4 years agoresolved: rebreak a few comments
Lennart Poettering [Mon, 15 Mar 2021 19:47:53 +0000 (20:47 +0100)] 
resolved: rebreak a few comments

4 years agoresolved: add new helper dns_answer_min_ttl()
Lennart Poettering [Mon, 15 Mar 2021 19:47:28 +0000 (20:47 +0100)] 
resolved: add new helper dns_answer_min_ttl()

4 years agoman: specify that ProtectProc= does not work with root/cap_sys_ptrace
Luca Boccassi [Sun, 14 Mar 2021 12:36:15 +0000 (12:36 +0000)] 
man: specify that ProtectProc= does not work with root/cap_sys_ptrace

When using hidepid=invisible on procfs, the kernel will check if the
gid of the process trying to access /proc is the same as the gid of
the process that mounted the /proc instance, or if it has the ptrace
capability:

https://github.com/torvalds/linux/blob/v5.10/fs/proc/base.c#L723
https://github.com/torvalds/linux/blob/v5.10/fs/proc/root.c#L155

Given we set up the /proc instance as root for system services,
The same restriction applies to CAP_SYS_PTRACE, if a process runs with
it then hidepid=invisible has no effect.

ProtectProc effectively can only be used with User= or DynamicUser=yes,
without CAP_SYS_PTRACE.
Update the documentation to explicitly state these limitations.

Fixes #18997

4 years agoman: DNS/NTP servers received from DHCP server are concatenated with the statically...
Yu Watanabe [Sat, 13 Mar 2021 10:56:30 +0000 (19:56 +0900)] 
man: DNS/NTP servers received from DHCP server are concatenated with the statically configured ones

Prompted by #9473.

4 years agoMerge pull request #18984 from poettering/event-test-timeout
Luca Boccassi [Mon, 15 Mar 2021 14:31:48 +0000 (14:31 +0000)] 
Merge pull request #18984 from poettering/event-test-timeout

sd-event: add test for timeout parameter of sd_event_wait()

4 years agoboot: Move console declarations to missing_efi.h
Daan De Meyer [Fri, 12 Mar 2021 22:09:44 +0000 (22:09 +0000)] 
boot: Move console declarations to missing_efi.h

These were added to eficonex.h in gnu-efi 3.0.13. Let's move them
to missing_efi.h behind an appropriate guard to fix the build with
recent versions of gnu-efi.

4 years agofstab-util: fix typo in comment
Yu Watanabe [Sat, 13 Mar 2021 11:07:48 +0000 (20:07 +0900)] 
fstab-util: fix typo in comment

4 years agoask-password-api: fix error handling on invalid unicode character
Kevin Backhouse [Fri, 12 Mar 2021 17:00:56 +0000 (18:00 +0100)] 
ask-password-api: fix error handling on invalid unicode character

The integer overflow happens when utf8_encoded_valid_unichar() returns an error
code. The error code is a negative number: -22. This overflows when it is
assigned to `z` (type `size_t`). This can cause an infinite loop if the value
of `q` is 22 or larger.

To reproduce the bug, you need to run `systemd-ask-password` and enter an
invalid unicode character, followed by a backspace character.

GHSL-2021-052

4 years agosd-event: fix error handling 18984/head
Lennart Poettering [Fri, 12 Mar 2021 16:55:52 +0000 (17:55 +0100)] 
sd-event: fix error handling

Noticed by @keszybz, see #18973

4 years agosd-event: add a simple test for checking the timeout parameter of sd_event_wait()
Lennart Poettering [Fri, 12 Mar 2021 16:54:12 +0000 (17:54 +0100)] 
sd-event: add a simple test for checking the timeout parameter of sd_event_wait()

Related to: #18973

4 years agoMerge pull request #18978 from keszybz/man-rc.local
Luca Boccassi [Fri, 12 Mar 2021 14:54:12 +0000 (14:54 +0000)] 
Merge pull request #18978 from keszybz/man-rc.local

Suggest network-online.target for rc.local

4 years agoMerge pull request #18979 from keszybz/man-page-links
Yu Watanabe [Fri, 12 Mar 2021 10:45:17 +0000 (19:45 +0900)] 
Merge pull request #18979 from keszybz/man-page-links

Man page links

4 years agoman: mention network-online.target in discussion of rc.local 18978/head
Zbigniew Jędrzejewski-Szmek [Fri, 12 Mar 2021 08:04:30 +0000 (09:04 +0100)] 
man: mention network-online.target in discussion of rc.local

Replacement for #18853.

4 years agoman: fix html links to two external man pages 18979/head
Zbigniew Jędrzejewski-Szmek [Fri, 12 Mar 2021 09:57:59 +0000 (10:57 +0100)] 
man: fix html links to two external man pages

4 years agoman: sd_bus_message_reply()→sd_bus_message_send()
Zbigniew Jędrzejewski-Szmek [Fri, 12 Mar 2021 09:55:10 +0000 (10:55 +0100)] 
man: sd_bus_message_reply()→sd_bus_message_send()

Fixup for 6c41cf445912c12e14b1e94414a0fce1fa060ac2.

4 years agoman: also refname rc-local.service to the generator man page
Zbigniew Jędrzejewski-Szmek [Fri, 12 Mar 2021 07:53:32 +0000 (08:53 +0100)] 
man: also refname rc-local.service to the generator man page

This makes it easier to find for users.

4 years agoUpdate resolvectl.xml
ulf-f [Thu, 11 Mar 2021 18:18:14 +0000 (19:18 +0100)] 
Update resolvectl.xml

fixed typo of filename

4 years agoRevert "sd-event: re-check new epoll events when a child event is queued"
Frantisek Sumsal [Thu, 11 Mar 2021 16:25:55 +0000 (17:25 +0100)] 
Revert "sd-event: re-check new epoll events when a child event is queued"

This reverts commit 84e998c112ff18bba786660bd6c1f96f62a77ffe.

Temporarily revert this commit, since it breaks CI.

4 years agoMerge pull request #18922 from yuwata/sd-event-fix-issue-18190
Lennart Poettering [Thu, 11 Mar 2021 15:36:38 +0000 (16:36 +0100)] 
Merge pull request #18922 from yuwata/sd-event-fix-issue-18190

sd-event: re-check new epoll events when a child event is queued

4 years agosd-event: re-check new epoll events when a child event is queued 18922/head
Yu Watanabe [Mon, 8 Mar 2021 06:39:53 +0000 (15:39 +0900)] 
sd-event: re-check new epoll events when a child event is queued

Previously, when a process outputs something and exit just after
epoll_wait() but before process_child(), then the IO event is ignored
even if the IO event has higher priority. See #18190.

This can be solved by checking epoll event again after process_child().

However, there exists a possibility that another process outputs and
exits just after process_child() but before the second epoll_wait().
When the IO event has lower priority than the child event, still IO
event is processed.

So, this makes new epoll events and child events are checked in a loop
until no new event is detected. To prevent an infinite loop, the number
of maximum trial is set to 10.

Fixes #18190.

4 years agotest: add log messages
Yu Watanabe [Thu, 11 Mar 2021 05:19:50 +0000 (14:19 +0900)] 
test: add log messages

4 years agoNEWS: update contributors list for v248-rc3 v248-rc3
Zbigniew Jędrzejewski-Szmek [Thu, 11 Mar 2021 11:54:36 +0000 (12:54 +0100)] 
NEWS: update contributors list for v248-rc3

4 years agoMerge pull request #18915 from keszybz/reexec-bug
Zbigniew Jędrzejewski-Szmek [Thu, 11 Mar 2021 13:46:16 +0000 (14:46 +0100)] 
Merge pull request #18915 from keszybz/reexec-bug

Fix crash during daemon-reexec with systemd-oomd running

4 years agoMerge pull request #18955 from keszybz/fstab-escaping
Zbigniew Jędrzejewski-Szmek [Thu, 11 Mar 2021 13:45:11 +0000 (14:45 +0100)] 
Merge pull request #18955 from keszybz/fstab-escaping

Fix handling of escaped characters in fstab

4 years agobasic/group-util: optimize alloca use
Zbigniew Jędrzejewski-Szmek [Wed, 10 Mar 2021 09:00:04 +0000 (10:00 +0100)] 
basic/group-util: optimize alloca use

Follow-up for 0fa7b50053.

4 years agodocs: more markup
Zbigniew Jędrzejewski-Szmek [Tue, 9 Mar 2021 17:41:21 +0000 (18:41 +0100)] 
docs: more markup

4 years agorepart: fix the loop dev support check
Frantisek Sumsal [Thu, 11 Mar 2021 11:49:00 +0000 (12:49 +0100)] 
repart: fix the loop dev support check

Since f17bdf8264e231fa31c769bff2475ef698487d0b the test-repart was
effectively disabled, since `/dev/loop-control` is a character special
file, whereas `-f` works only on regular files. Even though we could use
`-c` to check specifically for character special files, let's use `-e`
just in case.

4 years agoMerge pull request #18962 from poettering/dissect-fixes
Zbigniew Jędrzejewski-Szmek [Thu, 11 Mar 2021 13:42:17 +0000 (14:42 +0100)] 
Merge pull request #18962 from poettering/dissect-fixes

three image dissection fixes

4 years agoinstall: refactor find_symlinks() and don't search for symlinks recursively
Michal Sekletar [Tue, 9 Mar 2021 16:22:32 +0000 (17:22 +0100)] 
install: refactor find_symlinks() and don't search for symlinks recursively

After all we are only interested in symlinks either in top-level config
directory or in .wants and .requires sub-directories.

As a bonus this should speed up ListUnitFiles() roughly 3-4x on systems
with a lot of units that use drop-ins (e.g. SSH jump hosts with a lot of
user session scopes).

4 years agoman: shorten list of partition types a bit
Lennart Poettering [Thu, 11 Mar 2021 09:00:17 +0000 (10:00 +0100)] 
man: shorten list of partition types a bit

Tables with only one column aren't really tables, they are lists. And if
each cell only consists of a single word, they are probably better
written in a single line. Hence, shorten the man page a bit, and list
boot loader spec partition types in a simple sentence.

Also, drop "root-secondary" from the list. When dissecting images we'll
upgrade "root-secondary" to "root" if we mount it, and do so only if
"root" doesn't exist. Hence never mention "root-secondary" as we never
will mount a partition under that id.

4 years agodissect: fix trivial typo 18962/head
Lennart Poettering [Tue, 9 Mar 2021 21:01:41 +0000 (22:01 +0100)] 
dissect: fix trivial typo

4 years agodissect-image: fix volatile images
Lennart Poettering [Thu, 11 Mar 2021 10:44:03 +0000 (11:44 +0100)] 
dissect-image: fix volatile images

This makes sure nspawn's --volatile=yes switch works again: there we
have a read-only image that is overmounted by a tmpfs (with the
exception of /usr). This we need to mkdir all mount points even though
the image is read-only.

Hence, let's drop the optimizatio of avoiding mkdir() on images that are
read-only, it's wrong and misleading here, since the image itself might
be read-only but our mounts are not.