]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agotest-nss-users: add new nss test that resolves users and groups
Zbigniew Jędrzejewski-Szmek [Fri, 12 Mar 2021 13:25:56 +0000 (14:25 +0100)] 
test-nss-users: add new nss test that resolves users and groups

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1929936.
This is similar to test-nss-hosts, but does users, groups, uid, gids.

Functions tested are:
_nss_*_getpwnam_r
_nss_*_getgrnam_r
_nss_*_getpwgid_r
_nss_*_getgrgid_r

Other entry points should be tested too, but it's not relevant to the bug
I was investigating, so I'm leaving that for later ;)

3 years agopo: Added translation using Weblate (Dutch)
Pjotr Vertaalt [Tue, 23 Mar 2021 09:20:59 +0000 (10:20 +0100)] 
po: Added translation using Weblate (Dutch)

Co-authored-by: Pjotr Vertaalt <pjotrvertaalt@gmail.com>
3 years agoman: document differences in clean exit status for Type=oneshot
David Tardon [Fri, 19 Mar 2021 09:05:47 +0000 (10:05 +0100)] 
man: document differences in clean exit status for Type=oneshot

See commit 1f0958f640b87175cd547c1e69084cfe54a22e9d .

3 years agoman: rate limited services can be restartet from timer or socket
Christian Hesse [Tue, 23 Mar 2021 06:57:03 +0000 (07:57 +0100)] 
man: rate limited services can be restartet from timer or socket

If rate limiting kicks in for Restart= logic it is still possible for a
timer or socket to restart the service.

3 years agosd-event: disable epoll_pwait2 for now
Zbigniew Jędrzejewski-Szmek [Fri, 12 Mar 2021 09:20:38 +0000 (10:20 +0100)] 
sd-event: disable epoll_pwait2 for now

This reverts the gist of commit 798445ab84cff51bde7fcf936f0fb19c37cf858c.

Unfortunately the new syscall causes test-event to hang. 32 bit architectures
seem affected: i686 and arm32 in fedora koji. 32 bit build of test-event hangs
reliably under valgrind:

$ PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig meson build-32 -Dc_args=-m32 -Dc_link_args=-m32 -Dcpp_args=-m32 -Dcpp_link_args=-m32 && ninja -C build-32 test-event && valgrind build/test-event

If I set epoll_pwait2_absent=true, so the new function is never called, then
the issue does not reproduce. It seems to be strictly tied to the syscall.

On amd64, the syscall is not used, at least with the kernel that Fedora
provides. The kernel patch 58169a52ebc9a733aeb5bea857bc5daa71a301bb says:

  For timespec, only support this new interface on 2038 aware platforms
  that define __kernel_timespec_t. So no CONFIG_COMPAT_32BIT_TIME.

And Fedora sets CONFIG_COMPAT_32BIT_TIME=y. I expect most other distros will too.

On amd64: epoll_wait_usec: epoll_pwait2: ret=-1 / errno=38
On i686 (same kernel): epoll_wait_usec: epoll_pwait2: ret=2 / errno=0

Is this some kind of emulation? Anyway, it seems that this is what is going wrong.

So let's disable the syscall until it becomes more widely available and the
kinks have been ironed out.

Fixes test-event issue in #19052.

3 years agoMerge pull request #19075 from keszybz/calendarspec-loop
Zbigniew Jędrzejewski-Szmek [Tue, 23 Mar 2021 08:06:16 +0000 (09:06 +0100)] 
Merge pull request #19075 from keszybz/calendarspec-loop

Fix infinite loop in calendarspec calculation when timezone has negative DST save value

3 years agofirewall-util: refuse IPv6 firewall rules when kernel does not support IPv6
Yu Watanabe [Tue, 23 Mar 2021 03:02:54 +0000 (12:02 +0900)] 
firewall-util: refuse IPv6 firewall rules when kernel does not support IPv6

3 years agofirewall-util: gracefully handle -EOVERFLOW returned from older kernel
Yu Watanabe [Mon, 22 Mar 2021 16:57:51 +0000 (01:57 +0900)] 
firewall-util: gracefully handle -EOVERFLOW returned from older kernel

3 years agofirewall-util: do not use goto for retrying
Yu Watanabe [Mon, 22 Mar 2021 16:52:07 +0000 (01:52 +0900)] 
firewall-util: do not use goto for retrying

