]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoresolved: synthesize NODATA instead of NXDOMAIN if gateway exists, but of other protocol 17821/head
Lennart Poettering [Fri, 6 Nov 2020 09:26:44 +0000 (10:26 +0100)] 
resolved: synthesize NODATA instead of NXDOMAIN if gateway exists, but of other protocol

Fixes: #11192
3 years agolocal-addresses: make returning accumulated list optional
Lennart Poettering [Fri, 6 Nov 2020 09:26:40 +0000 (10:26 +0100)] 
local-addresses: make returning accumulated list optional

3 years agoresolved: improve log message when we use TCP a bit
Lennart Poettering [Tue, 10 Nov 2020 17:45:59 +0000 (18:45 +0100)] 
resolved: improve log message when we use TCP a bit

DNS-over-TLS being in use isn't precisely the same as "UDP not
supported". Let's make this clearer.

3 years agoMerge pull request #17809 from yuwata/network-address-fixes-17803
Lennart Poettering [Thu, 3 Dec 2020 20:04:58 +0000 (21:04 +0100)] 
Merge pull request #17809 from yuwata/network-address-fixes-17803

network: two fixes for configuring address correctly

3 years agorandom-util: open /dev/urandom implicitly in random_write_entropy() if needed
Lennart Poettering [Sat, 28 Nov 2020 14:24:44 +0000 (15:24 +0100)] 
random-util: open /dev/urandom implicitly in random_write_entropy() if needed

3 years agoMerge pull request #17836 from poettering/tpm2-condition
Lennart Poettering [Thu, 3 Dec 2020 19:13:45 +0000 (20:13 +0100)] 
Merge pull request #17836 from poettering/tpm2-condition

Add ConditionSecurity=tpm2

3 years agoMerge pull request #17079 from keszybz/late-exec-resolution
Lennart Poettering [Thu, 3 Dec 2020 13:58:20 +0000 (14:58 +0100)] 
Merge pull request #17079 from keszybz/late-exec-resolution

Resolve executable paths before execution, use fexecve()

3 years agoMerge pull request #17812 from poettering/systemctl-version-feature-update
Lennart Poettering [Thu, 3 Dec 2020 13:34:08 +0000 (14:34 +0100)] 
Merge pull request #17812 from poettering/systemctl-version-feature-update

build.h: add a bunch of missing features strings

3 years agoshared/build: make the version string definition less terrible 17812/head
Zbigniew Jędrzejewski-Szmek [Thu, 3 Dec 2020 10:12:59 +0000 (11:12 +0100)] 
shared/build: make the version string definition less terrible

The BLKID and ELFUTILS strings were present twice. Let's reaarange things so that
each times requires definition in exactly one place.

Also let's sort things a bit:
the "heavy hitters" like PAM/MAC first,
then crypto libs,
then other libs, alphabetically,
compressors,
and external compat integrations.

I think it's useful for users to group similar concepts together to some extent.
For example, when checking what compression is available, it helps a lot to have
them listed together.

FDISK is renamed to LIBFDISK to make it clear that this is about he library and
the executable.

3 years agoupdate TODO 17836/head
Lennart Poettering [Thu, 3 Dec 2020 11:04:11 +0000 (12:04 +0100)] 
update TODO

3 years agocore: add ConditionSecurity=tpm2 support
Lennart Poettering [Sat, 28 Nov 2020 19:33:53 +0000 (20:33 +0100)] 
core: add ConditionSecurity=tpm2 support

3 years agofw_add_masquerade: remove unused function arguments
Florian Westphal [Fri, 19 Jun 2020 10:41:49 +0000 (12:41 +0200)] 
fw_add_masquerade: remove unused function arguments

Similar to the previous commit.  All callers pass NULL.  This will
ease initial nftables backend implementation (less features to cover).

Add the function parameters as local variables and let compiler
remove branches.  Followup patch can remove the if (NULL) conditionals.

3 years agofw_add_local_dnat: remove unused function arguments
Florian Westphal [Fri, 19 Jun 2020 11:33:19 +0000 (13:33 +0200)] 
fw_add_local_dnat: remove unused function arguments

All users pass a NULL/0 for those, things haven't changed since 2015
when this was added originally, so remove the arguments.

THe paramters are re-added as local function variables, initalised
to NULL or 0.  A followup patch can then manually remove all
if (NULL) rather than leaving dead-branch optimization to compiler.

Reason for not doing it here is to ease patch review.

Not requiring support for this will ease initial nftables backend
implementation.
In case a use-case comues up later this feature can be re-added.

