]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agonetwork: fix IPv6PrivacyExtensions=kernel handling 18069/head
Florian Klink [Wed, 23 Dec 2020 11:57:47 +0000 (12:57 +0100)] 
network: fix IPv6PrivacyExtensions=kernel handling

When set to "kernel", systemd is not supposed to touch that sysctl.

5e0534f1c13cd50ec2b143a8b18156cd37e502f7, part of
https://github.com/systemd/systemd/pull/17240 forgot to handle that
case.

Fixes https://github.com/systemd/systemd/issues/18003

4 years agonetwork: fix typo
Florian Klink [Wed, 23 Dec 2020 11:56:45 +0000 (12:56 +0100)] 
network: fix typo

IPv6 privacy extensions are plural, not singular.

4 years agocryptsetup: add support for workqueue options
Jonathan G. Underwood [Tue, 22 Dec 2020 20:04:52 +0000 (20:04 +0000)] 
cryptsetup: add support for workqueue options

This commit adds support for disabling the read and write
workqueues with the new crypttab options no-read-workqueue
and no-write-workqueue. These correspond to the cryptsetup
options --perf-no_read_workqueue and --perf-no_write_workqueue
respectively.

4 years agoman/systemd-nspawn: document hashing machine name for uid base
Dmitry Borodaenko [Wed, 23 Dec 2020 01:54:04 +0000 (17:54 -0800)] 
man/systemd-nspawn: document hashing machine name for uid base

Explicitly document the behavior introduced in #7437: when picking a new
UID shift base with "-U", a hash of the machine name will be tried
before falling back to fully random UID base candidates.

4 years agoudev: Updates for cdrom_id helper
pali [Sun, 20 Dec 2020 02:24:51 +0000 (03:24 +0100)] 
udev: Updates for cdrom_id helper

cdrom_id udev helper does not parse all MMC profiles. Following change
fixes this issue and parse all 34 profiles from all MMC standard versions.
Also it replaces magic constants by macros provided by linux/cdrom.h and
fixes cd_profiles_old_mmc() to issue READ_DISC_INFO command in two steps,
like it is doing kernel and also mkudffs.

4 years agobasic: add make_mount_point_inode helper
Luca Boccassi [Sat, 19 Dec 2020 21:40:47 +0000 (21:40 +0000)] 
basic: add make_mount_point_inode helper

Creates a file or a directory depending on the source path, useful
for creating mount points.

4 years agoudev: fix memleak
Yu Watanabe [Mon, 21 Dec 2020 06:28:19 +0000 (15:28 +0900)] 
udev: fix memleak

Fixes #18039.

4 years agojournal-importer: ignore invalid field at one more place
Yu Watanabe [Mon, 21 Dec 2020 07:33:20 +0000 (16:33 +0900)] 
journal-importer: ignore invalid field at one more place

Fixes oss-fuzz#28817.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28817

4 years agoman/localtime: document default timezone
Luca BRUNO [Mon, 21 Dec 2020 09:55:04 +0000 (09:55 +0000)] 
man/localtime: document default timezone

This explicitly documents the default `UTC` timezone which is used
by systemd and (other softwares) when `/etc/localtime` is not present.

Ref: https://github.com/systemd/systemd/blob/v247/src/basic/time-util.c#L1460-L1469

4 years agoman/systemd.netdev: clarify the wireguard AllowedIPs= setting
Florian Klink [Sun, 20 Dec 2020 17:24:05 +0000 (18:24 +0100)] 
man/systemd.netdev: clarify the wireguard AllowedIPs= setting

`AllowedIPs=` only affects "routing inside the network interface
itself", as in, which wireguard peer packets with a specific destination
address are sent to, and what source addresses are accepted from which
peer.

To cause packets to be sent via wireguard in first place, a route via
that interface needs to be added - either in the `[Routes]` section on
the `.network` matching the wireguard interface, or outside of networkd.

This is a common cause of misunderstanding, because tools like wg-quick
also add routes to the interface. However, those tools are meant as a
"extremely simple script for easily bringing up a WireGuard interface,
suitable for a few common use cases (from their manpage).

Networkd also should support other usecases - like setting AllowedIPs to
0.0.0.0/0 and ::/0 and having a dynamic routing protocol setting more
specific routes (or the user manually setting them).