3 years agofirewall-util: add missing return value check
Yu Watanabe [Mon, 22 Mar 2021 16:34:30 +0000 (01:34 +0900)] 
firewall-util: add missing return value check

3 years agofirewall-util: probe firewall backend in fw_ctx_new()
Yu Watanabe [Tue, 23 Mar 2021 05:38:18 +0000 (14:38 +0900)] 
firewall-util: probe firewall backend in fw_ctx_new()

FirewallContext is used by networkd and nspawn. Both allocates the
context when it is really necessary. Hence, it is not necessary to delay
probing backend.

Moreover, if iptables backend is not enabled on build, and nftables is
not supported by kernel, previously `fw_nftables_init()` is called
everytime when we try to configure masquerade or dnat. It causes
significant performance loss.

Fixes test-firewall-util issue in #19052.

3 years agonetwork: allocate FirewallContext lazily
Yu Watanabe [Tue, 23 Mar 2021 05:37:05 +0000 (14:37 +0900)] 
network: allocate FirewallContext lazily

3 years agofirewall-util: logs which backend will be used
Yu Watanabe [Mon, 22 Mar 2021 13:33:23 +0000 (22:33 +0900)] 
firewall-util: logs which backend will be used

This also modernizes code a bit.

3 years agoshared/calendarspec: when mktime() moves us backwards, jump forward 19075/head
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 11:51:47 +0000 (12:51 +0100)] 
shared/calendarspec: when mktime() moves us backwards, jump forward

When trying to calculate the next firing of 'Sun *-*-* 01:00:00', we'd fall
into an infinite loop, because mktime() moves us "backwards":

Before this patch:
tm_within_bounds: good=0 2021-03-29 01:00:00 → 2021-03-29 00:00:00
tm_within_bounds: good=0 2021-03-29 01:00:00 → 2021-03-29 00:00:00
tm_within_bounds: good=0 2021-03-29 01:00:00 → 2021-03-29 00:00:00
...

We rely on mktime() normalizing the time. The man page does not say that it'll
move the time forward, but our algorithm relies on this. So let's catch this
case explicitly.

With this patch:
$ TZ=Europe/Dublin faketime 2021-03-21 build/systemd-analyze calendar --iterations=5 'Sun *-*-* 01:00:00'
Normalized form: Sun *-*-* 01:00:00
    Next elapse: Sun 2021-03-21 01:00:00 GMT
       (in UTC): Sun 2021-03-21 01:00:00 UTC
       From now: 59min left
       Iter. #2: Sun 2021-04-04 01:00:00 IST
       (in UTC): Sun 2021-04-04 00:00:00 UTC
       From now: 1 weeks 6 days left           <---- note the 2 week jump here
       Iter. #3: Sun 2021-04-11 01:00:00 IST
       (in UTC): Sun 2021-04-11 00:00:00 UTC
       From now: 2 weeks 6 days left
       Iter. #4: Sun 2021-04-18 01:00:00 IST
       (in UTC): Sun 2021-04-18 00:00:00 UTC
       From now: 3 weeks 6 days left
       Iter. #5: Sun 2021-04-25 01:00:00 IST
       (in UTC): Sun 2021-04-25 00:00:00 UTC
       From now: 1 months 4 days left

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1941335.

3 years agoMerge pull request #19079 from poettering/resolved-ipv6-cache-fix
Luca Boccassi [Mon, 22 Mar 2021 23:20:11 +0000 (23:20 +0000)] 
Merge pull request #19079 from poettering/resolved-ipv6-cache-fix

fix CNAME/DNAME following in combined A/AAAA replies

3 years agoMerge pull request #19081 from keszybz/three-comment-updates
Luca Boccassi [Mon, 22 Mar 2021 22:36:01 +0000 (22:36 +0000)] 
Merge pull request #19081 from keszybz/three-comment-updates

Three comment updates

3 years agoman: say that .device units need udev 19081/head
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 20:45:04 +0000 (21:45 +0100)] 
man: say that .device units need udev

This was implied by the need to tag them with "systemd", but let's make this
obvious, since it's rather easy to trip over this as a user.

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1941458.

3 years agoReword and reindent comment
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 20:35:40 +0000 (21:35 +0100)] 
Reword and reindent comment

Follow-up for 0e557eef37.

3 years agoPartially revert "correct incorrect command in NEWS (#19048)"
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 13:28:21 +0000 (14:28 +0100)] 
Partially revert "correct incorrect command in NEWS (#19048)"