3 years agobuild.h: add a bunch of missing features strings
Lennart Poettering [Wed, 2 Dec 2020 14:36:00 +0000 (15:36 +0100)] 
build.h: add a bunch of missing features strings

Let's make "systemctl --version" more useful for detecting when
build-time features/deps are enabled and which ones arent't again.

3 years agoMerge pull request #17830 from yuwata/update-kernel-headers
Lennart Poettering [Thu, 3 Dec 2020 08:22:01 +0000 (09:22 +0100)] 
Merge pull request #17830 from yuwata/update-kernel-headers

Update kernel headers

3 years agoethtool: add two new link modes 17830/head
Yu Watanabe [Thu, 3 Dec 2020 02:23:50 +0000 (11:23 +0900)] 
ethtool: add two new link modes

3 years agoshared/kernel: update kernel headers
Yu Watanabe [Thu, 3 Dec 2020 02:20:18 +0000 (11:20 +0900)] 
shared/kernel: update kernel headers

From kernel commit 34816d20f173a90389c8a7e641166d8ea9dce70a.

3 years agobasic/linux: update kernel headers
Yu Watanabe [Thu, 3 Dec 2020 02:07:52 +0000 (11:07 +0900)] 
basic/linux: update kernel headers

From kernel commit 34816d20f173a90389c8a7e641166d8ea9dce70a.

3 years agonetwork: ignore broadcast address for /31 or /32 addresses 17809/head
Yu Watanabe [Thu, 3 Dec 2020 01:19:35 +0000 (10:19 +0900)] 
network: ignore broadcast address for /31 or /32 addresses

As they do not have broadcast address.
See https://tools.ietf.org/html/rfc3021

3 years agonetwork: fix verification for broadcast address
Yu Watanabe [Wed, 2 Dec 2020 10:26:41 +0000 (19:26 +0900)] 
network: fix verification for broadcast address

Fixes a bug caused by fe841414ef157f7f01d339c5d5730126e7b5fe0a.

3 years agonetwork: do not set broadcast if prefixlen is 31 or 32
Yu Watanabe [Wed, 2 Dec 2020 10:19:06 +0000 (19:19 +0900)] 
network: do not set broadcast if prefixlen is 31 or 32

After fe841414ef157f7f01d339c5d5730126e7b5fe0a, broadcast address is
also compared with existing one to determine whether the address is
foregin or not. So, the address object should not contain unnecessary
information.

Fixes #17803.

3 years agostub: don't ever respond to datagrams coming in on non-localhost addreses, on the...
Lennart Poettering [Thu, 5 Nov 2020 14:51:12 +0000 (15:51 +0100)] 
stub: don't ever respond to datagrams coming in on non-localhost addreses, on the stub

3 years agoresolved: beef up logic for suppressing "localhost" entry in /etc/hosts
Lennart Poettering [Tue, 10 Nov 2020 22:30:25 +0000 (23:30 +0100)] 
resolved: beef up logic for suppressing "localhost" entry in /etc/hosts

Either suppress the entry entirely, or not at all. But do not suppress
the "localhost" names we recognize, leaving the ones we do not in place.

On Fedora, where "localhost4.localdomain4" is among those listed in
/etc/hosts for 127.0.0.1 we'd thus otherwise drop the "localhost" but
keep the "localhost4.localdomain4" and then on reverse lookups only
return that, which is highly confusing.

3 years agoresolved: use stat_inode_unmodified() to detect /etc/hosts changes
Lennart Poettering [Fri, 6 Nov 2020 13:56:16 +0000 (14:56 +0100)] 
resolved: use stat_inode_unmodified() to detect /etc/hosts changes

3 years agoresolved: never allow _gateway lookups to go to the network
Lennart Poettering [Wed, 11 Nov 2020 16:38:21 +0000 (17:38 +0100)] 
resolved: never allow _gateway lookups to go to the network

Make them rather fail than go to the network.

Previously we'd filter them on LLMNR (explicitly) and MDNS (implicitly,
because it doesn't have .local suffix), but not on DNS.

In order to make _gateway truly reliable, let's not allow it to go to
DNS either, and keep it local.

This is particular relevant, as clients can now request lookups without
local RR synthesis, where we'd rather have NXDOMAIN returned for
_gateway than have it hit the network.

3 years agoresolved: lower SERVFAIL cache timeout from 30s to 10s
Lennart Poettering [Thu, 12 Nov 2020 16:52:09 +0000 (17:52 +0100)] 
resolved: lower SERVFAIL cache timeout from 30s to 10s

Apparently 30s is a bit too long for some cases, see #5552. But not
caching SERVFAIL at all also breaks stuff, see explanation in
201d99584ed7af8078bb243ce2587e5455074713.

