1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

67401 Commits

Author SHA1 Message Date
Lennart Poettering
0869e1326a oomd: correct listening sockets
So, unfortunately oomd uses "io.system." rather than "io.systemd." as
prefix for its sockets. This is a mistake, and doesn't match the
Varlink interface naming or anything else in oomd.

hence, let's fix that.

Given that this is an internal protocol between PID1 and oomd let's
simply change this without retaining compat.
2023-09-25 23:27:18 +02:00
Lennart Poettering
a4edf0335d varlink: move O_NONBLOCK setting to varlink_server_listen_fd(), and set O_CLOEXEC too
Let's move setting of O_NONBLOCK into varlink_server_listen_fd() and out
of varlink_server_create_listen_fd_socket(). The latter has two callers:
varlink_server_listen_fd() and varlink_server_listen_address(), which
guarantees O_CLOEXEC+O_NONBLOCK anyway, hence no neet to repeat the
logic.
2023-09-25 23:27:04 +02:00
Lennart Poettering
0e19744232
Merge pull request #29315 from poettering/strgrowpad0
string-util: make strgrowpad0() safer
2023-09-25 23:26:47 +02:00
Luca Boccassi
5ea69810fe
Merge pull request #29308 from aafeijoo-suse/dissect-fix
dissect: fix man and bash-completion
2023-09-25 19:16:08 +01:00
Lennart Poettering
3510df0ae4 repart: add extra safety check that the verity signature fits in the partition we want to write 2023-09-25 19:10:37 +02:00
Lennart Poettering
8e47958423 string-util: make strgrowpad0() a bit safer
Let#s make sure we never shorten the allocation leaving an invalid
string (i.e. a memory allocation without a trailing NUL) around.
2023-09-25 19:10:37 +02:00
Lennart Poettering
b907b9075e alloc-util: remove duplicate empty line 2023-09-25 18:49:21 +02:00
Lennart Poettering
8dcce20a27
Merge pull request #29301 from poettering/pcr-extend-rename
rename pcrphase binary to pcrextend
2023-09-25 18:28:03 +02:00
Lennart Poettering
75174a5de9 man: briefly document that we are now keeping an event log in userspace for out measurements 2023-09-25 17:17:20 +02:00
Lennart Poettering
b0d00ec60a pcrextend: make PCR index configurable
Let's make the tool a tiny bit more generic by allowing the PCR index to
measure into to be configurable.
2023-09-25 17:17:20 +02:00
Lennart Poettering
32295fa08f pcrphase: rename binary to pcrextend
The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.

Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.

The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.

While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.
2023-09-25 17:17:20 +02:00
Antonio Alvarez Feijoo
acb7d23d8f
bash-completion: add missing commands and options to systemd-dissect 2023-09-25 16:46:11 +02:00
Frantisek Sumsal
7f048f0ed0 test: enable debug logs for the user instances as well
To make debugging [0], hopefully, easier.