Reported-In: https://github.com/systemd/systemd/issues/14176

4 years agoMerge pull request #18040 from mrc0mmand/cryptenroll-unused-variable
Yu Watanabe [Mon, 21 Dec 2020 00:21:22 +0000 (09:21 +0900)] 
Merge pull request #18040 from mrc0mmand/cryptenroll-unused-variable

cryptenroll: drop an unused variable

4 years agogithub: add the missing tpm2 optional dependency 18040/head
Frantisek Sumsal [Sun, 20 Dec 2020 21:27:36 +0000 (22:27 +0100)] 
github: add the missing tpm2 optional dependency

4 years agotravis: add missing optional build dependencies
Frantisek Sumsal [Sun, 20 Dec 2020 21:21:35 +0000 (22:21 +0100)] 
travis: add missing optional build dependencies

4 years agocryptenroll: drop an unused variable
Frantisek Sumsal [Sun, 20 Dec 2020 21:15:52 +0000 (22:15 +0100)] 
cryptenroll: drop an unused variable

Fixes following warning/error w/ clang:
../src/cryptenroll/cryptenroll-tpm2.c:64:64: error: unused variable 'a' [-Werror,-Wunused-variable]
        _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *a = NULL;
                                                               ^
1 error generated.

4 years agoMerge pull request #18029 from bluca/minor_fixes
Yu Watanabe [Sun, 20 Dec 2020 01:01:59 +0000 (10:01 +0900)] 
Merge pull request #18029 from bluca/minor_fixes

Minor test script runner and labeller bot fixes

4 years agomkosi: Add basic editors to final images
Daan De Meyer [Sat, 19 Dec 2020 18:47:50 +0000 (19:47 +0100)] 
mkosi: Add basic editors to final images

It's often useful to have an editor available to edit some random
config file in the final image. Let's install some basic editors
that don't take up too much space.

4 years agoAdd more matching rules to GA labeler bot for subcomponents 18029/head
Luca Boccassi [Sat, 19 Dec 2020 18:43:59 +0000 (18:43 +0000)] 
Add more matching rules to GA labeler bot for subcomponents

4 years agoFalse positives in GA labeler bot
Luca Boccassi [Sat, 19 Dec 2020 18:43:27 +0000 (18:43 +0000)] 
False positives in GA labeler bot

Don't automatically match on man/* and **/meson.build, since we change those
files as part of larger changes that we usually don't mark that way

4 years agotest: fix regex in run-integration-tests.sh
Luca Boccassi [Sat, 19 Dec 2020 18:42:20 +0000 (18:42 +0000)] 
test: fix regex in run-integration-tests.sh

The regex results in calls of "make setup run -again" which is broken

4 years agotest: use deny-list in run-integration-tests.sh
Luca Boccassi [Sat, 19 Dec 2020 18:41:03 +0000 (18:41 +0000)] 
test: use deny-list in run-integration-tests.sh

The old env var doesn't seem to be used anywhere, and the script
currently doesn't work, so it seems safe to change immediately

4 years agomkosi: Use --only-changed meson option when installing
Daan De Meyer [Sat, 19 Dec 2020 14:25:41 +0000 (15:25 +0100)] 
mkosi: Use --only-changed meson option when installing

Recently, mkosi gained support for specifying an --install-directory
option to save the contents of the install directory between bulids.
By enabling the --only-changed meson install option, meson won't
overwrite the contents of files that haven't changed since the last
build when using --install-directory.

