1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-18 17:57:27 +03:00

50426 Commits

Author SHA1 Message Date
Lennart Poettering
1ab4edae12 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.
2021-03-17 16:53:14 +01:00
Lennart Poettering
264f1e5c3d mailmap: merge Weblate bot commiter into one 2021-03-17 16:53:10 +01:00
Lennart Poettering
cd10a4f5ec meson.build: bump version of libudev
It didn't receive new API calls, bit it was changed, hence bump the
version accordingly.
2021-03-17 16:53:01 +01:00
Lennart Poettering
4b7a051d92 hwdb: ninja update-hwdb 2021-03-17 16:52:57 +01:00
Lennart Poettering
6dca7954e3 hwdb: ninja update-hwdb-autosuspend 2021-03-17 16:52:33 +01:00
Luca Boccassi
acaf21e24d doc/RELEASE.md: document hwdb update step 2021-03-17 16:42:38 +01:00
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
Anita Zhang
91cbb4bdd6 oomd: update memory pressure candidates every interval 2021-03-16 23:54:14 -07:00
Anita Zhang
b037a6da31 oomd: new helper oomd_update_cgroup_contexts_between_hashmaps 2021-03-16 18:10:57 -07:00
Yu Watanabe
fa92d38428 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.
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
Lennart Poettering
e6ba912a1a update TODO 2021-03-16 14:58:00 +01:00
Lennart Poettering
df27f1dbca doc: mention that choosing root/usr partitions by strverscmp() on the partition label is OK 2021-03-16 14:57:56 +01:00
Lennart Poettering
1474d7ac2d dissect: show partition label in table
We nowadays pick up the partition label while dissecting, let's show it
if we have it.
2021-03-16 14:57:53 +01:00
Lennart Poettering
166ff7316e 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.
2021-03-16 14:57:49 +01:00
Lennart Poettering
9cb1709b72 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.
2021-03-16 14:57:45 +01:00
Lennart Poettering
4b5de5dd6c 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.
2021-03-16 14:57:40 +01:00
Lennart Poettering
2679f40735 dissect-image: extend comment on returned errors a bit 2021-03-16 14:57:36 +01:00
Lennart Poettering
08fe0a5386 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.
2021-03-16 14:57:31 +01:00
Lennart Poettering
d04faa4e19 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).
2021-03-16 14:57:27 +01:00
Lennart Poettering
7cf660302f 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.
2021-03-16 14:56:48 +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 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.)
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
Yu Watanabe
6e4571f0c2 network: use string_hash_ops_free 2021-03-14 00:39:10 +09:00
Yu Watanabe
cf45350745 ordered-set: make ordered_set_put_strdup() allocate OrderedSet object
For consistency with set_put_strdup().
2021-03-14 00:39:05 +09:00
Yu Watanabe
f225a338c3 network: also introduce UseDomains= for [DHCPv6] section
When we split [DHCP] section into [DHCPv4] and [DHCPv6], UseDomains=
setting was forgot to be introduced in [DHCPv6] section.
2021-03-14 00:28:19 +09:00
Yu Watanabe
5b7f0aaf69 network: use userdata instead data in conf parsers
These takes no offset, so should not change any behavior.
2021-03-14 00:24:48 +09: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