[0] https://github.com/systemd/systemd/issues/28504
2023-09-25 15:24:11 +01:00
Luca Boccassi
b7733dfee9
Merge pull request #29303 from abderrahim/syntax-fixes
man: a couple of small fixes
2023-09-25 15:23:48 +01:00
Antonio Alvarez Feijoo
a0582220f5
man/systemd-dissect: various fixes
- Add synopsis to `--discover` and `--validate` options.
- `-l` is for `--list`, not for `--mtree`.
2023-09-25 16:16:41 +02:00
Abderrahim Kitouni
0ee4239437 man: fix docbook syntax for function docs
This fixes sd_bus_error_add_map and man/sd_uid_get_state
2023-09-25 13:34:45 +01:00
Abderrahim Kitouni
d511acdf82 man/kernel-command-line: don't refer early_core_pattern to systemd
It is defined later in the same file
2023-09-25 13:14:34 +01:00
Zbigniew Jędrzejewski-Szmek
61afc53924 docs/FDS: add missing article and reword sentence 2023-09-25 11:30:02 +01:00
Lennart Poettering
02c9d62b30 update TODO 2023-09-25 12:23:29 +02:00
Daan De Meyer
7d376f1dde mkosi: Run meson and ninja as the user invoking mkosi
Latest mkosi sets $MKOSI_UID and $MKOSI_GID to the uid/gid of the
user running mkosi. Let's make use of this to run meson setup and
ninja as the user running mkosi, so that if we execute git as a
subprocess during meson setup, it doesn't complain about unsafe
directories. This also makes sure all the build artifacts are owned
on the host by the user running mkosi.
2023-09-25 11:06:15 +01:00
김인수
e2b8a61919 po: Translated using Weblate (Korean)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main
2023-09-25 12:59:02 +09:00
Alexandre Peixoto Ferreira
13abd00685
sd-dhcp-client: reject NAKs from servers that we did not send an offer to (#29290)
To support multiple DHCP servers in a network.
2023-09-25 11:46:41 +09:00
Takashi Sakamoto
fb86af6399 hwdb: ieee1394-unit-function: add Miglia Technology Harmony Audio (HA02)
This commit adds hwdb entry for Miglia Technology Harmony Audio (HA02).
The device is an application of OXford Semiconductor FW970 and will be
supported by ALSA oxfw driver in future.
2023-09-24 10:56:40 +01:00
Frantisek Sumsal
18c3ffbfcc test: wait for the swtpm socket to appear
On slower/overloaded systems it may take a bit for the swtpm socket
to show up:

I: Started swtpm as PID 189419 with state dir /tmp/tmp.pWqUutuGUj
I: Configured emulated TPM2 device tpm-spapr
+ tee /var/tmp/systemd-test-TEST-70-TPM2_1/console.log
+ timeout --foreground 1200 /bin/qemu-system-ppc64le -smp 4 ...
qemu-system-ppc64le: -chardev socket,id=chrtpm,path=/tmp/tmp.pWqUutuGUj/sock: Failed to connect to '/tmp/tmp.pWqUutuGUj/sock': No such file or directory
E: qemu failed with exit code 1

Spotted regularly in the ppc64le cron job and in some Ubuntu CI/CentOS CI
pr runs [0].

[0] https://github.com/systemd/systemd/pull/29183#issuecomment-1721727927
2023-09-23 11:32:12 +01:00
Frantisek Sumsal
3a89904e45 test: don't panic on soft lockups
We can't do anything about them anyway, and most importantly this seems
to alleviate systemd/systemd-centos-ci#660, which should make the CIs
a bit less angry (at least until the issue is addressed properly).
2023-09-23 14:19:55 +08:00
Luca Boccassi
f5f4486c65
Merge pull request #29254 from yuwata/sd-ndisc-use-usec_t
sd-ndisc: make sd_ndisc return time values in usec
2023-09-22 21:46:50 +01:00
Luca Boccassi
593551a8a2
Merge pull request #29258 from yuwata/sd-dhcp-client-split-out
sd-dhcp-client: preparation for later PR
2023-09-22 21:46:31 +01:00
Yu Watanabe
f9edbb80e9 sd-dhcp-client: split out client_parse_message()
No functional change, just refactoring and preparation for later
commits.
2023-09-23 01:38:21 +09:00
Yu Watanabe
db849df5a1 sd-dhcp-client: introduce dhcp_lease_unref_and_replace() 2023-09-23 01:38:21 +09:00
Yu Watanabe
8fc725052a sd-dhcp-client: do not set fallback subnet mask if it is already set 2023-09-23 01:38:21 +09:00
Yu Watanabe
2ff1e23036 sd-dhcp-client: split out client_enter_requesting()
No functional change, just refactoring and preparation for later
commits.
2023-09-23 01:38:21 +09:00
Yu Watanabe
525717b87c sd-dhcp-client: split out client_enter_bound()
No functional change, just refactoring and preparation for later
commits.
2023-09-23 01:38:21 +09:00
Yu Watanabe
6197db53ba sd-ndisc: make sd_ndisc return time values in usec
This also introduces sd_ndisc_router_get_lifetime_timestamp() and
friends that return timestamp rather than timespan.
2023-09-23 01:34:56 +09:00
Mike Yuan
e504e46515 btrfs-util: fix one memory leak
Follow-up for efb6a76a2a
2023-09-23 00:13:06 +08:00
RoepLuke
c9bb40b133 Add recommended initramfs regeneration
I recently tried adding a FIDO2-Device as an unlocking method to the LUKS2 partition containing my Fedora install.
When trying to do this, I stumbled upon the here edited man files detailing how to do this.
I however could not unlock my partition with my FIDO2-Device after editing /etc/crypttab and rebooting.
As I found out after a while, I needed to regenerate / update my currently running / used initramfs (https://unix.stackexchange.com/a/705809).
This would have most likely solved itself for me with the next kernel update install (as far as I understand).
So I propose changing the files edited here to recommend or at least inform the user about this.
2023-09-22 16:02:44 +01:00
Daan De Meyer
021b0ff405 repart: Don't fail on boot if we can't find the root block device
When booting from virtiofs, we won't be able to find a root block
device. Let's gracefully handle this similar to how we don't fail
if we can't find a GPT partition table.
2023-09-22 16:01:12 +01:00
Luca Boccassi
8bf1d14112
Merge pull request #29282 from YHNdnzj/hibernate-resume-meson
hibernate-resume: minor follow-up for meson and header file
2023-09-22 15:46:09 +01:00
Mike Yuan
17ad085993
hibernate-resume: add missing #pragma once 2023-09-22 21:03:48 +08:00
Mike Yuan
3494a8b904
hibernate-resume: break lines in meson.build files() 2023-09-22 21:02:55 +08:00
Zbigniew Jędrzejewski-Szmek
a0fe45a93f
Merge pull request #29224 from keszybz/netdev-config-parsing
Use a helper to simplify parsing of ranges in netdev config and related changes
2023-09-22 14:29:47 +02:00
Daan De Meyer
fc5473b737 mkosi: Don't skip initrd dependency when building a directory image
mkosi now supports booting directory images in qemu using virtiofs.
However, until distribution kernels build the virtiofs driver directly
into the kernel, we need an initrd to make this work, so make sure to
pull in the initrd preset when building a directory image that could be
bootable to make this work.
2023-09-22 13:52:02 +02:00
Zbigniew Jędrzejewski-Szmek
f75921c7fd netdev/wireguard: define iterator variable in the loop 2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
117843fe95 network: make DEFINE_NETDEV_CAST() assert on input and output
The macro used to return NULL if input was NULL or had the wrong type. Now
it asserts that input is nonnull and it has the expected type.

There are a few places where a missing or mismatched type was OK, but in a
majority of places, we would do both of the asserts. In various places we'd
only do one, but that was by ommission/mistake. So moving the asserts into the
macro allows us to save some lines.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
6c9935ba87 network/netdev: align tables 2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
6fded8dced network/netdev: fix resetting of 'inherit' field
We have two fields: inherit and ttl, and ttl is ignored if inherit is true.
Setting TTL=inherit and later TTL=n would not work because we didn't unset
inherit.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
af14281d2c network: refusing parsing negative flow labels
The docs for FlowLabel= said that the range is 0..1048575, but the code did not
reject negative numbers.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
a893c121ed network/fou-tunnel: simplify parsing of protocol number
Previously, we would call parse_ip_protocol(), which internally calls
safe_atoi(), and then call safe_atou(). This isn't terrible, but it's also
slightly confusing. Use parse_ip_protocol_full() to avoid the second call.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
1b2733b412 shared/ip-procotol-list: generalize and rework parse_ip_protocol()
Optionally, accept protocols that don't have a known name.
Avoid any allocations in the common case.
Return more granular error codes: -ERANGE for negative values,
-EOPNOTSUPP if the protocol is a valid number, but we don't know
the protocol, and -EINVAL only if it's not a numerical string.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
04c2a002e6 network/vxlan: avoid unneccesary temporary variables
parse_ip_port_range() DTRT and only sets the output on success.
2023-09-22 08:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
257cebb67a network/netdev: use ASSERT_PTR() more, adjust indentation 2023-09-22 08:17:42 +02:00