1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-14 23:24:38 +03:00

57102 Commits

Author SHA1 Message Date
Lennart Poettering
0a5c6a57c6 uid-range: add some overflow checks 2022-04-01 11:20:12 +02:00
Lennart Poettering
5674aa7a2c uid-range: add new uid_range_load_userns() for loading /proc/self/uid_map 2022-04-01 11:20:12 +02:00
Lennart Poettering
2e37ebdae9 test: port test-uid-range to tests.h 2022-04-01 11:20:12 +02:00
Lennart Poettering
09bbaa419b uid-range: use size_t for array size 2022-04-01 11:20:12 +02:00
Lennart Poettering
5b89bff55f update TODO 2022-04-01 11:03:59 +02:00
Lennart Poettering
45bff9b4e2 systemctl: show tainted state 2022-03-31 22:11:32 +01:00
Lennart Poettering
40efaaed42 pid1: check for kernels older than baseline
Let's make this detectable explicitly.
2022-03-31 22:11:20 +01:00
Luca Boccassi
58270534bf
Merge pull request #22923 from poettering/userns-check-refactor
virt: minor running_in_userns() modernizations
2022-03-31 22:11:03 +01:00
Lennart Poettering
d6d450074f
Merge pull request #22919 from poettering/cryptsetup-tweaks
various minor tweaks to cryptsetup/veritysetup/integritysetup
2022-03-31 16:50:37 +02:00
Lennart Poettering
16fa47463c virt: use read_virtual_file() for reading /proc/self/setgroups 2022-03-31 16:34:41 +02:00
Lennart Poettering
b2a331f2e0 virt: simplify userns_has_mapping() by using fscanf() instead of scanf()
And while we are at it, also fix propagation of an uninitialized errno
error.
2022-03-31 16:34:41 +02:00
Antonio Alvarez Feijoo
49be03838d cryptsetup: fall back to traditional unlocking if any TPM2 operation fails
If any TPM2 operation fails, the boot process should continue and
prompt for a text password (if configured to do so).

Fixes #22870
2022-03-31 14:58:21 +01:00
Lennart Poettering
9e83d3e45f update TODO 2022-03-31 14:39:55 +02:00
Martin Liska
0bd292567a Support -D_FORTIFY_SOURCE=3 by using __builtin_dynamic_object_size.
As explained in the issue, -D_FORTIFY_SOURCE=3 requires usage
of __builtin_dynamic_object_size in MALLOC_SIZEOF_SAFE macro.

Fixes: #22801
2022-03-31 21:13:34 +09:00
Franck Bui
f887eab1da meson: build kernel-install man page when necessary 2022-03-31 21:12:05 +09:00
Sebastian Pucilowski
f81ac115dc Fix "link-local" language inconsistencies
"Link-local" and "link local" are used throughout man pages and program
output, with the former used far more than the latter. This commit makes
it consistent throughout the project.
2022-03-31 12:08:29 +02:00
Lennart Poettering
e2bc5194af integritysetup: also validate volume name
Exactly like for veritysetup/cryptsetup
2022-03-31 11:44:46 +02:00
Lennart Poettering
752d859442 integritysetup: also port to mangle_none()
Let's make the tool work more like veritysetup/cryptsetup in this regard
too.
2022-03-31 11:44:46 +02:00
Lennart Poettering
2b4b030044 integritysetup: log when attempted to detach already detached volume
To make the tool behave more like cryptsetup/veritysetup
2022-03-31 11:44:46 +02:00
Lennart Poettering
042fcbbf7e integritysetup: rename action → verb, to match other code 2022-03-31 11:44:46 +02:00
Lennart Poettering
542bb9be7c tree-wide: unify some code that looks for --help in the command line 2022-03-31 11:44:46 +02:00
Lennart Poettering
9959d78280 veritysetup: do some superficial checking on volume name
cryptsetup does this too, so let's better be safe here, too.
2022-03-31 11:44:46 +02:00
Lennart Poettering
bb3ff7a996 veritysetup: mangle option strings like in cryptsetup 2022-03-31 11:44:46 +02:00
Lennart Poettering
49a4a81dd7 veritysetup: give command line parameters proper names
Accessing the various arguments always through argv[] is nasty, since
it's not obvious what we are talking about here. Let's give things nice
names.

We did the same in cryptsetup a while back.
2022-03-31 11:24:10 +02:00
Lennart Poettering
2e4aae981e cryptsetup: adjust some log levels
Let's upgrade log levels of some noteworthy messages from LOG_DEBUG to
LOG_NOTICE. These messages contain information that previous log
messages in the error path didn't say, namely that we'll now fall back
to traditional unlocking.

Note that this leaves similar log messages for cases where
TPM2/PKCS#11/FIDO2 support is disabled at build at LOG_DEBUG, since in
that case nothing really failed, we just systematically can't do
TPM2/PKCS#11/FIDO2 and hence it is pointless and not actionable for
users to do anything about it...
2022-03-31 11:24:07 +02:00
Lennart Poettering
2fabbad898 cryptsetup: add helper for mangling "none" option strings
let's unify some code here, and let's do so in cryptsetup-util.h so that
we can later reuse this in integritysetup/veritysetup
2022-03-31 11:24:01 +02:00
Lennart Poettering
dcbc38c916 cryptsetup: rename functions that try to do FIDO2/TPM2/PKCS#11 via cryptsetup plugins to say so
The are so many different flavours of functions that attach volumes,
hence say explicitly that these are about libcryptsetup plugins, and
nothing else.