This reverts commit 6d18c13e79a0b3374599a3416a644a7837d5a1e6.

The syntax like "0666" is very unclear. It only makes sense for some subset of
people who do C programming. Let's use the much more sensible modern python
syntax instead.

3 years agoMerge pull request #19058 from bugaevc/log-open-protect-errno
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 20:28:28 +0000 (21:28 +0100)] 
Merge pull request #19058 from bugaevc/log-open-protect-errno

Save errno over log_open() calls

3 years agoshell-completion: systemd-run: add missing options
Yu Watanabe [Fri, 19 Mar 2021 13:16:22 +0000 (22:16 +0900)] 
shell-completion: systemd-run: add missing options

Closes #19044.

3 years agoupdate TODO
Lennart Poettering [Mon, 22 Mar 2021 20:17:58 +0000 (21:17 +0100)] 
update TODO

3 years agotest-calendarspec: do not convert timezone "" to ":"
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 10:29:35 +0000 (11:29 +0100)] 
test-calendarspec: do not convert timezone "" to ":"

I *think* it doesn't actually make any difference, because ":" will be ignored.
437f48a471f51ac9dd2697ee3b848a71b4f101df added prefixing with ":", but didn't
take into account the fact that we also use "" with a different meaning than
NULL here. But let's restore the original behaviour of specifying the empty
string.

3 years agotest-calendarspec: print offending line in output
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 10:10:22 +0000 (11:10 +0100)] 
test-calendarspec: print offending line in output

The output is rather long at this makes it easier to jump to the right place.
Also use normal output routines and set_unset_env() to make things more
compact.

3 years agoshared/calendarspec: constify parameter and simplify assignments to variable
Zbigniew Jędrzejewski-Szmek [Mon, 22 Mar 2021 08:20:47 +0000 (09:20 +0100)] 
shared/calendarspec: constify parameter and simplify assignments to variable

The scope of start & stop is narrowed down, and they are assigned only once.
No functional change, but I think the code is easier to read this way.
Also add a comment to make the code easier to read.

3 years agoupdate TODO
Lennart Poettering [Mon, 22 Mar 2021 18:07:34 +0000 (19:07 +0100)] 
update TODO

3 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

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

3 years agohomework: use FORK_CLOSE_ALL_FDS in a few more places 19058/head
Sergey Bugaev [Sun, 21 Mar 2021 18:21:57 +0000 (21:21 +0300)] 
homework: use FORK_CLOSE_ALL_FDS in a few more places

And make sure to reopen the log appropriately.

3 years agotree-wide: reopen log after fork when needed
Sergey Bugaev [Sat, 20 Mar 2021 15:12:14 +0000 (18:12 +0300)] 
tree-wide: reopen log after fork when needed

This follows up on 0b1f3c768ce1bd1490a5e53f539976dcef8ca765, adding more places
where we should reopen the log after forking with FORK_CLOSE_ALL_FDS.

When immediately calling exec in the child, prefer to explicitly reopen the log
after exec fails. In other cases, just use FORK_REOPEN_LOG.

3 years agolog: protect errno in log_open()
Sergey Bugaev [Mon, 22 Mar 2021 15:31:12 +0000 (18:31 +0300)] 
log: protect errno in log_open()

Commit 0b1f3c768ce1bd1490a5e53f539976dcef8ca765 has introduced log_open()
calls after exec fails post-fork. However, the log_open() call itself could
change the value of errno, which, for me, manifested in:

$ coredumpctl gdb
...
Failed to invoke gdb: Success

Fix this by using PROTECT_ERRNO in log_open().

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

3 years agoshared/calendarspec: abort calculation after 1000 iterations
Zbigniew Jędrzejewski-Szmek [Sun, 21 Mar 2021 19:59:32 +0000 (20:59 +0100)] 
shared/calendarspec: abort calculation after 1000 iterations

We have a bug where we seem to enter an infinite loop when running in the
Europe/Dublin timezone. The timezone is "special" because it has negative SAVE
values. The handling of this should obviously be fixed, but let's use a
belt-and-suspenders approach, and gracefully fail if we fail to find an answer
within a specific number of attempts. The code in this function is rather
complex, and it's hard to rule out another bug in the future.

3 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

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

3 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

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

3 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)

3 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'

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

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

3 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)

3 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

3 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

3 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

3 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

3 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

3 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

3 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)

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

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

3 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

3 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

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

3 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

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

3 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

3 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

3 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

3 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

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

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

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