4 years agoman: Advertise systemd-time-wait-sync.service more (#17729)
Alexander Batischev [Sat, 19 Dec 2020 11:17:49 +0000 (14:17 +0300)] 
man: Advertise systemd-time-wait-sync.service more (#17729)

* man: Advertise systemd-time-wait-sync.service more

The description of time-sync.target says that NTP services *should* pull
that target, but doesn't mention that e.g. systemd-timesyncd.service
doesn't actually do that. As a result, time-sync.target is reached way
earlier than people expect; see #5097, #8861, #11008.

systemd provides systemd-time-wait-sync.service to ameliorate this
problem, but doesn't feature it prominently in relevant manpages. In
fact, it's only mentioned in passing in systemd-timesyncd.service(8). As
a result, I ended up re-implementing that service, and I'm not the first
one: https://github.com/NixOS/nixpkgs/pull/51338

This patch adds a mention right in the description of time-sync.target,
which will hopefully raise awareness of this helper service.

4 years agotmpfiles: fix typo
Yu Watanabe [Fri, 18 Dec 2020 14:15:36 +0000 (23:15 +0900)] 
tmpfiles: fix typo

Follow-up for 94566540e3863032df3a8a89f948b94d764ca2b4.

4 years agoMerge pull request #18019 from yuwata/hostname-drop-libudev
Yu Watanabe [Fri, 18 Dec 2020 15:57:36 +0000 (00:57 +0900)] 
Merge pull request #18019 from yuwata/hostname-drop-libudev

hostname: fix build failure

4 years agoman: update org.freedesktop.hostname1.xml 18019/head
Yu Watanabe [Fri, 18 Dec 2020 14:25:43 +0000 (23:25 +0900)] 
man: update org.freedesktop.hostname1.xml

4 years agomemory-id: fix never hit condition
Yu Watanabe [Fri, 18 Dec 2020 09:47:44 +0000 (18:47 +0900)] 
memory-id: fix never hit condition

As sizeof(int64_t) is always 8.

4 years agohostname: fix build failure
Yu Watanabe [Fri, 18 Dec 2020 14:08:41 +0000 (23:08 +0900)] 
hostname: fix build failure

Follow-up for b9d8069832425b34211a6812e06537e0c50d46b6.

libudev.h was dropped from most of our binaries.

4 years agoMerge pull request #15531 from felipeborges/add-device-model-field-to-hostnamed
Lennart Poettering [Fri, 18 Dec 2020 13:26:32 +0000 (14:26 +0100)] 
Merge pull request #15531 from felipeborges/add-device-model-field-to-hostnamed

hostnamed: Add "Model" field

4 years agonetworkd: add RouteDenyList
Devon Pringle [Mon, 14 Dec 2020 06:23:17 +0000 (16:23 +1000)] 
networkd: add RouteDenyList

Allow configuration for IPv6 discovered routes to be ignored instead of
adding them as a route. This can be used to block unwanted routes, for
example, you may wish to not receive some set of routes on an interface
if they are causing issues.

4 years agoMerge pull request #18015 from keszybz/dmi-test-mesonification2
Yu Watanabe [Fri, 18 Dec 2020 12:44:00 +0000 (21:44 +0900)] 
Merge pull request #18015 from keszybz/dmi-test-mesonification2

Dmi test mesonification2

4 years agoMerge pull request #18011 from yuwata/trivial-fixes
Yu Watanabe [Fri, 18 Dec 2020 11:12:02 +0000 (20:12 +0900)] 
Merge pull request #18011 from yuwata/trivial-fixes

Trivial fixes for recently merged PRs

4 years agoMerge pull request #17693 from yuwata/tmpfiles-compress-nocow-on-btrfs
Yu Watanabe [Fri, 18 Dec 2020 07:52:29 +0000 (16:52 +0900)] 
Merge pull request #17693 from yuwata/tmpfiles-compress-nocow-on-btrfs

tmpfiles: try to set file attributes one by one

4 years agoMerge pull request #18009 from poettering/time-set-sync-target
Yu Watanabe [Fri, 18 Dec 2020 07:02:56 +0000 (16:02 +0900)] 
Merge pull request #18009 from poettering/time-set-sync-target

tweaks for time-sync.target and time-set.target

4 years agonetlink: fix size of fib rule messages 18011/head
Yu Watanabe [Fri, 18 Dec 2020 04:26:44 +0000 (13:26 +0900)] 
netlink: fix size of fib rule messages

4 years agomeson: sort files
Yu Watanabe [Fri, 18 Dec 2020 04:24:30 +0000 (13:24 +0900)] 
meson: sort files

4 years agonspawn: sort headers
Yu Watanabe [Fri, 18 Dec 2020 04:21:07 +0000 (13:21 +0900)] 
nspawn: sort headers

4 years agonetlink: fix indentation
Yu Watanabe [Fri, 18 Dec 2020 04:18:37 +0000 (13:18 +0900)] 
netlink: fix indentation

4 years agonetlink: drop unnecessary error handling
Yu Watanabe [Fri, 18 Dec 2020 04:17:49 +0000 (13:17 +0900)] 
netlink: drop unnecessary error handling

4 years agonetlink: use whitespace instead of tab
Yu Watanabe [Fri, 18 Dec 2020 04:14:08 +0000 (13:14 +0900)] 
netlink: use whitespace instead of tab

4 years agosd-netlink: add several assertions
Yu Watanabe [Fri, 18 Dec 2020 04:12:09 +0000 (13:12 +0900)] 
sd-netlink: add several assertions

4 years agosd-netlink: replace *messages[] -> **messages
Yu Watanabe [Fri, 18 Dec 2020 04:11:06 +0000 (13:11 +0900)] 
sd-netlink: replace *messages[] -> **messages

4 years agomeson: add missing headers
Yu Watanabe [Fri, 18 Dec 2020 04:05:19 +0000 (13:05 +0900)] 
meson: add missing headers

4 years agonetwork: move variable declaration
Yu Watanabe [Fri, 18 Dec 2020 04:00:57 +0000 (13:00 +0900)] 
network: move variable declaration

4 years agotree-wide: fix typo
Yu Watanabe [Fri, 18 Dec 2020 03:59:29 +0000 (12:59 +0900)] 
tree-wide: fix typo

4 years agotmpfiles: try to set file attributes one by one 17693/head
Yu Watanabe [Mon, 23 Nov 2020 06:49:51 +0000 (15:49 +0900)] 
tmpfiles: try to set file attributes one by one

Closes #17690.

4 years agochattr-util: introduce fallback mode to set file attributes one by one
Yu Watanabe [Fri, 27 Nov 2020 03:47:05 +0000 (12:47 +0900)] 
chattr-util: introduce fallback mode to set file attributes one by one

4 years agonetwork: Allow to configure unreachable/blackhole RoutingPolicyRule (#17984)
Susant Sahani [Fri, 18 Dec 2020 03:21:15 +0000 (08:51 +0530)] 
network: Allow to configure unreachable/blackhole RoutingPolicyRule (#17984)

4 years agoMerge pull request #17741 from poettering/cryptsetup-fido2
Lennart Poettering [Thu, 17 Dec 2020 21:37:22 +0000 (22:37 +0100)] 
Merge pull request #17741 from poettering/cryptsetup-fido2

cryptsetup: add support for unlocking cryptsetup volumes via FIDO2 + TPM2 + add systemd-cryptenroll tool + more

4 years agoman: document that .timer units now have After= on both time-set.target + time-sync... 18009/head
Lennart Poettering [Thu, 17 Dec 2020 19:26:24 +0000 (20:26 +0100)] 
man: document that .timer units now have After= on both time-set.target + time-sync.target

4 years agocore: order timer units after both time-sync.target and time-set.target
Lennart Poettering [Thu, 17 Dec 2020 19:21:46 +0000 (20:21 +0100)] 
core: order timer units after both time-sync.target and time-set.target

If users do not enable a service like systemd-time-wait-sync.target
(because they don't want to delay boot for external events, such as an
NTP sync), then timers should still take the the weaker time-set.target
feature into account, so that the clock is at least monotonic.

Hence, order timer units after both of the targets: time-sync.target
*and* time-set.target. That way, the right thing will happen regardless
if people have no NTP server (and thus also no
systemd-time-wait-sync.service or equivalent) or, only have an NTP
server (and no systemd-time-wait-sync.service), or have both.

Ordering after time-set.target is basically "free". The logic it is
backed by should be instant, without communication with the outside
going on. It's useful still so that time servers that implement the
timestamp from /var/ logic can run in later boot.

4 years agounits: don't pull in time-sync.target from systemd-timesyncd.service
Lennart Poettering [Thu, 17 Dec 2020 19:19:44 +0000 (20:19 +0100)] 
units: don't pull in time-sync.target from systemd-timesyncd.service

systemd-timesyncd.service only applies the much weaker monotonic clock
from file logic, i.e should pull in and order itself before
time-set.target. The strong time-sync.target unit is pulled in by
systemd-time-wait-sync.service.

4 years agoupdate TODO 17741/head
Lennart Poettering [Thu, 26 Nov 2020 13:42:23 +0000 (14:42 +0100)] 
update TODO

4 years agomkosi: add TPM2 packages to debian/ubuntu/fedora mkosi files
Lennart Poettering [Thu, 17 Dec 2020 13:16:15 +0000 (14:16 +0100)] 
mkosi: add TPM2 packages to debian/ubuntu/fedora mkosi files

As suggested: https://github.com/systemd/systemd/pull/17741#issuecomment-743479834

4 years agoman: document new features
Lennart Poettering [Mon, 7 Dec 2020 16:18:52 +0000 (17:18 +0100)] 
man: document new features

4 years agofido2: when listing fido2/hmac-secret devices, actually validate feature set
Lennart Poettering [Thu, 17 Dec 2020 12:55:50 +0000 (13:55 +0100)] 
fido2: when listing fido2/hmac-secret devices, actually validate feature set

4 years agotest: add tpm2 and fido2 libs to dlopen test
Lennart Poettering [Wed, 9 Dec 2020 20:13:58 +0000 (21:13 +0100)] 
test: add tpm2 and fido2 libs to dlopen test

4 years agorepart: optionally lock encrypted partitions to TPM2
Lennart Poettering [Tue, 8 Dec 2020 14:12:29 +0000 (15:12 +0100)] 
repart: optionally lock encrypted partitions to TPM2

This useful for bootstrapping encrypted systems: on first boot let's
create a /var/ partition that is locked to the local TPM2.

4 years agostring-table: add private version of lookup macro with boolean fallback
Lennart Poettering [Tue, 8 Dec 2020 13:39:49 +0000 (14:39 +0100)] 
string-table: add private version of lookup macro with boolean fallback

4 years agocryptsetup: add support for TPM2 unlocking of volumes
Lennart Poettering [Fri, 4 Dec 2020 16:26:37 +0000 (17:26 +0100)] 
cryptsetup: add support for TPM2 unlocking of volumes

4 years agocryptenroll: support listing and wiping tokens
Lennart Poettering [Sat, 28 Nov 2020 21:59:21 +0000 (22:59 +0100)] 
cryptenroll: support listing and wiping tokens

4 years agocryptenroll: add support for TPM2 enrolling
Lennart Poettering [Sat, 28 Nov 2020 14:27:34 +0000 (15:27 +0100)] 
cryptenroll: add support for TPM2 enrolling

4 years agojson: add APIs for quickly inserting hex blobs into as JSON strings
Lennart Poettering [Tue, 1 Dec 2020 12:45:32 +0000 (13:45 +0100)] 
json: add APIs for quickly inserting hex blobs into as JSON strings

This is similar to the base64 support, but fixed-size hash values are
typically preferably presented as series of hex values, hence store them
here like that too.

4 years agosort-util: make cmp_int() generic, so that we can reuse it elsewhere
Lennart Poettering [Mon, 30 Nov 2020 15:23:15 +0000 (16:23 +0100)] 
sort-util: make cmp_int() generic, so that we can reuse it elsewhere

4 years agocryptenroll: add new "systemd-cryptenroll" tool for enrolling FIDO2+PKCS#11 security...
Lennart Poettering [Tue, 24 Nov 2020 12:41:47 +0000 (13:41 +0100)] 
cryptenroll: add new "systemd-cryptenroll" tool for enrolling FIDO2+PKCS#11 security tokens

4 years agocryptsetup: add fido2 support
Lennart Poettering [Thu, 26 Nov 2020 11:46:10 +0000 (12:46 +0100)] 
cryptsetup: add fido2 support

4 years agofido2: don't use up/uv/rk when device doesn't support it
Lennart Poettering [Fri, 4 Dec 2020 09:19:47 +0000 (10:19 +0100)] 
fido2: don't use up/uv/rk when device doesn't support it

Apparently devices are supposed to generate failures if we try to turn
off features they don't have. Thus don't.

Prompted-by: https://github.com/systemd/systemd/issues/17784#issuecomment-737730395
4 years agohomed: split out HMAC-HASH fido2 decode code into src/shared/
Lennart Poettering [Thu, 26 Nov 2020 12:30:24 +0000 (13:30 +0100)] 
homed: split out HMAC-HASH fido2 decode code into src/shared/

That way we can use it later on in systemd-cryptsetup to unlock devices
with FIDO2 tokens.

4 years agohomed: move fido2 setup code to src/shared/
Lennart Poettering [Wed, 25 Nov 2020 15:34:54 +0000 (16:34 +0100)] 
homed: move fido2 setup code to src/shared/

That way we can reuse it from systemd-cryptenroll

4 years agohomed: move fido2 device enumeration logic to shared code
Lennart Poettering [Wed, 25 Nov 2020 14:15:25 +0000 (15:15 +0100)] 
homed: move fido2 device enumeration logic to shared code

4 years agohomed: turn libfido2 into a dlopen() type dependency
Lennart Poettering [Wed, 25 Nov 2020 14:07:06 +0000 (15:07 +0100)] 
homed: turn libfido2 into a dlopen() type dependency

4 years agocryptsetup: split up attach_luks_or_plain_or_bitlk() into smaller functions
Lennart Poettering [Thu, 26 Nov 2020 12:29:56 +0000 (13:29 +0100)] 
cryptsetup: split up attach_luks_or_plain_or_bitlk() into smaller functions

Just some refactoring.

4 years agocryptsetup: read PKCS#11 key and token info from LUKS2 metadata
Lennart Poettering [Wed, 25 Nov 2020 10:10:29 +0000 (11:10 +0100)] 
cryptsetup: read PKCS#11 key and token info from LUKS2 metadata

Optionally, embedd PKCS#11 token URI and encrypted key in LUKS2 JSON
metadata header. That way it becomes very easy to unlock properly set up
PKCS#11-enabled LUKS2 volumes, a simple /etc/crypttab line like the
following suffices:

    mytest /dev/disk/by-partuuid/41c1df55-e628-4dbb-8492-bc69d81e172e - pkcs11-uri=auto

Such a line declares that unlocking via PKCS#11 shall be attempted, and
the token URI and the encrypted key shall be read from the LUKS2 header.
An external key file for the encrypted PKCS#11 key is hence no longer
necessary, nor is specifying the precise URI to use.

4 years agocryptsetup: be more careful with erasing key material from memory
Lennart Poettering [Wed, 25 Nov 2020 10:58:55 +0000 (11:58 +0100)] 
cryptsetup: be more careful with erasing key material from memory

4 years agocryptsetup: split code that allocates udev security device monitor into its own function
Lennart Poettering [Wed, 25 Nov 2020 10:51:39 +0000 (11:51 +0100)] 
cryptsetup: split code that allocates udev security device monitor into its own function

4 years agocryptsetup-util: add helper for setting minimal PBKDF
Lennart Poettering [Tue, 8 Dec 2020 13:46:31 +0000 (14:46 +0100)] 
cryptsetup-util: add helper for setting minimal PBKDF

4 years agocryptsetup-util: add helper call for extracting/parsing token JSON
Lennart Poettering [Tue, 8 Dec 2020 12:18:28 +0000 (13:18 +0100)] 
cryptsetup-util: add helper call for extracting/parsing token JSON

4 years agohomed: move code to list and resolve "auto" pkcs#11 URL into common code
Lennart Poettering [Wed, 25 Nov 2020 09:28:11 +0000 (10:28 +0100)] 
homed: move code to list and resolve "auto" pkcs#11 URL into common code

That way we can reuse it from systemd-cryptenroll.

4 years agohomed: split out code that determines suitable LUKS passphrase size from RSA key
Lennart Poettering [Tue, 24 Nov 2020 14:29:03 +0000 (15:29 +0100)] 
homed: split out code that determines suitable LUKS passphrase size from RSA key

We can use this in cryptenroll later on, hence let's make this generic.

4 years agohomed: move pkcs11 LUKS glue into shared code
Lennart Poettering [Tue, 24 Nov 2020 14:08:20 +0000 (15:08 +0100)] 
homed: move pkcs11 LUKS glue into shared code

That way we can lter reuse it from cryptsetup/cryptenroll too.

4 years agohomed: move helper calls for RSA encryption to shared code
Lennart Poettering [Tue, 24 Nov 2020 14:07:53 +0000 (15:07 +0100)] 
homed: move helper calls for RSA encryption to shared code

4 years agohomed: move homectl's recovery key generation/modhex code to src/shared/
Lennart Poettering [Tue, 24 Nov 2020 12:55:02 +0000 (13:55 +0100)] 
homed: move homectl's recovery key generation/modhex code to src/shared/

This allows us to later reuse the code to generate recovery keys for
traditional LUKS volumes, too and share the code.

4 years agotest: fix fd_is_mount_point() check
Lennart Poettering [Thu, 17 Dec 2020 15:19:09 +0000 (16:19 +0100)] 
test: fix fd_is_mount_point() check

So the currentl and only fd_is_mount_point() check is actually entirely
bogus: it passes "/" as filename argument, but that's not actually a
a valid filename, but an absolute path.

fd_is_mount_point() is written in a way tha the fd refers to a directory
and the specified path is a file directly below it that shall be
checked. The test call actually violated that rule, but still expected
success.

Let's fix this, and check for this explicitly, and refuse it.

Let's extend the test and move it to test-mountpoint-util.c where the
rest of the tests for related calls are placed.

Replaces: #18004
Fixes: #17950
4 years agotree-wide: suggest meson command lines instead of ninja ones
Lennart Poettering [Fri, 11 Dec 2020 10:33:39 +0000 (11:33 +0100)] 
tree-wide: suggest meson command lines instead of ninja ones

This only changes documentation. In various places we call "ninja"
directly. I figured it would be safer to leave those in place for now,
given the meson replacement commands lines appears to be supported in
newer meson versions only.

4 years agotest: add one more dmidecode dump 18015/head
Zbigniew Jędrzejewski-Szmek [Thu, 17 Dec 2020 07:54:50 +0000 (08:54 +0100)] 
test: add one more dmidecode dump

4 years agomeson: make each dmidecode a separate test
Zbigniew Jędrzejewski-Szmek [Wed, 16 Dec 2020 11:21:43 +0000 (12:21 +0100)] 
meson: make each dmidecode a separate test

This allows them to be executed in parallel and also gives us
better reporting.

The dump files are renamed to avoid repeating "dmidecode-dump", since that
string is already present in the subdirectory name.

4 years agoMerge pull request #18001 from systemd/wip/hadess/unsupported-dmi
Zbigniew Jędrzejewski-Szmek [Thu, 17 Dec 2020 08:16:33 +0000 (09:16 +0100)] 
Merge pull request #18001 from systemd/wip/hadess/unsupported-dmi

meson: Disable dmi_memory_id on arches without DMI

4 years agoterminal-util: use 256 color mode for PID 1 output, too
Lennart Poettering [Wed, 16 Dec 2020 18:55:32 +0000 (19:55 +0100)] 
terminal-util: use 256 color mode for PID 1 output, too

Follow-up for: #17702

Alsoe, see earlier review comment: https://github.com/systemd/systemd/pull/17702#pullrequestreview-552329600

4 years agoMerge pull request #17998 from mrc0mmand/qemu-drop-trailing-whitespace
Frantisek Sumsal [Wed, 16 Dec 2020 22:48:17 +0000 (23:48 +0100)] 
Merge pull request #17998 from mrc0mmand/qemu-drop-trailing-whitespace

test: drop the trailing whitespace from the QEMU version check

4 years agoMerge pull request #17702 from rnhmjoj/master
Lennart Poettering [Wed, 16 Dec 2020 18:26:40 +0000 (19:26 +0100)] 
Merge pull request #17702 from rnhmjoj/master

Extend $SYSTEMD_COLORS to switch colors mode

4 years agomeson: Disable dmi_memory_id on arches without DMI 18001/head
Bastien Nocera [Wed, 16 Dec 2020 17:50:38 +0000 (18:50 +0100)] 
meson: Disable dmi_memory_id on arches without DMI

4 years agoMerge pull request #17026 from fw-strlen/nft_16
Lennart Poettering [Wed, 16 Dec 2020 18:18:22 +0000 (19:18 +0100)] 
Merge pull request #17026 from fw-strlen/nft_16

add networkd/nspawn nftables backend

4 years agomeson: Split off udev helper programs array
Bastien Nocera [Wed, 16 Dec 2020 17:43:26 +0000 (18:43 +0100)] 
meson: Split off udev helper programs array

4 years agoudev: Extract RAM properties from DMI information
Bastien Nocera [Wed, 2 Dec 2020 11:40:42 +0000 (12:40 +0100)] 
udev: Extract RAM properties from DMI information

Add memory_id program to set properties about the physical memory
devices in the system. This is useful on machines with removable memory
modules to show how the machine can be upgraded, and on all devices to
detect the actual RAM size, without relying on the OS accessible amount.

Closes: #16651
4 years agotree-wide: fix typo
Yu Watanabe [Wed, 16 Dec 2020 17:16:16 +0000 (02:16 +0900)] 
tree-wide: fix typo

4 years agotest-login: skip consistency checks when logind is not active
Zbigniew Jędrzejewski-Szmek [Wed, 16 Dec 2020 14:56:44 +0000 (15:56 +0100)] 
test-login: skip consistency checks when logind is not active

There are two ways in swich sd_login_* functions acquire data:
some are derived from the cgroup path, but others use the data serialized
by logind.

When the tests are executed under Fedora's mock, without systemd-spawn
but instead in a traditional chroot, test-login gets confused:
the "outside" cgroup path is visible, so sd_pid_get_unit() and
sd_pid_get_session() work, but sd_session_is_active() and other functions
that need logind data fail.

Such a buildroot setup is fairly bad, but it can be encountered in the wild, so
let's just skip the tests in that case.

/* Information printed is from the live system */
sd_pid_get_unit(0, …) → "session-237.scope"
sd_pid_get_user_unit(0, …) → "n/a"
sd_pid_get_slice(0, …) → "user-1000.slice"
sd_pid_get_session(0, …) → "237"
sd_pid_get_owner_uid(0, …) → 1000
sd_pid_get_cgroup(0, …) → "/user.slice/user-1000.slice/session-237.scope"
sd_uid_get_display(1000, …) → "(null)"
sd_uid_get_sessions(1000, …) → [0] ""
sd_uid_get_seats(1000, …) → [0] ""
Assertion 'r >= 0' failed at src/libsystemd/sd-login/test-login.c:104, function test_login(). Aborting.

4 years agonetworkd: handle ignoring ll gateway being link ll
Devon Pringle [Mon, 14 Dec 2020 04:22:18 +0000 (14:22 +1000)] 
networkd: handle ignoring ll gateway being link ll

In the event where network discovery gets a route with the gateway being
the interfaces local link address, networkd will fail the interface.

systemd-networkd[44319]: br_lan: Configuring route: dst: fdcd:41a4:5559:ec03::/64, src: n/a, gw: fe80::e4da:7eff:fe77:5c5e, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
systemd-networkd[44319]: br_lan: Could not set NDisc route or address: Gateway can not be a local address. Invalid argument
systemd-networkd[44319]: br_lan: Failed
systemd-networkd[44319]: br_lan: State changed: configuring -> failed

This patch, instead of allowing the interface to fail, will instead log
the event and skip setting the route.

4 years agoMerge pull request #17799 from yuwata/oss-fuzz-25353
Zbigniew Jędrzejewski-Szmek [Wed, 16 Dec 2020 16:52:35 +0000 (17:52 +0100)] 
Merge pull request #17799 from yuwata/oss-fuzz-25353

logs-show: skip non-utf8 name entries

4 years agoTranslated using Weblate (Swedish)
Luna Jernberg [Wed, 16 Dec 2020 12:36:01 +0000 (13:36 +0100)] 
Translated using Weblate (Swedish)

Currently translated at 67.3% (126 of 187 strings)

Co-authored-by: Luna Jernberg <bittin@reimu.nl>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/sv/
Translation: systemd/master

4 years agotree-wide: fix typo
Yu Watanabe [Wed, 16 Dec 2020 15:53:01 +0000 (00:53 +0900)] 
tree-wide: fix typo

4 years agoMerge pull request #17859 from keszybz/hostnamed-export-hostname-origin-and-simplify...
Yu Watanabe [Wed, 16 Dec 2020 15:55:49 +0000 (00:55 +0900)] 
Merge pull request #17859 from keszybz/hostnamed-export-hostname-origin-and-simplify-logic

Export hostname origin and simplify logic in hostamed