Let's try to find some middle ground, by lowering the cache timeout to
10s. This should be ample for the problem
201d99584ed7af8078bb243ce2587e5455074713 attackes, but not as long as
half a miute, as #5552 complains.

Fixes: #5552
3 years agoMerge pull request #17807 from poettering/bindtodevice
Yu Watanabe [Wed, 2 Dec 2020 23:50:43 +0000 (08:50 +0900)] 
Merge pull request #17807 from poettering/bindtodevice

use SO_BINDTOIFINDEX while connect()

3 years agoresolved: insert large dgram size into EDNS0 only when in LARGE UDP mode
Lennart Poettering [Wed, 11 Nov 2020 20:20:15 +0000 (21:20 +0100)] 
resolved: insert large dgram size into EDNS0 only when in LARGE UDP mode

Specifically, in TLS-DO there's no reason to set the exotic dgram size.

3 years agodns-domain: try IDN2003 rules if IDN2008 doesn't work
Lennart Poettering [Mon, 9 Nov 2020 22:10:43 +0000 (23:10 +0100)] 
dns-domain: try IDN2003 rules if IDN2008 doesn't work

This follows more closely what web browsers do, and makes sure emojis in
domains work.

Fixes: #14483
3 years agoAdds missing documentation for Assertions (#17825)
Steve Ramage [Wed, 2 Dec 2020 23:47:24 +0000 (15:47 -0800)] 
Adds missing documentation for Assertions (#17825)

3 years agoMerge pull request #17810 from systemd/meson-allows-fuzzer-building
Yu Watanabe [Wed, 2 Dec 2020 22:36:43 +0000 (07:36 +0900)] 
Merge pull request #17810 from systemd/meson-allows-fuzzer-building

meson: always allow fuzzers to be built

3 years agoresolved: automatically flush caches on clock change
Lennart Poettering [Thu, 5 Nov 2020 13:17:37 +0000 (14:17 +0100)] 
resolved: automatically flush caches on clock change

DNSSEC validation takes the system clock into account to validate
signatures. This means if we had incorrect time and the time is then
changed to the correct one we should flush out everything and
re-validate taking the new time into account.

(This logic will also trigger after system suspend, which is not bad
either, given that quite possibly we are connected to a different
network, and thus would get different DNS data, without us noticing
otherwise via link beat).

3 years agovirt: Properly detect nested UML inside another hypervisor
Christopher Obbard [Wed, 2 Dec 2020 14:20:39 +0000 (14:20 +0000)] 
virt: Properly detect nested UML inside another hypervisor

UML runs as a user-process so it can quite easily be ran inside of
another hypervisor, for instance inside a KVM instance. UML passes
through the CPUID from the host machine so in this case detect_vm
incorrectly identifies as running under KVM. So check we are running
a UML kernel first, before we check any other hypervisors.

Resolves: #17754

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
3 years agoresolved: log when a bus client changes per-link DNS info
Lennart Poettering [Thu, 5 Nov 2020 17:45:46 +0000 (18:45 +0100)] 
resolved: log when a bus client changes per-link DNS info

Fixes: #16298
3 years agoMerge pull request #17804 from poettering/write-resolve-conf-less
Zbigniew Jędrzejewski-Szmek [Wed, 2 Dec 2020 15:56:52 +0000 (16:56 +0100)] 
Merge pull request #17804 from poettering/write-resolve-conf-less

write resolv.conf less often

3 years agoresolved: properly check per-link NTA list
Lennart Poettering [Tue, 17 Nov 2020 17:31:53 +0000 (18:31 +0100)] 
resolved: properly check per-link NTA list

We need to check for parent domains too. We did this correctly for the
system-wide NTA list, but not for the per-link one. Let's fix that.

3 years agoresolved: bind socket to interface during connect() 17807/head
Lennart Poettering [Thu, 5 Nov 2020 17:22:38 +0000 (18:22 +0100)] 
resolved: bind socket to interface during connect()

Apparently, IF_UNICAST_IF does not influence the routing decisions done
during connect(). But SO_BINDTODEVICE/SO_BINDTOINDEX does, which however
brings a lot of other semantics with it, we are not so interested in
(i.e. it doesn't not allow packets from any other iface to us, even if
routing otherwise allows it).

Hence, let's bind to the ifindex immediately before the connect() and
unbind right after again, so that we get the semantics we want, but not
the ones we don't.

Fixes: #11935
Replaces: #12004

3 years agosocket-util: add sockaddr_in_addr() helper
Lennart Poettering [Wed, 18 Nov 2020 09:25:27 +0000 (10:25 +0100)] 
socket-util: add sockaddr_in_addr() helper

This extracts the IP address (as union in_addr_union) from a socket
address (i.e. a struct sockaddr).

3 years agoMerge pull request #17707 from yuwata/network-fix-reconfigure
Zbigniew Jędrzejewski-Szmek [Wed, 2 Dec 2020 14:10:34 +0000 (15:10 +0100)] 
Merge pull request #17707 from yuwata/network-fix-reconfigure

network: fix race in reconfiguring link

3 years agoMerge pull request #17798 from yuwata/ipv4ll-follow-ups
Zbigniew Jędrzejewski-Szmek [Wed, 2 Dec 2020 13:59:33 +0000 (14:59 +0100)] 
Merge pull request #17798 from yuwata/ipv4ll-follow-ups

network: improve debug logs and add tests for IPv4LL

3 years agonetwork: add Protocol= to vlan netdev (#17794)
walbit-de [Wed, 2 Dec 2020 13:58:02 +0000 (14:58 +0100)] 
network: add Protocol= to vlan netdev (#17794)

3 years agomeson: allow fuzzers to be built even if fuzz testing is disabled 17810/head
Zbigniew Jędrzejewski-Szmek [Wed, 2 Dec 2020 12:49:24 +0000 (13:49 +0100)] 
meson: allow fuzzers to be built even if fuzz testing is disabled

This makes commands like 'ninja -C build fuzz-journal-remote' or
'ninja -C build fuzzers' work, even if we have -Dfuzz-tests=false.
Two advantages: correctness of the meson declarations is verified even
if fuzzers are not built, and it easier to do a one-off build to check for
regressions or such.

Follow-up for 1763ef1d49cc1263b40f157060a61cdd6e91d3a4.

3 years agonetwork: stop to assign UUID when reconfiguring link 17707/head
Yu Watanabe [Tue, 24 Nov 2020 06:47:13 +0000 (15:47 +0900)] 
network: stop to assign UUID when reconfiguring link

This fixes the following race in reconfiguring link:
1. an interface requests UUID.
2. the interface is reconfigured and link_configure() is called.
3. sd-lldp client is started on the interface (it is enabled by default).
4. networkd acquires UUID, and get_product_uuid_handler() calls
   link_configure() for the link again.
5. link_lldp_rx_configure() fails to set ifindex for already running
   sd-lldp client.
6. the link enters failed state.

3 years agonetwork: use bus_error_message()
Yu Watanabe [Tue, 24 Nov 2020 06:58:04 +0000 (15:58 +0900)] 
network: use bus_error_message()

3 years agomeson: use '_' as separator in fuzz test names
Yu Watanabe [Wed, 2 Dec 2020 09:05:06 +0000 (18:05 +0900)] 
meson: use '_' as separator in fuzz test names

Follow-up for d448888924c1d4815cb97bcd5d94419812c053b9 and ca121e20c42219e3bc4e5cb63dcc96cc5eae2879.

Fixes #17568.

3 years agotree-wide: fix typos
Yu Watanabe [Wed, 2 Dec 2020 08:53:32 +0000 (17:53 +0900)] 
tree-wide: fix typos

3 years agonetwork: add debug log about requesting DHCP address 17798/head
Yu Watanabe [Wed, 2 Dec 2020 07:20:52 +0000 (16:20 +0900)] 
network: add debug log about requesting DHCP address

This addresses
https://github.com/systemd/systemd/pull/17474#discussion_r515996491.

3 years agotest-network: confirm that IPv4ll address is dropped after DHCPv4 lease is acquired
Yu Watanabe [Wed, 2 Dec 2020 07:12:18 +0000 (16:12 +0900)] 
test-network: confirm that IPv4ll address is dropped after DHCPv4 lease is acquired

3 years agosd-ipv4acd: logs current state
Yu Watanabe [Wed, 2 Dec 2020 06:31:30 +0000 (15:31 +0900)] 
sd-ipv4acd: logs current state

3 years agosd-ipv4acd,sd-ipv4ll: include interface name in the debug logs
Yu Watanabe [Wed, 2 Dec 2020 06:21:35 +0000 (15:21 +0900)] 
sd-ipv4acd,sd-ipv4ll: include interface name in the debug logs

3 years agolog-link: introduce log_interface_full_errno() macro
Yu Watanabe [Wed, 2 Dec 2020 06:15:50 +0000 (15:15 +0900)] 
log-link: introduce log_interface_full_errno() macro

3 years agosd-ipv4acd,sd-ipv4ll: introduce _get_ifindex() and _get_ifname()
Yu Watanabe [Wed, 2 Dec 2020 06:00:06 +0000 (15:00 +0900)] 
sd-ipv4acd,sd-ipv4ll: introduce _get_ifindex() and _get_ifname()

They will be used in later commits.

This also makes sd_ipv4acd_set_ifindex() check the existence of the interface.

3 years agoresolved: don't update resolv.conf snippets unnecessarily 17804/head
Lennart Poettering [Wed, 18 Nov 2020 14:12:44 +0000 (15:12 +0100)] 
resolved: don't update resolv.conf snippets unnecessarily

Fixes: #17577
3 years agofs-util: add conservative_rename() that suppresses unnecessary renames
Lennart Poettering [Wed, 18 Nov 2020 14:11:43 +0000 (15:11 +0100)] 
fs-util: add conservative_rename() that suppresses unnecessary renames

if the source and destination file match in contents and basic file
attributes, don#t rename, but just remove source.

This is a simple way to suppress inotify events + mtime changes when
atomically updating files.

3 years agocopy: teach copy_file() that a mode=-1 call means "take mode from original file"
Lennart Poettering [Wed, 18 Nov 2020 14:10:52 +0000 (15:10 +0100)] 
copy: teach copy_file() that a mode=-1 call means "take mode from original file"

3 years agopager: stop disabling urlification under a pager
Zbigniew Jędrzejewski-Szmek [Mon, 30 Nov 2020 09:19:52 +0000 (10:19 +0100)] 
pager: stop disabling urlification under a pager

Less 568 properly shows urlified strings.

Putative NEWS entry:
* Urlification is now enabled by default even when a pager is used.
  Previously it was disabled, because less would not show such markup
  properly. This has been fixed in less 568.
  Please either upgrade less, or use SYSTEMD_URLIFY=0 to disable the
  feature.

3 years agoMerge pull request #17692 from yuwata/ipv4ll
Zbigniew Jędrzejewski-Szmek [Tue, 1 Dec 2020 20:59:30 +0000 (21:59 +0100)] 
Merge pull request #17692 from yuwata/ipv4ll

network: fold ipv4ll fallback modes into normal ipv4ll addressing

3 years agoMerge pull request #17703 from poettering/event-ratelimit
Zbigniew Jędrzejewski-Szmek [Tue, 1 Dec 2020 20:47:43 +0000 (21:47 +0100)] 
Merge pull request #17703 from poettering/event-ratelimit

sd-event: add a concept of ratelimiting

3 years agoMerge pull request #17524 from poettering/fileio-offset
Zbigniew Jędrzejewski-Szmek [Tue, 1 Dec 2020 20:38:52 +0000 (21:38 +0100)] 
Merge pull request #17524 from poettering/fileio-offset

cryptsetup: if keyfile is specified as AF_UNIX socket in the fs, connect to it, and read key data from it

3 years agoman: document new ratelimiting APIs 17703/head
Lennart Poettering [Mon, 23 Nov 2020 21:30:09 +0000 (22:30 +0100)] 
man: document new ratelimiting APIs

3 years agocore: prevent excessive /proc/self/mountinfo parsing
Michal Sekletár [Thu, 9 Jul 2020 16:16:44 +0000 (18:16 +0200)] 
core: prevent excessive /proc/self/mountinfo parsing

3 years agotest: add ratelimiting test
Michal Sekletár [Mon, 23 Nov 2020 17:04:57 +0000 (18:04 +0100)] 
test: add ratelimiting test

(Taken from Michal's #17274 by Lennart, and slightly adjusted)

3 years agosd-event: add ability to ratelimit event sources
Lennart Poettering [Mon, 23 Nov 2020 17:02:40 +0000 (18:02 +0100)] 
sd-event: add ability to ratelimit event sources

Let's a concept of "rate limiting" to event sources: if specific event
sources fire too often in some time interval temporarily take them
offline, and take them back online once the interval passed.

This is a simple scheme of avoiding starvation of event sources if some
event source fires too often.

This introduces the new conceptual states of "offline" and "online" for
event sources: an event source is "online" only when enabled *and* not
ratelimited, and offline in all other cases. An event source that is
online hence has its fds registered in the epoll, its signals in the
signalfd and so on.

3 years agosd-event: remove earliest_index/latest_index into common part of event source objects
Lennart Poettering [Mon, 23 Nov 2020 16:49:27 +0000 (17:49 +0100)] 
sd-event: remove earliest_index/latest_index into common part of event source objects

So far we used these fields to organize the earliest/latest timer event
priority queue.  In a follow-up commit we want to introduce ratelimiting
to event sources, at which point we want any kind of event source to be
able to trigger time wakeups, and hence they all need to be included in
the earliest/latest prioqs.  Thus, in preparation let's make this
generic.

No change in behaviour, just some shifting around of struct members from
the type-specific to the generic part.

3 years agosd-event: follow coding style with naming return parameter
Lennart Poettering [Mon, 23 Nov 2020 16:47:16 +0000 (17:47 +0100)] 
sd-event: follow coding style with naming return parameter

3 years agosd-event: ref event loop while in sd_event_prepare() ot sd_event_run()
Lennart Poettering [Mon, 23 Nov 2020 14:38:00 +0000 (15:38 +0100)] 
sd-event: ref event loop while in sd_event_prepare() ot sd_event_run()

sd_event_prepare() invokes callbacks that might drop the last user ref
on our event loop. Let's make sure we keep an explicit ref around it, so
that we won't end up with an invalid pointer. Similar in sd_event_run().

Basically, any function that is publically callable that might end up
invoking callbacks should ref the relevant objects to be protected
against callbacks destroying these objects while we still want to access
them. We did this correctly in sd_event_dispatch() and sd_event_loop(),
but these are not the only ones which are callable from the outside.

3 years agosd-event: let's suffix last_run/last_log with "_usec"
Lennart Poettering [Mon, 23 Nov 2020 14:33:50 +0000 (15:33 +0100)] 
sd-event: let's suffix last_run/last_log with "_usec"

Otherwise it's a bit confusing what this is about: two timestamps.

3 years agosd-event: split out code to add/remove timer event sources to earliest/latest prioq
Lennart Poettering [Mon, 23 Nov 2020 14:25:35 +0000 (15:25 +0100)] 
sd-event: split out code to add/remove timer event sources to earliest/latest prioq

Just some refactoring that makes code prettier, and will come handy
later, because we can reuse these functions at more places.

3 years agosd-event: split clock data allocation out of sd_event_add_time()
Lennart Poettering [Mon, 23 Nov 2020 10:40:24 +0000 (11:40 +0100)] 
sd-event: split clock data allocation out of sd_event_add_time()

Just some simple refactoring, that will make things easier for us later.
But it looks better this way even without the later function reuse.

3 years agosd-event: mention that two debug logged events are ignored
Lennart Poettering [Mon, 23 Nov 2020 10:39:40 +0000 (11:39 +0100)] 
sd-event: mention that two debug logged events are ignored

3 years agoupdate TODO 17524/head
Lennart Poettering [Wed, 4 Nov 2020 17:43:12 +0000 (18:43 +0100)] 
update TODO

3 years agoman: drop comment about ECC vs. RSA and Yubikey
Lennart Poettering [Tue, 1 Dec 2020 13:23:38 +0000 (14:23 +0100)] 
man: drop comment about ECC vs. RSA and Yubikey

The comment is pointless, ECC systematically doesn't allow
encryption/decryption directly, only RSA does that. If you want to use
ECC for asymmetric encryption/decryption you have to combine it with key
exchange scheme and symmetric scheme. This all is not a limitation of
the Yubikey, hence don't claim so. It's just how ECC is.

3 years agoman: document how cryptsetup keys may be acquired via AF_UNIX sockets
Lennart Poettering [Wed, 4 Nov 2020 19:20:41 +0000 (20:20 +0100)] 
man: document how cryptsetup keys may be acquired via AF_UNIX sockets

3 years agocryptsetup: modify keyfile search logic to use read_file_full() too
Lennart Poettering [Wed, 4 Nov 2020 17:15:42 +0000 (18:15 +0100)] 
cryptsetup: modify keyfile search logic to use read_file_full() too

Let's move the 3rd way how cryptsetup acquires key files to
read_file_full() too.

Since load_key_file()'s raison d'etre now is just the search path logic,
let's rename the function to find_key_file().

3 years agocryptsetup: port cryptsetup's main key file logic over to read_full_file_full()
Lennart Poettering [Wed, 4 Nov 2020 16:24:53 +0000 (17:24 +0100)] 
cryptsetup: port cryptsetup's main key file logic over to read_full_file_full()

Previously, we'd load the file with libcryptsetup's calls. Let's do that
in our own, so that we can make use of READ_FULL_FILE_CONNECT_SOCKET,
i.e. read in keys via AF_UNIX sockets, so that people can plug key
providers into our logic.

This provides functionality similar to Debian's keyscript= crypttab
option (see → #3007), as it allows key scripts to be run as socket
activated services, that have stdout connected to the activated socket.
In contrast to traditional keyscript= support this logic runs stuff out
of process however, which is beneficial, since it allows sandboxing and
similar.

3 years agocryptsetup: port PKCS#11 code to read key file with read_full_file()
Lennart Poettering [Wed, 4 Nov 2020 16:22:39 +0000 (17:22 +0100)] 
cryptsetup: port PKCS#11 code to read key file with read_full_file()

Now that we can read from offsets/with size, let's port the cryptsetup
PKCS#11 key file logic over to read_full_file_full().

3 years agofileio: teach read_full_file_full() to read from offset/with maximum size
Lennart Poettering [Wed, 4 Nov 2020 19:25:06 +0000 (20:25 +0100)] 
fileio: teach read_full_file_full() to read from offset/with maximum size

3 years agojournal-remote: suffix cmdline option that expects arg with =
Lennart Poettering [Wed, 4 Nov 2020 19:24:57 +0000 (20:24 +0100)] 
journal-remote: suffix cmdline option that expects arg with =

3 years agoman: mention that --key= is about *secret* keys
Lennart Poettering [Wed, 4 Nov 2020 15:23:11 +0000 (16:23 +0100)] 
man: mention that --key= is about *secret* keys

3 years agojournal-remote: use READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE when...
Lennart Poettering [Wed, 4 Nov 2020 15:21:26 +0000 (16:21 +0100)] 
journal-remote: use READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE when reading PEM secret key

It's secret data, hence use the appropriate flags.

3 years agorepart: warn about world writable key files
Lennart Poettering [Wed, 4 Nov 2020 15:19:49 +0000 (16:19 +0100)] 
repart: warn about world writable key files

We have easy support for this, hence use it for privileged key data.

3 years agodissect-image: use simple version of read_full_file() where we can
Lennart Poettering [Wed, 4 Nov 2020 15:17:26 +0000 (16:17 +0100)] 
dissect-image: use simple version of read_full_file() where we can

3 years agojournal-remote: erase secret PEM key from memory after use
Lennart Poettering [Wed, 4 Nov 2020 15:13:09 +0000 (16:13 +0100)] 
journal-remote: erase secret PEM key from memory after use

3 years agomeson: add missing "S" to SYSTEMD_CGROUPS_AGENT_PATH
Zbigniew Jędrzejewski-Szmek [Mon, 30 Nov 2020 10:09:37 +0000 (11:09 +0100)] 
meson: add missing "S" to SYSTEMD_CGROUPS_AGENT_PATH

Other similar variables use the binary name underscorified and upppercased
(with "_BINARY" appended in some cases to avoid ambiguity). Add "S" to follow
the same pattern for systemd-cgroups-agent.

Based on the discussion in #16715.

3 years agoscope: on unified, make sure to unwatch all PIDs once they've been moved to the cgrou...
Franck Bui [Mon, 30 Nov 2020 14:26:15 +0000 (15:26 +0100)] 
scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgroup scope

Commit 428a9f6f1d0396b9eacde2b38d667cbe3f15eb55 freed u->pids which is
problematic since the references to this unit in m->watch_pids were no more
removed when the unit was freed.

This patch makes sure to clean all this refs up before freeing u->pids by
calling unit_unwatch_all_pids().

3 years agosd-event: fix delays assert brain-o (#17790)
Vito Caputo [Tue, 1 Dec 2020 08:26:54 +0000 (00:26 -0800)] 
sd-event: fix delays assert brain-o (#17790)

s/sizeof/ELEMENTSOF/

Bug introduced in 34b87517749caa4142b19eb3c63bdf349fafbc49.

3 years agomkosi: make ubuntu image bootable by default
Pavel Sapezhko [Mon, 9 Nov 2020 19:40:14 +0000 (22:40 +0300)] 
mkosi: make ubuntu image bootable by default

3 years agoman: Speicfy exact return values of sd_bus_message_enter_container
igo95862 [Fri, 27 Nov 2020 13:51:18 +0000 (16:51 +0300)] 
man: Speicfy exact return values of sd_bus_message_enter_container

3 years agopo: add units/systemd-journald.service.in to POTFILES.skip
Piotr Drąg [Sat, 28 Nov 2020 12:43:52 +0000 (13:43 +0100)] 
po: add units/systemd-journald.service.in to POTFILES.skip

3 years agohwdb: add axis range corrections for Lenovo ThinkPad T14 Gen1
Michał Kopeć [Sun, 29 Nov 2020 20:13:07 +0000 (21:13 +0100)] 
hwdb: add axis range corrections for Lenovo ThinkPad T14 Gen1

3 years agonetwork: use IN_SET() macro 17692/head
Yu Watanabe [Mon, 23 Nov 2020 13:34:43 +0000 (22:34 +0900)] 
network: use IN_SET() macro

Follow-up for 1d370b2c182505ff8033fccbebcc56621d305220.

3 years agonetwork: treat IPv4LL is one of dynamic addressing protocol
Yu Watanabe [Mon, 23 Nov 2020 04:42:22 +0000 (13:42 +0900)] 
network: treat IPv4LL is one of dynamic addressing protocol

This makes an IPv4LL address optional when multiple dynamic
addressing protocols are enabled.

3 years agonetwork: simplify the condition about ipv4ll is enabled or not
Yu Watanabe [Mon, 23 Nov 2020 04:44:29 +0000 (13:44 +0900)] 
network: simplify the condition about ipv4ll is enabled or not

3 years agonetwork: shorten link_check_ready() a bit
Yu Watanabe [Mon, 23 Nov 2020 04:55:26 +0000 (13:55 +0900)] 
network: shorten link_check_ready() a bit

3 years agonetwork: stop IPv4LL engine when DHCPv4 address is successfully acquired
Yu Watanabe [Mon, 23 Nov 2020 04:28:47 +0000 (13:28 +0900)] 
network: stop IPv4LL engine when DHCPv4 address is successfully acquired

3 years agonetworkd: start ipv4ll when dhcp has trouble getting a lease
Zbigniew Jędrzejewski-Szmek [Thu, 8 Oct 2020 18:14:51 +0000 (20:14 +0200)] 
networkd: start ipv4ll when dhcp has trouble getting a lease

Fixes #13316.

3 years agosd-dhcp-client: report transient DHCP failure to the caller
Zbigniew Jędrzejewski-Szmek [Thu, 8 Oct 2020 14:51:25 +0000 (16:51 +0200)] 
sd-dhcp-client: report transient DHCP failure to the caller

So far we only reported major state transitions like failure to acquire
the message. Let's report the initial failure after a few timeouts in
a new event type.

The number of timeouts is hardcoded as 3, since Windows seems to be using
that. I don't think we need to make this configurable out of the box. A
reasonable default may be enough.

3 years agonetworkd: merge ll addressing fallback modes into normal "boolean" values
Zbigniew Jędrzejewski-Szmek [Thu, 8 Oct 2020 14:59:26 +0000 (16:59 +0200)] 
networkd: merge ll addressing fallback modes into normal "boolean" values

They are not really boolean, because we have both ipv4 and ipv6, but
for each protocol we have either unset, no, and yes.

From https://github.com/systemd/systemd/issues/13316#issuecomment-582906817:
LinkLocalAddressing must be a boolean option, at least for ipv4:
- LinkLocalAddressing=no => no LL at all.

- LinkLocalAddressing=yes + Static Address => invalid configuration, warn and
  interpret as LinkLocalAddressing=no, no LL at all.

(we check that during parsing and reject)

- LinkLocalAddressing=yes + DHCP => LL process should be subordinated to the
  DHCP one, an LL address must be acquired at start or after a short N
  unsuccessful DHCP attemps, and must not stop DHCP to keeping trying. When a
  DHCP address is acquired, drop the LL address. If the DHCP address is lost,
  re-adquire a new LL address.

(next patch will move in this direction)

- LinkLocalAddressing=fallback has no reason to exist, because LL address must
  always be allocated as a fallback option when using DHCP. Having both DHCP
  and LL address at the same time is an RFC violation, so
  LinkLocalAdressing=yes correctly implemented is already the "fallback"
  behavior. The fallback option must be deprecated and if present in older
  configs must be interpreted as LinkLocalAddressing=yes.

(removed)

- And for IPv6, the LinkLocalAddress option has any sense at all? IPv6-LL
  address aren't required to be always set for every IPv6 enabled interface (in
  this case, coexisting with static or dynamic address if any)? Shouldn't be
  always =yes?

(good question)

This effectively reverts 29e81083bd2fcb2dbf83f67ef358c7d25adf7e9d. There is no
special "fallback" mode now, so the check doesn't make sense anymore.

3 years agosd-dhcp-client: minor simplification
Zbigniew Jędrzejewski-Szmek [Wed, 7 Oct 2020 12:14:09 +0000 (14:14 +0200)] 
sd-dhcp-client: minor simplification

3 years agoman: adjust description of MaxAttempts
Zbigniew Jędrzejewski-Szmek [Wed, 7 Oct 2020 12:13:39 +0000 (14:13 +0200)] 
man: adjust description of MaxAttempts

The code was changed in 715cedfbf03a2eb1d4dca5d1b2b876e52a3b652d to allow more than
six attempts and the old description stopped making sense.