Just some renaming, no code changes beyond that.
2022-03-31 11:23:16 +02:00
Yu Watanabe
b2e7ded16b
Merge pull request #22899 from yuwata/network-ignore-carrier-loss
network: automatically determine timeout of waiting for carrier regain
2022-03-31 11:40:30 +09:00
Yu Watanabe
da94a69b8d network: shorten code a bit
Currently, there exist only two MTU sources, static and DHCPv4, and they
are exclusive. Hence, it is not necessary to check the existence of the
MTU option in the acquired DHCP lease. Let's unconditionally reset the
MTU. Note that, if the current and original MTU are equivalent, then
link_request_to_set_mtu() handles that gracefully.
2022-03-31 09:29:42 +09:00
Yu Watanabe
b732606950 network: automatically determine timeout of waiting for carrier regain
The commit 6706ce2fd2a13df0ae5e469b72d688eaf643dac4 made
IgnoreCarrierLoss= setting also take timespan, to make users handle
issues like #18738 or #20887. But still users needed to explicitly set
a timespan.

This makes networkd automatically determine the timeout when the
situations #18738 or #19832 is detected. Unfortunately, still users have
issue #20887 need to specify a value.

Closes #19832.
2022-03-31 09:29:42 +09:00
Yu Watanabe
a14b9ca2c3
Merge pull request #22913 from yuwata/sd-device-cleanups
sd-device,udev: several cleanups
2022-03-31 09:24:38 +09:00
Zbigniew Jędrzejewski-Szmek
2fe8749de7 veritysetup: fix parsing of root-hash-signature= option
The function was named confusingly and we managed to confused ourselves. The
parameter was assigned incorrectly and then reassigned correctly in the caller.
Let's simplify the whole thing by just saving the optarg param.

I considered moving the unhexmemming and/or reading of the file to the parse
function, but decided against it. I think it's nicer to parse all options
before opening external files.
2022-03-30 23:32:11 +01:00
Yu Watanabe
03a24ce76b udev: rename functions to emphasize whole disk is locked 2022-03-31 07:25:24 +09:00
Yu Watanabe
20ba5a3fe7 udev: ignore one more error in device_get_block_device() 2022-03-31 07:25:24 +09:00
Yu Watanabe
df88f02bb1 sd-device: do not ignore critical errors in device_new_from_child() 2022-03-31 07:25:24 +09:00
Yu Watanabe
07c90f02d2 sd-device: use path_extract_directory() at one more place 2022-03-31 07:25:24 +09:00
Yu Watanabe
becbcca5b8 sd-device: try to get DISKSEQ from uevent file
Otherwise, if the sd-device object is created from e.g. syspath, then
sd_device_get_diskseq() returns -ENOENT.
2022-03-31 07:25:24 +09:00
Yu Watanabe
a43129b0a0 sd-device: drop /sys/subsystem support
Follow-ups for 37cf83d9bfdd9f6859b6f2654d8ec3bbb17873b2.
2022-03-31 07:25:24 +09:00
Gaël PORTAY
e502940be2 man: update root-hash-signature option with value
This documents two possible values expected by the option
root-hash-signature for veritytab and veritysetup-generator.
2022-03-30 23:45:26 +02:00
Yu Watanabe
72151060e8 udev: do not use sd_event_source_disable_unref() at more places
Fixes a bug introduced by 9612da361a825d70a9fd392f3ee5a53bf8896887.

Follow-up for f777e745a7966ea52ef29f9e4edfdd16874cfe86.
2022-03-31 05:08:23 +09:00
Yu Watanabe
fb54461717 udev: do not append unknown errno or signal name
Follow-up for 6467bda59d571696b645e8bbdf31926676890956.

Addresses https://github.com/systemd/systemd/pull/22871#discussion_r837705779.
2022-03-30 17:22:11 +02:00
Lennart Poettering
d360eafb36 update TODO 2022-03-30 16:13:41 +02:00
Frantisek Sumsal
5efefcdcff ci: drop clang 11 & add clang 14 2022-03-30 21:11:57 +09:00
Yu Watanabe
8b7378e145 fix typo 2022-03-30 21:10:06 +09:00
Luca Boccassi
8c70e8024b NEWS: specify that public headers are still C89 2022-03-29 21:54:01 +01:00
Luca Boccassi
7503fbd4a6 NEWS: mention that C11 is now used 2022-03-29 21:52:21 +01:00
Zbigniew Jędrzejewski-Szmek
0f6f9dc6cf NEWS: add entry for the unit enablement stuff
It should be merged soon.
v251-rc1
2022-03-29 22:39:32 +02:00
Zbigniew Jędrzejewski-Szmek
c3a053c241 test-systemctl-enable: skip test for %v if kver is not a valid instance
On arm, we'd fail with:
target@v:5.16.8-200.fc35.armv7hl+lpae.socket: not a valid unit name "target@v:5.16.8-200.fc35.armv7hl+lpae.socket": Invalid argument
2022-03-29 22:39:32 +02:00
наб
d66b77b4d8 test-copy: use non-0 data block in copy_holes
Some filesystems (e.g. zfs with compression!=off, which is the default
configuration) automatically hole-punch all-zero blocks ‒ write a block
full of ones instead
2022-03-29 21:10:43 +02:00
Zbigniew Jędrzejewski-Szmek
53877d0385
Merge pull request #22649 from keszybz/symlink-enablement-yet-again-punish-me-harder
Fixups to the unit enablement logic
2022-03-29 21:10:03 +02:00