3 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.)

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

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

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

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

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

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

3 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

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

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

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

3 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

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

3 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

3 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

3 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

3 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

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

3 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

3 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

3 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
3 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

3 years agoupdate TODO 18958/head
Lennart Poettering [Wed, 10 Mar 2021 16:57:58 +0000 (17:57 +0100)] 
update TODO

3 years agodoc: mention that choosing root/usr partitions by strverscmp() on the partition label...
Lennart Poettering [Thu, 11 Mar 2021 20:35:24 +0000 (21:35 +0100)] 
doc: mention that choosing root/usr partitions by strverscmp() on the partition label is OK

3 years agodissect: show partition label in table
Lennart Poettering [Wed, 10 Mar 2021 16:55:15 +0000 (17:55 +0100)] 
dissect: show partition label in table

We nowadays pick up the partition label while dissecting, let's show it
if we have it.

3 years agodissect: don't insist on a root/usr partition when just inspecting
Lennart Poettering [Wed, 10 Mar 2021 16:52:54 +0000 (17:52 +0100)] 
dissect: don't insist on a root/usr partition when just inspecting

Let's relax rules here a bit, taking benefit of the fact that
DISSECT_IMAGE_REQUIRE_ROOT + DISSECT_IMAGE_GENERIC_ROOT are now separate
flags.

3 years agoexecute: drop DissectImageFlags parameter from namespace_setup()
Lennart Poettering [Wed, 10 Mar 2021 16:49:42 +0000 (17:49 +0100)] 
execute: drop DissectImageFlags parameter from namespace_setup()

The function already has a ridiculous amount of paramaters, let's drop
one that is either not used at all or has a constant value and let's
pick it internally.

3 years agodissect-image: split DISSECT_IMAGE_REQUIRE_ROOT in two
Lennart Poettering [Wed, 10 Mar 2021 16:41:18 +0000 (17:41 +0100)] 
dissect-image: split DISSECT_IMAGE_REQUIRE_ROOT in two

Previously, the flag did two things at once: enable support for using
generic partitions as root fs if there were only one/allow use of
partition-table-less images as root fs. And secondly, insist that there
was a rootfs, and fail if not. Let's split these two in two separate
options so that they can be used independently of each other.

There are cases where one wants to use one without the other (i.e. when
inspecting things with systemd-dissect tool it should be OK to do so
even if image has no root fs), and it's cleaner anyway.

3 years agodissect-image: extend comment on returned errors a bit
Lennart Poettering [Wed, 10 Mar 2021 15:58:54 +0000 (16:58 +0100)] 
dissect-image: extend comment on returned errors a bit

3 years agodissect-image: do an strverscmp() on the partition label of root/usr if multiple...
Lennart Poettering [Wed, 10 Mar 2021 15:37:28 +0000 (16:37 +0100)] 
dissect-image: do an strverscmp() on the partition label of root/usr if multiple exist

Let's add a very simple mechanism for doing A/B updating of disk images:
for root + /usr and their verity partitions let's ue strverscmp() on the
label to determine which one to use when dissecting a disk image. That
way, if the root partition label contains a string such as "foo-0.15"
and another one "foo-0.16", the latter wins.

For other partition types let's stick to the logic of "first partition
found" win, as before. Versioning makes sense for partitions that
typically and primarily may carry software packages, but the other
partition types usuall don't.

3 years agotree-wide: make use of DISSECT_IMAGE_USR_NO_ROOT in various tools
Lennart Poettering [Tue, 9 Mar 2021 21:58:08 +0000 (22:58 +0100)] 
tree-wide: make use of DISSECT_IMAGE_USR_NO_ROOT in various tools

Let's make use of the new dissection in all tools where this makes
sense, which are all tools that dissect images, except for those which
inherently operate on state/configuraiton and thus where an image
without state nor configuration is useless (e.g.
systemd-tmpfiles/systemd-firstboot/… --image= switch).

3 years agodissect-image: support images without rootfs but with /usr/
Lennart Poettering [Tue, 9 Mar 2021 21:55:45 +0000 (22:55 +0100)] 
dissect-image: support images without rootfs but with /usr/

Let's add support for images that include an /usr/ file system but no
root fs. Mount a tmpfs as root for images like this, all controlled by a
new flag DISSECT_IMAGE_USR_NO_ROOT.

This is useful for entirely stateless images, that come up pristine on
every single boot.

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

3 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").

3 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

3 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.)

3 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