Zbigniew Jędrzejewski-Szmek
d713c131a5
Merge pull request #34572 from keszybz/fix-printing-of-RootImageOptions
...
Fix printing of RootImageOptions
2024-09-28 17:23:44 +02:00
Zbigniew Jędrzejewski-Szmek
8dc40c25a4
shared: adjust whitespace and formatting
2024-09-27 20:19:58 +02:00
Mickaël Salaün
e996663475
seccomp-util: include @sandbox in @default
...
Every services and containers should be able to protect their users and
limit the impact of security bugs thanks to the security syscalls
provided by seccomp and Landlock. The goal of these syscalls is to
improve security with additional restrictions. They are designed to be
safely used by unprivileged (and then potentially malicious) users.
Remove the now-redundant "seccomp" entry for nspawn.
2024-09-27 12:37:37 +02:00
Mike Yuan
cdf684fc00
shared/bus-map-properties: move bus_map_job_id() from wait-for-units
2024-09-26 17:59:00 +02:00
Yu Watanabe
bfa834f138
Merge pull request #34511 from YHNdnzj/strv-extend-strv-consume
...
basic/strv: introduce strv_extend_strv_consume()
2024-09-21 13:57:02 +09:00
Yu Watanabe
f48bc69ca1
Merge pull request #34502 from yuwata/strv_find_closest
...
strv: introduce strv_find_closest()
2024-09-21 13:56:34 +09:00
Mike Yuan
a2c8652a2a
tree-wide: use strv_extend_strv_consume() where appropriate
2024-09-21 00:53:50 +02:00
Mike Yuan
b9aef48837
shared/bus-map-properties: modernize map_basic() and bus_map_strv_sort()
2024-09-20 22:44:35 +02:00
Mike Yuan
175de2c28e
basic/macro: move DECIMAL_STR_FMT to shared/tests
...
This shall never be used outside of test functions.
2024-09-20 22:44:34 +02:00
Daan De Meyer
0121b84e41
Add an extra debug log to dissect_image()
2024-09-21 05:38:20 +09:00
Yu Watanabe
07919a1857
verbs: use strv_find_closest()
...
This also makes the list of verbs is always shown on failure.
2024-09-21 05:10:47 +09:00
Yu Watanabe and Mike Yuan
144fbbac23
seccomp-util: pass negative fds as is to fsync() and friends
...
Closes #34478 .
Co-authored-by: Mike Yuan <me@yhndnzj.com >
2024-09-20 04:30:53 +09:00
Yu Watanabe
a3c2a9ee5d
Merge pull request #34486 from DaanDeMeyer/test-process-util
...
test-process-util: Migrate to new assertion macros
2024-09-19 23:28:15 +09:00
Daan De Meyer
062332f3db
Merge pull request #34481 from yuwata/has-tpm2
...
tpm2-util: several cleanups for tpm2_support()
2024-09-19 16:22:24 +02:00
Daan De Meyer
bc9a9177b2
Merge pull request #34483 from yuwata/network-conf-parser-neighbor-nexthop
...
network: several cleanups for conf parsers
2024-09-19 13:59:56 +02:00
Yu Watanabe
d5a7f3b7d4
tpm2-util: colorize output of 'systemd-analyze has-tpm2'
2024-09-19 19:14:19 +09:00
Yu Watanabe
b094398b0f
tpm2-util: update comment
...
has-tpm2 command is moved to systemd-analyze.
Follow-up for 58e359604f .
2024-09-19 19:08:10 +09:00
Yu Watanabe
1ee6570843
tpm2-util: do not load tpm2 libraries when not interested in the existence of the libraries
...
For example, 'bootctl status' only interested in if the efi has TPM2
support and a TPM2 driver is loaded. Hence, not necessary to load
libtss2.
2024-09-19 19:06:46 +09:00
Yu Watanabe
b7f051c91d
tpm2-util: introduce tpm2_is_fully_supported()
2024-09-19 19:04:15 +09:00
Daan De Meyer
1d8a81eb4e
Add ASSERT_OK_ZERO_ERRNO() and ASSERT_OK_EQ_ERRNO()
2024-09-19 11:38:47 +02:00
Yu Watanabe
1775654e2c
conf-parser: drop unnecessary temporary variable
2024-09-19 03:39:15 +09:00
Yu Watanabe
0ea6d55a4b
conf-parser: introduce config_parse_in_addr_data()
2024-09-19 03:38:22 +09:00
Yu Watanabe
b962338104
nsresource: make sd_json_dispatch_field table static
...
This also adds missing error check of sd_json_dispatch().
Follow-up for 54452c7b2a .
2024-09-19 01:34:57 +09:00
Yu Watanabe
fae0b00434
creds-util: make sd_json_dispatch_field table static
2024-09-19 01:34:57 +09:00
Yu Watanabe
a95ae2d36a
conf-parser: use hashmap_ensure_put() at one more place
2024-09-18 03:13:47 +09:00
Yu Watanabe
be8e4b1a87
conf-parser: log errors in config_parse_many_files() and friends
...
Previously, if an file cannot be opened, e.g. due to its permission,
config_parse_many() or so did not log the error even if CONFIG_PARSE_WARN
flag is set. This makes all error paths in these functions are logged,
and the log level is controlled by the flag.
Prompted by #34436 .
2024-09-18 03:13:25 +09:00
Yu Watanabe
a7afe5a3e7
Merge pull request #34443 from yuwata/network-sysctl-monitor-follow-ups
...
network/sysctl-monitor: several follow-ups and cleanups
2024-09-17 19:15:12 +09:00
Daan De Meyer
b3ebd480d6
Fix generator logging
...
log_setup() overrides the previously set log target again so we
can't use it in log_setup_generator().
Follow-up for aa976d8788
2024-09-17 15:10:39 +09:00
Yu Watanabe
46718d344f
bpf-link: introduce bpf_ring_buffer_free() and friends
...
Then, replace rb_free() in networkd.
Follow-up for 6d9ef22acd .
2024-09-16 14:36:54 +09:00
Yu Watanabe
b5ec8f77e0
Merge pull request #34434 from poettering/bootctl-stub-paths
...
bootctl: expose new stub path efi vars and related
2024-09-16 10:41:24 +09:00
Lennart Poettering
3e0a3a0259
bootctl: show whether a PE file is an addon in 'booctl kernel-identify'
2024-09-16 10:41:10 +09:00
Lennart Poettering
c8d60ae79d
efivars: add helper that reads an fs path from an efi var
2024-09-15 19:34:19 +02:00
Lennart Poettering
bfcf48b842
bootctl: show stub partition data too in "status" too
2024-09-15 19:33:48 +02:00
Lennart Poettering
1b7ef87fc1
Merge pull request #34347 from poettering/uki-with-many-bootctl
...
bootctl: multi-profile UKI support
2024-09-15 09:06:58 +02:00
Yu Watanabe
d97c672be0
Merge pull request #34405 from poettering/dns-domain-validate-fix
...
dns-domain: fix validation check for max name
2024-09-15 03:33:12 +09:00
Lennart Poettering
1e1661c5d2
dns-domain: validate dns domain name max size based on unescaped, not escaped size
...
Otherwise we'll consider various domains invalid that really shouldn't
be considered invalid.
Fixes : #34399
2024-09-13 18:02:54 +02:00
Lennart Poettering
dc8ed83892
dns-domain: follow our current variable naming style
2024-09-13 18:00:38 +02:00
Lennart Poettering
d7a6bb9891
tree-wide: make sigprocmask() changes more automatic
...
This tries to get rid of most manual sigprocmask() changes, in favour
of:
1. The SD_EVENT_SIGNAL_PROCMASK flag to sd_event_add_signal()
2. The sd_event_set_signal_exit() call for handling SIGTERM/SIGINT
3. Move masking of SIGWINCH into ptyfwd, out of nspawn/vmspawn/run
And while we are at it get rid of a bunch of event source fields whose
lifetime is bound to the sd_event object they belong to anyway, and make
use of the "floating" event source feature of sd-event instead.
2024-09-13 17:12:28 +02:00
Lennart Poettering
868258cf38
basic: split ifname related calls from format-util.h into format-ifname.h
...
This way we don't have to pull in net/if.h into format-util.h.
This is supposed to address https://github.com/systemd/systemd/pull/32212#discussion_r1755639881
No actual code changes, just a .c/.h file split-up.
2024-09-13 07:27:47 +02:00
Lennart Poettering
626df2fe8d
seccomp-util: add recently added new syscalls to various seccomp groups, as appropriate
2024-09-12 14:25:42 +02:00
Lennart Poettering
58e359604f
analyze: move "has-tpm2" from systemd-creds to systemd-analyze
...
The verb s not really specific to credential management, it was always a
bit misplaced. Hence move it to systemd-analyze, where we already have
some general TPM related verbs such as "srk" and "pcrs"
2024-09-12 12:56:03 +02:00
Lennart Poettering
6a92a793ac
bootspec: automatically filter non-native UKIs and add-ons when enumerating
2024-09-12 10:02:15 +02:00
Lennart Poettering
59b3df9bae
bootspec: process multi-profile UKIs
2024-09-12 10:02:15 +02:00
Lennart Poettering
9de565dd5d
pe-binary: add pe_is_native() for checking if PE is native
2024-09-12 10:02:15 +02:00
Lennart Poettering
e6c49f7f11
pe-binary: split pe_header_find_section() in two
...
This splits out the core part into a new function
pe_section_table_find().
pe_header_find_section() takes a PeHeader as input, while
pe_section_table_find() just takes the section table and its size.
2024-09-12 10:02:15 +02:00
Lennart Poettering
f3c1d7fea1
pe-binary: split pe_read_section_data() into two
...
This renames pe_read_section_data() to pe_read_section_data_by_name()
and makes pe_read_section_data() a bit more low-level: it takes a header
table entry directly, instead of searching it first by name.
2024-09-12 10:02:15 +02:00
Lennart Poettering
a8e912f01b
pe-binary: add helper pe_is_addon() for detecting whether we are looking at PE EFI add-on
2024-09-12 10:02:15 +02:00
Lennart Poettering
c355208d83
tpm2-util: fix whitespace
2024-09-11 10:28:36 +02:00
Lennart Poettering
d794c10d96
cryptsetup: use the new crypt_token_set_external_path() API if available
...
Let's make use of libcryptsetup's new crypt_token_set_external_path()
API in place of the interposition stuff we have been doing before. Let's
kill it entirely, given that this was a developer feature only anyway
(and guarded by an appropriate ifdef).
Fixes : #30098
2024-09-11 02:56:55 +09:00
Lennart Poettering
13b5225d62
shutdown: teach sync_with_progress() to optionally sync a specific fd only
...
This is preparation for reusing the logic for syncing DM and other
devices with a timeout applied.
2024-09-09 19:12:31 +02:00