1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
Commit Graph

50144 Commits

Author SHA1 Message Date
igo95862
ca1eacd8e0 man: Specify that only d-bus methods can be answered async
Not properties.
2021-03-17 16:15:56 +01:00
Dan Sanders
5e23c2f42f hwdb: unifying receiver match keys for Logitech MX Ergo 2021-03-17 15:44:37 +01:00
Mike Gilbert
2156061fb3 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
2021-03-17 15:42:22 +01:00
Yu Watanabe
fa92d38428 dhcp6: fix wrong length for IA_PD dhcp6 option
Fixes an issue introduced by 73b49d433c.

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

Fixes #19021.
2021-03-16 21:29:49 +01:00
Lennart Poettering
69bedd07c3
Merge pull request #19009 from poettering/one-more-cname-fix
resolved: more CNAME redirect fixes
2021-03-16 21:29:06 +01:00
Lennart Poettering
1a2c2e1222
Merge pull request #19022 from poettering/journal-dont-lose-facility
journald: don't lose facility of log streams on journald restart
2021-03-16 21:28:21 +01:00
Lennart Poettering
d977ef2542 journald: restore syslog priority *with* facility bits for stream connections when restarting journald
Fixes: #19019
2021-03-16 16:09:47 +01:00
Lennart Poettering
d267ac6e64 journald: use log_warning_errno() where appropriate 2021-03-16 16:07:42 +01:00
Yu Watanabe
efd3be9de1 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.
2021-03-16 13:35:20 +01:00
Franck Bui
e62636741c meson.build: make xinitrcdir configurable
SUSE uses a different xinitrcdir ("/usr/etc/X11/xinit/xinitrc.d").
2021-03-16 13:27:09 +01:00
simmon
4dbcd443d4 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
2021-03-16 16:14:30 +09:00
Lennart Poettering
b1eea703e0 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 7820b320ea.

(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.)
2021-03-15 23:55:07 +01:00
Lennart Poettering
a7c0291c10 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
2021-03-15 23:54:53 +01:00
Lennart Poettering
1414b67e0d resolved: add helper for dumping DnsQuestion, similar to what we have for DnsAnswer 2021-03-15 23:41:25 +01:00
Lennart Poettering
567aa5c87b resolved: show TTLs in answer dump 2021-03-15 23:41:25 +01:00
Lennart Poettering
c4d98c3acc resolved: use DNS_ANSWER_MASK_SECTIONS where appropriate 2021-03-15 23:41:25 +01:00
Lennart Poettering
a1acc6e332 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.
2021-03-15 23:41:25 +01:00
Lennart Poettering
b974211acb 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.
2021-03-15 22:57:40 +01:00
Lennart Poettering
f6d80c361d resolved: drop unnecessary local variable 2021-03-15 21:21:43 +01:00
Lennart Poettering
b12058e8f9 resolved: fix indentation 2021-03-15 21:21:42 +01:00
Lennart Poettering
77db3caee3 resolved: use dns_answer_isempty() where appropriate 2021-03-15 21:21:42 +01:00
Lennart Poettering
3b7006cb44 resolved: rebreak a few comments 2021-03-15 21:21:42 +01:00
Lennart Poettering
1499a0a99a resolved: add new helper dns_answer_min_ttl() 2021-03-15 21:21:37 +01:00
Luca Boccassi
301e7cd047 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
2021-03-15 16:53:16 +00:00
Yu Watanabe
b63dae3168 man: DNS/NTP servers received from DHCP server are concatenated with the statically configured ones
Prompted by #9473.
2021-03-15 14:48:47 +00:00
Luca Boccassi
65d325edb8
Merge pull request #18984 from poettering/event-test-timeout
sd-event: add test for timeout parameter of sd_event_wait()
2021-03-15 14:31:48 +00:00
Daan De Meyer
95ba433a5f 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.
2021-03-13 13:13:54 +00:00
Yu Watanabe
925bd4c24e fstab-util: fix typo in comment 2021-03-13 12:26:10 +01:00
Kevin Backhouse
37ca78a35c 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
2021-03-12 18:25:58 +01:00
Lennart Poettering
7cb45dbfa3 sd-event: fix error handling
Noticed by @keszybz, see #18973
2021-03-12 17:56:56 +01:00
Lennart Poettering
c14e57ba6b sd-event: add a simple test for checking the timeout parameter of sd_event_wait()
Related to: #18973
2021-03-12 17:56:33 +01:00
Luca Boccassi
495787b56c
Merge pull request #18978 from keszybz/man-rc.local
Suggest network-online.target for rc.local
2021-03-12 14:54:12 +00:00
Yu Watanabe
c99c197d07
Merge pull request #18979 from keszybz/man-page-links
Man page links
2021-03-12 19:45:17 +09:00
Zbigniew Jędrzejewski-Szmek
eb0845dfb8 man: mention network-online.target in discussion of rc.local
Replacement for #18853.
2021-03-12 11:22:58 +01:00
Zbigniew Jędrzejewski-Szmek
ba3dc45126 man: fix html links to two external man pages 2021-03-12 10:58:16 +01:00
Zbigniew Jędrzejewski-Szmek
21bee820ab man: sd_bus_message_reply()→sd_bus_message_send()
Fixup for 6c41cf4459.
2021-03-12 10:58:16 +01:00
Zbigniew Jędrzejewski-Szmek
45b218b058 man: also refname rc-local.service to the generator man page
This makes it easier to find for users.
2021-03-12 09:04:59 +01:00
ulf-f
2d8ce4c701 Update resolvectl.xml
fixed typo of filename
2021-03-11 19:24:53 +01:00
Frantisek Sumsal
cb72605436 Revert "sd-event: re-check new epoll events when a child event is queued"
This reverts commit 84e998c112.

Temporarily revert this commit, since it breaks CI.
2021-03-11 18:57:43 +01:00
Lennart Poettering
d55d61823f
Merge pull request #18922 from yuwata/sd-event-fix-issue-18190
sd-event: re-check new epoll events when a child event is queued
2021-03-11 16:36:38 +01:00
Yu Watanabe
84e998c112 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.
2021-03-11 23:09:04 +09:00
Yu Watanabe
7fe11e84c2 test: add log messages 2021-03-11 23:09:04 +09:00
Zbigniew Jędrzejewski-Szmek
e3c82b1b1a NEWS: update contributors list for v248-rc3 2021-03-11 15:07:26 +01:00
Zbigniew Jędrzejewski-Szmek
47d1cae6cf
Merge pull request #18915 from keszybz/reexec-bug
Fix crash during daemon-reexec with systemd-oomd running
2021-03-11 14:46:16 +01:00
Zbigniew Jędrzejewski-Szmek
eb406c4e19
Merge pull request #18955 from keszybz/fstab-escaping
Fix handling of escaped characters in fstab
2021-03-11 14:45:11 +01:00
Zbigniew Jędrzejewski-Szmek
e4645ca599 basic/group-util: optimize alloca use
Follow-up for 0fa7b50053.
2021-03-11 14:43:16 +01:00
Zbigniew Jędrzejewski-Szmek
bcef0f33cc docs: more markup 2021-03-11 14:43:16 +01:00
Frantisek Sumsal
3a1bc3fcc0 repart: fix the loop dev support check
Since f17bdf8264 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.
2021-03-11 14:42:33 +01:00
Zbigniew Jędrzejewski-Szmek
ceffd6a961
Merge pull request #18962 from poettering/dissect-fixes
three image dissection fixes
2021-03-11 14:42:17 +01:00
Michal Sekletar
43b4e3058c 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).
2021-03-11 13:12:37 +01:00